Java error when loading txt file to GSEA

1,375 views
Skip to first unread message

Salomé CECCARELLI

unread,
Mar 14, 2022, 5:55:49 AM3/14/22
to gsea-help
Hi,

It's my first time using GSEA, and I already have some trouble at the first step. It seems like I can't load my dataset in .txt format despite the fact that I have follow the GSEA user guide. I always have the same error message :
<Error Details>

---- Full Error Message ----
There were errors: ERROR(S) #:1
Parsing trouble
java.lang.NumberFormatException: ...

---- Stack Trace ----
# of exceptions: 1
------For input string: "1-25-NC"------
java.lang.NumberFormatException: For input string: "1-25-NC"
        at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(Unknown Source)
        at java.base/jdk.internal.math.FloatingDecimal.parseFloat(Unknown Source)
        at java.base/java.lang.Float.parseFloat(Unknown Source)
        at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseStringToFloat(AbstractParser.java:266)
        at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseFieldsIntoFloatArray(AbstractParser.java:371)
        at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseTextMatrixToDataset(AbstractParser.java:293)
        at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.TxtDatasetParser.parse(TxtDatasetParser.java:109)
        at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.readDatasetTXT(ParserFactory.java:201)
        at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:760)
        at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:737)
        at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserWorker.doInBackground(ParserWorker.java:52)
        at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
        at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
        at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)

You will also find attaching a screenshot of the file I'm trying to load.
 If you have a solution, it would be very helpful.
Thank you in advance,

Salomé Ceccarelli
Présentation1.jpg

David Eby

unread,
Mar 14, 2022, 8:29:12 AM3/14/22
to gsea...@googlegroups.com
Hi Salomé,

That input file does indeed look correct for our TXT format, but it is clearly mistaking the same names for numeric values.  Would you mind sharing the actual file with us so we can have a closer look?  You can send it to gsea...@broadinstitute.org to keep it private.

Thanks,
David

--
You received this message because you are subscribed to the Google Groups "gsea-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gsea-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gsea-help/d20301b7-ed6b-43d1-b5a0-4993e52f8e05n%40googlegroups.com.

David Eby

unread,
Mar 14, 2022, 9:50:59 AM3/14/22
to gsea...@googlegroups.com
Hi Salomé,

The problem was that you had a near-duplicate of the header row at line 1149 in the file:
NAGLU 1 14.2704 0 15.1808 ...
NAME 1 1-25-NC 1-35-NC 1-54-NC 1-56-NC 1-31-PC 1-34-PC 1-38-PC 1-40-PC 1-10-P 1-12-P 1-22-P 1-23-P
NAMPT 1 16.9471 15.1544 ...
...
The dataset parsing was failing when reaching this line, not the header line.  Removing this line from the input allowed the file to load.

We've been improving the parser error messages lately, and there is indeed a more useful message in the console log (seen by clicking the [+] in the bottom right of the frame).  However, it would be better to include that message directly in the error pop-up.  I'll make a note to fix that in a future release.

Regards,

Salomé CECCARELLI

unread,
Mar 14, 2022, 11:04:48 AM3/14/22
to gsea...@googlegroups.com
It's working now, thank you so much for your reactivity !

Have a nice day :)

Salomé Ceccarelli

Kristin Aldridge

unread,
Mar 24, 2022, 6:32:46 PM3/24/22
to gsea-help
Hello,
 I am getting the same error. May I send my data to you for evaluation? Thanks!

Kristin

David Eby

unread,
Mar 24, 2022, 7:03:46 PM3/24/22
to gsea...@googlegroups.com
Hi Kristan,

Yes, you can send it to the same address, gsea...@broadinstitute.org.  However, you might also want to take a look at the log first to see if it notes any error.  Click the [+] icon i the bottom-right of the frame after loading the file.  You can also look in the log file under gsea_home.  The fie is only available with GSEA Desktop 4.2.0 and newer, and is named either gsea.log or gsea-0.log

You might find a more specific warning this way.  We'll probably fix the message in the pop-up in a future release.

Regards,

Kristin Aldridge

unread,
Mar 31, 2022, 11:38:14 AM3/31/22
to gsea-help
Hello,
 Below is the error I'm getting.

< Process output will appear below >

Done initing things while splashing
Mar 31, 2022 11:37:00 AM com.jidesoft.plaf.aqua.AquaPreferences loadGlobalPreferences
WARNING: AquaPreferences failed to load Mac OS X global system preferences - parseInt: unsupported byte count:16
Mar 31, 2022 11:37:13 AM edu.mit.broad.genome.parsers.AbstractParser startImport
INFO: Begun importing: Dataset from: 4_genes_fpkm_expression.txt
Mar 31, 2022 11:37:14 AM edu.mit.broad.genome.parsers.AbstractParser parseFieldsIntoFloatArray
SEVERE: Could not parse 'X' as a floating point number in row 1 of the data matrix with Name 'ENSG00000000003'.
Mar 31, 2022 11:37:14 AM edu.mit.broad.xbench.core.api.AbstractWindowManager showError
SEVERE: There were errors: ERROR(S) #:1
Parsing trouble
java.lang.NumberFormatException: For input string: "X"

    at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(Unknown Source)
    at java.base/jdk.internal.math.FloatingDecimal.parseFloat(Unknown Source)
    at java.base/java.lang.Float.parseFloat(Unknown Source)
    at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseStringToFloat(AbstractParser.java:250)
    at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseFieldsIntoFloatArray(AbstractParser.java:361)
    at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseTextMatrixToDataset(AbstractParser.java:277)
    at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.TxtDatasetParser.parse(TxtDatasetParser.java:108)

    at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.readDatasetTXT(ParserFactory.java:201)
    at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:760)
    at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:737)
    at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserWorker.doInBackground(ParserWorker.java:53)

    at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
    at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
    at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.base/java.lang.Thread.run(Unknown Source)



