private static QueryInterval convertSimpleIntervalToQueryInterval ( final Interval interval , final SAMSequenceDictionary sequenceDictionary ) { if ( interval == null ) { throw new IllegalArgumentException ( "interval may not be null" ) ; } if ( sequenceDictionary == null ) { throw new IllegalArgumentException ( "sequence dictionary may not be null" ) ; } final int contigIndex = sequenceDictionary . getSequenceIndex ( interval . getContig ( ) ) ; if ( contigIndex == - 1 ) { throw new IllegalArgumentException ( "Contig " + interval . getContig ( ) + " not present in reads sequence " + "dictionary" ) ; } return new QueryInterval ( contigIndex , interval . getStart ( ) , interval . getEnd ( ) ) ; }
Converts an interval in SimpleInterval format into an htsjdk QueryInterval .