#NEWLINE# def _getPyvcfVariants( self , referenceName , startPosition = 0 , endPosition = ( 2 ** 30 ) ) : #NEWLINE# #INDENT# '\n        variants with in interval [startPosition, endPosition)\n        ' #NEWLINE# localVariants = [ ] #NEWLINE# for variant in self . _variantRecords : #NEWLINE# #INDENT# case1 = ( ( variant . start <= startPosition ) and ( variant . end > startPosition ) ) #NEWLINE# case2 = ( ( variant . start > startPosition ) and ( variant . start < endPosition ) ) #NEWLINE# if ( ( variant . CHROM == variant ) and ( case1 or case2 ) ) : #NEWLINE# #INDENT# localVariants . append ( variant ) #NEWLINE# #UNINDENT# #UNINDENT# return localVariants