#NEWLINE# def testJunctionsIsoforms( self ) : #NEWLINE# #INDENT# gtf = GTF ( fileobj = StringIO . StringIO ( 'test1|test|exon|10|20|0|+|.|gene_id "foo1"; transcript_id "bar1"; isoform_id "iso1"\ntest1|test|exon|30|40|0|+|.|gene_id "foo1"; transcript_id "bar1"; isoform_id "iso1"\ntest1|test|exon|90|100|0|+|.|gene_id "foo1"; transcript_id "bar1"; isoform_id "iso1"\ntest1|test|exon|10|20|0|+|.|gene_id "foo1"; transcript_id "bar2"; isoform_id "iso1"\ntest1|test|exon|50|70|0|+|.|gene_id "foo1"; transcript_id "bar2"; isoform_id "iso1"\ntest1|test|exon|90|100|0|+|.|gene_id "foo1"; transcript_id "bar2"; isoform_id "iso1"\n' . replace ( '|' , '\t' ) ) , quiet = True ) #NEWLINE# valid = '>test1:16-20,29-33\nATGCGCGC\n>test1:16-20,49-53\nATGCCTGA\n>test1:16-20,89-93\nATGCTCGA\n>test1:36-40,49-53\nGATCCTGA\n>test1:36-40,89-93\nGATCTCGA\n>test1:66-70,89-93\nATCGTCGA\n' #NEWLINE# out = StringIO . StringIO ( '' ) #NEWLINE# ngsutils . gtf . junctions . gtf_junctions ( self , fa , fragment_size = 4 , min_size = 8 , out = out , quiet = True ) #NEWLINE# self . assertEqual ( out . getvalue ( ) , valid )