<p>You seem to have forgotten the space after the #. It should be as in <a href="http://software.broadinstitute.org/cancer/software/gsea/wiki/index.php/Data_formats#CLS:_Categorical_.28e.g_tumor_vs_normal.29_class_file_format_.28.2A.cls.29" rel="nofollow noreferrer">here</a> (Just for future readers know where to find the specs). Also it should be a single line (Maybe this error was introduced while pasting here or it has been a duplicate because there are 39 samples in the 3 line and they should be 37).</p>

<p>Either adding 2 more samples to the initial count and removing the newline of the third line: </p>

<pre><code>39 2 1
# CD69neg CD69pos
CD69neg CD69pos CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos CD69neg CD69neg CD69neg CD69neg CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos
</code></pre>

<p>Or removing the third line:</p>

<pre><code>37 2 1
# CD69neg CD69pos
CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos CD69neg CD69neg CD69neg CD69neg CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos
</code></pre>

CC BY-SA 3.0
2018-01-07T19:43:48.463Z
Thank you so much! Yeah the error was about I have multiple columns rather than just one line.
Son nguyen
CC BY-SA 3.0
2018-01-07T20:53:16.923Z
Glad I could help. Don't forget to mark an answer as accepted or post yourself the solution you find most useful
llrs
CC BY-SA 3.0
2018-01-07T15:14:57.050Z
2018-01-07T15:14:57.050Z
llrs
<p>I am creating a .cls file for my GSEA analysis and see the below error. Can anyone suggest a solution?</p>

<p>I create the file using TeXworks. The file looks like this:</p>

<pre><code>37 2 1
#CD69neg CD69pos
CD69neg CD69pos
CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos CD69neg CD69neg CD69neg CD69neg CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos
</code></pre>

<h2>Error Details</h2>

<pre><code>---- Full Error Message ----
There were errors: ERROR(S) #:1 Parsing trouble edu.mit.broad.genome.parsers.Par ...

---- Stack Trace ----

of exceptions: 1
------Number of items found in cls data 10 is not equal to the number specified on the header line 37------ 

edu.mit.broad.genome.parsers.ParserException:
Number of items found in cls data 10 is not equal to the number specified on the header line 37 at 
edu.mit.broad.genome.parsers.ClsParser.doSanityChecks(ClsParser.java:388) at 
edu.mit.broad.genome.parsers.ClsParser._parse_genecluster_style_categorical(ClsParser.java:252) at 
edu.mit.broad.genome.parsers.ClsParser.parse(ClsParser.java:226) at 
edu.mit.broad.genome.parsers.ParserFactory._readTemplates(ParserFactory.java:342) at 
edu.mit.broad.genome.parsers.ParserFactory.readTemplate(ParserFactory.java:293) at 
edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:753) at 
edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:726) at 
edu.mit.broad.genome.parsers.ParserWorker.doInBackground(ParserWorker.java:52) at 
javax.swing.SwingWorker$1.call(SwingWorker.java:295) at 
java.util.concurrent.FutureTask.run(FutureTask.java:266) at 
javax.swing.SwingWorker.run(SwingWorker.java:334) at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)
</code></pre>

<gsea>
GSEA- parsing error for .cls file
# GSEA- parsing error for .cls file

(Asked by: username_0 on 2018-01-06)

I am creating a .cls file for my GSEA analysis and see the below error. Can anyone suggest a solution?
I create the file using TeXworks. The file looks like this:
37 2 1
#CD69neg CD69pos
CD69neg CD69pos
CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos CD69neg CD69neg CD69neg CD69neg CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos

Error Details
---- Full Error Message ----
There were errors: ERROR(S) #:1 Parsing trouble edu.mit.broad.genome.parsers.Par ...

---- Stack Trace ----

of exceptions: 1
------Number of items found in cls data 10 is not equal to the number specified on the header line 37------ 

edu.mit.broad.genome.parsers.ParserException:
Number of items found in cls data 10 is not equal to the number specified on the header line 37 at 
edu.mit.broad.genome.parsers.ClsParser.doSanityChecks(ClsParser.java:388) at 
edu.mit.broad.genome.parsers.ClsParser._parse_genecluster_style_categorical(ClsParser.java:252) at 
edu.mit.broad.genome.parsers.ClsParser.parse(ClsParser.java:226) at 
edu.mit.broad.genome.parsers.ParserFactory._readTemplates(ParserFactory.java:342) at 
edu.mit.broad.genome.parsers.ParserFactory.readTemplate(ParserFactory.java:293) at 
edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:753) at 
edu.mit.broad.genome.parsers.ParserFactory.read(ParserFactory.java:726) at 
edu.mit.broad.genome.parsers.ParserWorker.doInBackground(ParserWorker.java:52) at 
javax.swing.SwingWorker$1.call(SwingWorker.java:295) at 
java.util.concurrent.FutureTask.run(FutureTask.java:266) at 
javax.swing.SwingWorker.run(SwingWorker.java:334) at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) at java.lang.Thread.run(Thread.java:748)

**Tags:** gsea

---

## 1 answers

### Answer by username_1 on 2018-01-07. Score: 3

You seem to have forgotten the space after the #. It should be as in here (Just for future readers know where to find the specs). Also it should be a single line (Maybe this error was introduced while pasting here or it has been a duplicate because there are 39 samples in the 3 line and they should be 37).
Either adding 2 more samples to the initial count and removing the newline of the third line: 
39 2 1
# CD69neg CD69pos
CD69neg CD69pos CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos CD69neg CD69neg CD69neg CD69neg CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos

Or removing the third line:
37 2 1
# CD69neg CD69pos
CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos CD69neg CD69neg CD69neg CD69neg CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69neg CD69neg CD69pos CD69pos CD69pos CD69neg CD69pos CD69pos CD69pos CD69pos

> **Comments:**
> **username_0**: Thank you so much! Yeah the error was about I have multiple columns rather than just one line.  
> **username_1**: Glad I could help. Don't forget to mark an answer as accepted or post yourself the solution you find most useful  

---

