Skip to content

Commit 713e475

Browse files
committed
Add better error message to PrintReadsContainingStep
1 parent 303c8fb commit 713e475

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/preprocessing/PrintReadsContainingStep.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import org.apache.log4j.Logger;
55
import org.jetbrains.annotations.Nullable;
66
import org.json.JSONObject;
7+
import org.labkey.api.pipeline.PipelineJob;
78
import org.labkey.api.pipeline.PipelineJobException;
89
import org.labkey.api.sequenceanalysis.SequenceAnalysisService;
910
import org.labkey.api.sequenceanalysis.pipeline.AbstractPipelineStepProvider;
@@ -37,7 +38,7 @@ public Provider()
3738
super("PrintReadsContaining", "Filter Reads By Sequence Motifs", "PrintReadsContaining", "This step filters input reads and will output only reads containing the provided sequence(s).", Arrays.asList(
3839
ToolParameterDescriptor.createCommandLineParam(CommandLineParam.createSwitch("--matchAllExpressions"), "matchAllExpressions", "Match All Expressions", "If checked, the sequence must match all expressions.", "checkbox", null, false),
3940
ToolParameterDescriptor.createCommandLineParam(CommandLineParam.create("--editDistance"), "editDistance", "Edit Distance", "If provided, the tool will perform fuzzy matching, allowing hits with up to this many mismatches. Be aware, if this is used, the query expression must be bases (ATCG) only.", "ldk-integerfield", null, null),
40-
ToolParameterDescriptor.create("readExpressions", "Read Expressions (both)", "The list of expressions to test, one per line. Expressions can be simple strings or a java regular expression. The default is to retain a read pair matching any of these.", "sequenceanalysis-trimmingtextarea", new JSONObject(){{
41+
ToolParameterDescriptor.create("readExpressions", "Read Expressions (either)", "The list of expressions to test, one per line. Expressions can be simple strings or a java regular expression. The default is to retain a read pair where either reads matches at least one of these.", "sequenceanalysis-trimmingtextarea", new JSONObject(){{
4142
put("replaceAllWhitespace", false);
4243
put("width", 400);
4344
}}, null),
@@ -97,6 +98,7 @@ public PreprocessingStep.Output processInputFile(File inputFile, @Nullable File
9798
Pair<File, File> outputs = getWrapper().execute(inputFile, inputFile2, output1, output2, extraArgs);
9899
if (!SequencePipelineService.get().hasMinLineCount(outputs.first, 4))
99100
{
101+
getPipelineCtx().getJob().setStatus(PipelineJob.TaskStatus.error, "No passing reads were found");
100102
throw new PipelineJobException("No passing reads were found: " + inputFile.getPath());
101103
}
102104

0 commit comments

Comments
 (0)