Skip to content

Commit 16e6f74

Browse files
committed
Add warning message to KING step
1 parent c4c8e3f commit 16e6f74

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

SequenceAnalysis/src/org/labkey/sequenceanalysis/run/variant/KingInferenceStep.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,15 @@ public Output processVariants(File inputVCF, File outputDirectory, ReferenceGeno
8888
return NumberUtils.isCreatable(name) || "X".equalsIgnoreCase(name) || "Y".equalsIgnoreCase(name);
8989
}).map(SAMSequenceRecord::getSequenceName).toList();
9090

91-
plinkArgs.add("--chr");
92-
plinkArgs.add(StringUtils.join(toKeep, ","));
91+
if (toKeep.size() == 0)
92+
{
93+
getPipelineCtx().getLogger().info("The option to limit to chromosomes was selected, but no contigs were foudn with numeric names or names beginning with chr. All contigs will be used.");
94+
}
95+
else
96+
{
97+
plinkArgs.add("--chr");
98+
plinkArgs.add(StringUtils.join(toKeep, ","));
99+
}
93100
}
94101

95102
plinkArgs.add("--allow-extra-chr");

0 commit comments

Comments
 (0)