Skip to content

Commit 269a91e

Browse files
committed
Always trim output from Bcftools
1 parent 5a6dd9a commit 269a91e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/pipeline/ProcessVariantsHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -528,7 +528,7 @@ public static String getVCFLineCount(File vcf, Logger log, boolean passOnly, boo
528528
String cat = vcf.getName().endsWith(".gz") ? "zcat" : "cat";
529529
SimpleScriptWrapper wrapper = new SimpleScriptWrapper(null);
530530

531-
String ret = wrapper.executeWithOutput(Arrays.asList("/bin/bash", "-c", cat + " \"" + vcf.getPath() + "\" | grep -v \"#\" | " + (passOnly ? "awk ' $7 == \"PASS\" || $7 == \"\\.\" ' | " : "") + "wc -l | awk \" { print $1 } \""));
531+
String ret = StringUtils.trimToNull(wrapper.executeWithOutput(Arrays.asList("/bin/bash", "-c", cat + " \"" + vcf.getPath() + "\" | grep -v \"#\" | " + (passOnly ? "awk ' $7 == \"PASS\" || $7 == \"\\.\" ' | " : "") + "wc -l | awk \" { print $1 } \"")));
532532

533533
//NOTE: unsure how to get awk to omit this warning, so discard it:
534534
//the warning is: escape '\.' treated as plain '.'

0 commit comments

Comments
 (0)