From 0f6bfaaf73cb0a87b155d5ed082d70207b8d9e35 Mon Sep 17 00:00:00 2001 From: hanna Date: Tue, 14 Jul 2009 02:03:36 +0000 Subject: [PATCH] Skip validation in case of no reads aligning. git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@1230 348d0f76-0448-11de-a6fe-93d51630548a --- .../broadinstitute/sting/gatk/executive/MicroScheduler.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java b/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java index 029ad0c4e..89720b8cc 100755 --- a/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java +++ b/java/src/org/broadinstitute/sting/gatk/executive/MicroScheduler.java @@ -308,6 +308,11 @@ public abstract class MicroScheduler { for( SAMSequenceRecord dictionaryEntry: referenceDictionary.getSequences() ) referenceSequenceNames.add(dictionaryEntry.getSequenceName()); + if( readsSequenceNames.size() == 0 ) { + logger.info("Reads file is unmapped. Skipping validation against reference."); + return; + } + // If there's no overlap between reads and reference, data will be bogus. Throw an exception. Set intersectingSequenceNames = new HashSet(readsSequenceNames); intersectingSequenceNames.retainAll(referenceSequenceNames);