Skip to content

Commit 21e2607

Browse files
committed
PBSV call bugfixes
1 parent dbc01a9 commit 21e2607

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/analysis/PbsvJointCallingHandler.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,11 @@ public void processFilesRemote(List<SequenceOutputFile> inputFiles, JobContext c
187187

188188
private File runPbsvCall(JobContext ctx, List<File> inputs, ReferenceGenome genome, String outputBaseName, @Nullable String contig) throws PipelineJobException
189189
{
190+
if (inputs.isEmpty())
191+
{
192+
throw new PipelineJobException("No inputs provided");
193+
}
194+
190195
File vcfOut = new File(ctx.getOutputDir(), outputBaseName + ".vcf");
191196
File doneFile = new File(ctx.getOutputDir(), outputBaseName + ".done");
192197
ctx.getFileManager().addIntermediateFile(doneFile);
@@ -227,7 +232,7 @@ private File runPbsvCall(JobContext ctx, List<File> inputs, ReferenceGenome geno
227232

228233
for (File s : inputs)
229234
{
230-
String ret = StringUtils.trimToNull(runner.executeWithOutput(Arrays.asList("/bin/bash", "-c", tabix.getExe().getPath() + " -l '" + s.getPath() + "' | grep -e '" + contig + "' | wc -l")));
235+
String ret = StringUtils.trimToNull(runner.executeWithOutput(Arrays.asList("/bin/bash", "-c", tabix.getExe().getPath() + " -l '" + s.getPath() + "' | awk \" { $1 == '" + contig + "' } \" | wc -l")));
231236
if ("0".equals(ret))
232237
{
233238
ctx.getLogger().info("Sample is missing contig: " + contig + ", skipping: " + s.getPath());

0 commit comments

Comments
 (0)