Skip to content

Commit 4a66ff3

Browse files
committed
Update ParagraphStep parameters
1 parent 00d3422 commit 4a66ff3

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

SequenceAnalysis/pipeline_code/extra_tools_install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,8 @@ then
188188
unzip paragraph-v2.4a-binary.zip
189189
rm paragraph-v2.4a-binary.zip
190190

191+
python3 -m pip install pysam intervaltree
192+
191193
cd ../
192194
cp -R paragraph $LKTOOLS_DIR
193195
ln -s ${LKTOOLS_DIR}/paragraph/bin/paragraph ${LKTOOLS_DIR}/paragraph

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/alignment/ParagraphStep.java

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public ParagraphStep()
5050
ToolParameterDescriptor.create("useOutputFileContainer", "Submit to Source File Workbook", "If checked, each job will be submitted to the same workbook as the input file, as opposed to submitting all jobs to the same workbook. This is primarily useful if submitting a large batch of files to process separately. This only applies if 'Run Separately' is selected.", "checkbox", new JSONObject(){{
5151
put("checked", false);
5252
}}, false),
53-
ToolParameterDescriptor.create("debug", "Debug Logging", "If checked, --debug will be passed to paragraph to increase logging", "checkbox", new JSONObject(){{
53+
ToolParameterDescriptor.create("verbose", "Verbose Logging", "If checked, --verbose will be passed to paragraph to increase logging", "checkbox", new JSONObject(){{
5454
put("checked", false);
5555
}}, false),
5656
ToolParameterDescriptor.create("retrieveReferenceSeq", "Retrieve Reference Sequence", "If checked, --debug will be passed to paragraph to increase logging", "checkbox", new JSONObject(){{
@@ -164,7 +164,24 @@ else if (!svVcf.exists())
164164
depthArgs.add(threads.toString());
165165
}
166166

167-
new SimpleScriptWrapper(ctx.getLogger()).execute(depthArgs);
167+
File doneFile = new File(ctx.getWorkingDirectory(), "idxdepth.done");
168+
ctx.getFileManager().addIntermediateFile(doneFile);
169+
if (doneFile.exists())
170+
{
171+
ctx.getLogger().info("idxdepth already performed, skipping");
172+
}
173+
else
174+
{
175+
new SimpleScriptWrapper(ctx.getLogger()).execute(depthArgs);
176+
try
177+
{
178+
FileUtils.touch(doneFile);
179+
}
180+
catch (IOException e)
181+
{
182+
throw new PipelineJobException(e);
183+
}
184+
}
168185

169186
if (!coverageJson.exists())
170187
{
@@ -174,7 +191,7 @@ else if (!svVcf.exists())
174191

175192
// Should produce a simple text file:
176193
// id path depth read length
177-
// TNPRC-IB18 ../IB18.cram 29.77 150
194+
// IB18 ../IB18.cram 29.77 150
178195
File coverageFile = new File(ctx.getWorkingDirectory(), "coverage.txt");
179196
String rgId = null;
180197
try (PrintWriter writer = PrintWriters.getPrintWriter(coverageFile); SamReader reader = SamReaderFactory.makeDefault().open(so.getFile()))
@@ -235,7 +252,7 @@ else if (!svVcf.exists())
235252
}
236253

237254
paragraphArgs.add("--scratch-dir");
238-
paragraphArgs.add(scratchDir.getPath());
255+
paragraphArgs.add("/work/" + scratchDir.getName());
239256

240257
ctx.getFileManager().addIntermediateFile(scratchDir);
241258

@@ -247,11 +264,7 @@ else if (!svVcf.exists())
247264
paragraphArgs.add("-m");
248265
paragraphArgs.add("/work/" + coverageFile.getName());
249266

250-
if (ctx.getParams().optBoolean("debug", false))
251-
{
252-
paragraphArgs.add("--debug");
253-
}
254-
else
267+
if (ctx.getParams().optBoolean("verbose", false))
255268
{
256269
paragraphArgs.add("--verbose");
257270
}

0 commit comments

Comments
 (0)