Skip to content

Commit 4ece83c

Browse files
committed
Debug sample name issue
1 parent fb79ce5 commit 4ece83c

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -382,6 +382,16 @@ public static File processVCF(File input, Integer libraryId, JobContext ctx, Res
382382

383383
for (PipelineStepCtx<VariantProcessingStep> stepCtx : providers)
384384
{
385+
ctx.getLogger().info("Starting to run: " + stepCtx.getProvider().getLabel());
386+
387+
//To debug sample name issue:
388+
try (VCFFileReader reader = new VCFFileReader(input))
389+
{
390+
VCFHeader header = reader.getFileHeader();
391+
ctx.getLogger().info("Total samples: " + header.getSampleNamesInOrder().size());
392+
ctx.getLogger().info("Sample names: " + StringUtils.join(header.getSampleNamesInOrder(), ","));
393+
}
394+
385395
ctx.getJob().setStatus(PipelineJob.TaskStatus.running, "Running: " + stepCtx.getProvider().getLabel());
386396
stepIdx++;
387397

@@ -431,6 +441,14 @@ public static File processVCF(File input, Integer libraryId, JobContext ctx, Res
431441
ctx.getJob().getLogger().info("passing variants: " + getVCFLineCount(currentVCF, ctx.getJob().getLogger(), true));
432442
ctx.getJob().getLogger().debug("index exists: " + (new File(currentVCF.getPath() + ".tbi")).exists());
433443

444+
//To debug sample name issue:
445+
try (VCFFileReader reader = new VCFFileReader(input))
446+
{
447+
VCFHeader header = reader.getFileHeader();
448+
ctx.getLogger().debug("Total samples in output: " + header.getSampleNamesInOrder().size());
449+
ctx.getLogger().debug("Sample names in output: " + StringUtils.join(header.getSampleNamesInOrder(), ","));
450+
}
451+
434452
try
435453
{
436454
SequenceAnalysisService.get().ensureVcfIndex(currentVCF, ctx.getJob().getLogger(), true);

0 commit comments

Comments
 (0)