David Eby

unread,
Mar 31, 2022, 12:41:42 PM3/31/22
to gsea...@googlegroups.com
It's hard to say exactly what's wrong without seeing the file, but the main thing is that our TXT parser requires a very specific format, as described on the Data Formats page of our Wiki.  The parser expects a data matrix format but the file needs to match what is expected.

You can send the file to gsea...@broadinstitute.org for us to take a look, but take a look at that Wiki link first to see if your data can be made to match.

Zeinab Tashi

unread,
Mar 9, 2023, 4:59:04 PM3/9/23
to gsea-help
Hey David,
I'm having the same problem with loading my data to GSEA. Would you please help me?
Thanks,
Zeinab

This is the error that I'm receiving:

<Error Details>

---- Full Error Message ----
There were errors: ERROR(S) #:1
Parsing trouble
java.lang.NumberFormatException: ...

---- Stack Trace ----
# of exceptions: 1
------For input string: "Description"------
java.lang.NumberFormatException: For input string: "Description"

at java.base/jdk.internal.math.FloatingDecimal.readJavaFormatString(Unknown Source)
at java.base/jdk.internal.math.FloatingDecimal.parseFloat(Unknown Source)
at java.base/java.lang.Float.parseFloat(Unknown Source)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseStringToFloat(AbstractParser.java:250)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseFieldsIntoFloatArray(AbstractParser.java:361)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.AbstractParser.parseTextMatrixToDataset(AbstractParser.java:277)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.TxtDatasetParser.parse(TxtDatasetParser.java:108)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.readDatasetTXT(ParserFactory.java:200)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:758)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:735)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserWorker.doInBackground(ParserWorker.java:53)

at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)


David Eby

unread,
Mar 9, 2023, 7:51:54 PM3/9/23
to gsea...@googlegroups.com
Hi Zeinab,

It's difficult to say without seeing the file, but this error often happens when you have a file in GCT format but with a TXT extension.   See the Data Formats page in our Wiki for the differences.  GSEA uses the extension to decide how to parse the file.

This can happen when creating the GCT file in Excel and then saving as a text file.  Excel might attach a hidden '.txt' extension, so you end up with 'my_dataset.gct.txt' instead of just 'my_dataset.gct'.

You can send the file to gsea...@broadinstitute.org for us to take a look, but take a look at that Wiki link first and double-check the file extension.

I hope this helps,

Vithurran Thavarajah

unread,
May 9, 2023, 7:08:17 AM5/9/23
to gsea-help
Hello GSEA,

I'm trying to input an expression dataset into GSEA 4.3.2 but keep getting the following error message; (I tried using both the .gct and .txt formats liosted on the wiki page you linked in the above email but same error.) I'll send the .gct and .txt files separately to the gsea email.

<Error Details>

---- Full Error Message ----
There were errors: ERROR(S) #:1
Parsing trouble
java.io.FileNotFoundException: / ...


---- Stack Trace ----
# of exceptions: 1
------/Users/vithurranthavarajah_1/Documents/GG_DEG_2.GCT (No such file or directory)------
java.io.FileNotFoundException: /Users/vithurranthavarajah_1/Documents/GG_DEG_2.GCT (No such file or directory)
at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserWorker.doInBackground(ParserWorker.java:48)

at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Vithurran Thavarajah

unread,
May 9, 2023, 7:13:37 AM5/9/23
to gsea-help
Sorry the email mentioned above wasn't recognised by my gmail. Is there an address I can send copies of my .txt and .gct files separately please?

Anthony Castanza

unread,
May 9, 2023, 12:16:30 PM5/9/23
to gsea-help
Hi Vithurran,

You can send your files to gsea...@broadinstitute.org, that is the best way to send data confidentially to us. If for some reason that doesn't work, you can send it directly to me, that would work as well.

- Anthony

Anthony S. Castanza, PhD
Curator, Molecular Signatures Database
Mesirov Lab, Department of Medicine
University of California, San Diego

Gavin SHOU

unread,
Mar 18, 2024, 1:52:41 AMMar 18
to gsea-help
Hey David,

Below is the error I'm getting.

<Error Details>

---- Full Error Message ----
There were errors: ERROR(S) #:1
Parsing trouble
java.io.FileNotFoundException: / ...


---- Stack Trace ----
# of exceptions: 1
------/Users/jiawenshou/Desktop/BGI_F24A430000159_MUSkdxwR/Model-vs-Treatment.gene.pheatmap.txt (No such file or directory)------
java.io.FileNotFoundException: /Users/jiawenshou/Desktop/BGI_F24A430000159_MUSkdxwR/Model-vs-Treatment.gene.pheatmap.txt (No such file or directory)

at java.base/java.io.FileInputStream.open0(Native Method)
at java.base/java.io.FileInputStream.open(Unknown Source)
at java.base/java.io.FileInputStream.<init>(Unknown Source)
at org.gsea_msigdb.gsea/edu.mit.broad.genome.parsers.ParserWorker.doInBackground(ParserWorker.java:48)
at java.desktop/javax.swing.SwingWorker$1.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.desktop/javax.swing.SwingWorker.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

Anthony Castanza

unread,
Mar 18, 2024, 1:57:27 PMMar 18
to gsea-help
Hi Gavin,

Could you try replacing the dashes ("-") in your filename with underscores ("_") such as Model_vs_Treatment.gene.pheatmap.txt.

Let me know if that solves the problem, or at least doesn't give the same error message.

-Anthony


Anthony S. Castanza, PhD
Curator, Molecular Signatures Database
Mesirov Lab, Department of Medicine
University of California, San Diego
Reply all
Reply to author
Forward
0 new messages