File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
EnrichmentMapPlugin/src/main/java/org/baderlab/csplugins/enrichmentmap/view Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1848,9 +1848,24 @@ private String[] setClasses(String classFile){
1848
1848
String fullText2 = new Scanner (reader ,"UTF-8" ).useDelimiter ("\\ A" ).next ();
1849
1849
1850
1850
String [] lines2 = fullText2 .split ("\r \n ?|\n " );
1851
+
1852
+ /*
1853
+ * GSEA class files will have 3 lines in the following format:
1854
+ * 6 2 1
1855
+ # R9C_8W WT_8W
1856
+ R9C_8W R9C_8W R9C_8W WT_8W WT_8W WT_8W
1857
+
1858
+ If the file has 3 lines assume it is a GSEA and get the phenotypes from the third line.
1859
+ If the file only has 1 line assume that it is a generic class file and get the phenotypes from the single line
1860
+
1861
+ */
1851
1862
1852
1863
//the class file can be split by a space or a tab
1853
- String [] classes = lines2 [2 ].split ("\\ s" );
1864
+ String [] classes =null ;
1865
+ if (lines2 .length >= 3 )
1866
+ classes = lines2 [2 ].split ("\\ s" );
1867
+ else if (lines2 .length == 1 )
1868
+ classes = lines2 [0 ].split ("\\ s" );
1854
1869
1855
1870
1856
1871
//the third line of the class file defines the classes
You can’t perform that action at this time.
0 commit comments