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
This commit is contained in:
hanna 2009-07-14 02:03:36 +00:00
parent a1d33f8791
commit 0f6bfaaf73
1 changed files with 5 additions and 0 deletions

View File

@ -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<String> intersectingSequenceNames = new HashSet<String>(readsSequenceNames);
intersectingSequenceNames.retainAll(referenceSequenceNames);