Skip to content

Commit b745692

Browse files
committed
More informative error message
1 parent e83b23e commit b745692

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/analysis/CombineSubreadGeneCountsHandler.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package org.labkey.sequenceanalysis.analysis;
22

3+
import org.apache.commons.lang3.StringUtils;
34
import org.json.JSONObject;
45
import org.labkey.api.pipeline.PipelineJob;
56
import org.labkey.api.pipeline.PipelineJobException;
@@ -49,12 +50,17 @@ protected void processOutputFiles(CountResults results, List<SequenceOutputFile>
4950
while ((line = reader.readLine()) != null)
5051
{
5152
line = line.trim();
52-
if (line.startsWith("#") || line.startsWith("Geneid"))
53+
if (line.startsWith("#") || line.startsWith("Geneid") || line.isEmpty())
5354
{
5455
continue;
5556
}
5657

5758
String[] cells = line.split("\t");
59+
if (cells.length < 7)
60+
{
61+
throw new PipelineJobException("Line too short, was " + cells.length + ": [" + StringUtils.join(cells, "<>") + "]");
62+
}
63+
5864
String geneId = cells[0];
5965
if (OTHER_IDS.contains(geneId))
6066
{

0 commit comments

Comments
 (0)