Skip to content

Commit 392e1e8

Browse files
committed
Better error message of plink/pca
1 parent 93bcb7b commit 392e1e8

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

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

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ public void init(PipelineJob job, SequenceAnalysisJobSupport support, List<Seque
220220
for (SequenceOutputFile so : inputFiles)
221221
{
222222
Set<String> duplicates = new HashSet<>();
223+
Set<String> missing = new HashSet<>();
223224
try (VCFFileReader reader = new VCFFileReader(so.getFile()))
224225
{
225226
VCFHeader header = reader.getFileHeader();
@@ -243,17 +244,26 @@ public void init(PipelineJob job, SequenceAnalysisJobSupport support, List<Seque
243244
{
244245
writer.println(sample + "\t" + applications.iterator().next());
245246
}
246-
else
247+
else if (applications.size() > 1)
247248
{
248249
duplicates.add(sample);
249250
}
251+
else
252+
{
253+
missing.add(sample);
254+
}
250255
}
251256
}
252257

253258
if (!duplicates.isEmpty())
254259
{
255260
throw new PipelineJobException("More than one readset with the given name found for the following samples: " + StringUtils.join(duplicates, ","));
256261
}
262+
263+
if (!missing.isEmpty())
264+
{
265+
throw new PipelineJobException("No matching readsets with the given name found for the following samples: " + StringUtils.join(missing, ","));
266+
}
257267
}
258268
}
259269
catch (IOException e)

0 commit comments

Comments
 (0)