@@ -18,7 +18,7 @@ def verify_mult_exon_skip(event, gene, counts_segments, counts_edges, options):
1818 # (3) avg inclusion count inner exons >= threshold
1919 # (4) skip count >= threshold
2020
21- info = [1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
21+ info = np . array ( [1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], dtype = 'float' )
2222 # (0) valid, (1) exon_pre_cov, (2) exons_cov, (3) exon_aft_cov
2323 # (4) exon_pre_exon_conf, (5) exon_exon_aft_conf, (6) exon_pre_exon_aft_conf
2424 # (7) sum_inner_exon_conf, (8) num_inner_exon, (9) len_inner_exon
@@ -102,7 +102,7 @@ def verify_intron_retention(event, gene, counts_segments, counts_edges, counts_s
102102 # (0) counts meet criteria for min_retention_cov, min_retention_region and min_retetion_rel_cov
103103 # (1) min_non_retention_count >= threshold
104104
105- info = [1 , 0 , 0 , 0 , 0 , 0 ]
105+ info = np . array ( [1 , 0 , 0 , 0 , 0 , 0 ], dtype = 'float' )
106106 # (0) valid, (1) intron_cov, (2) exon1_cov, (3), exon2_cov
107107 # (4) intron_conf, (5) intron_cov_region
108108
@@ -169,7 +169,7 @@ def verify_exon_skip(event, gene, counts_segments, counts_edges, options):
169169 # (2) inclusion count of second intron >= threshold
170170 # (3) skip count of exon >= threshold
171171
172- info = [1 , 0 , 0 , 0 , 0 , 0 , 0 ]
172+ info = np . array ( [1 , 0 , 0 , 0 , 0 , 0 , 0 ], dtype = 'float' )
173173 # (0) valid, (1) exon_cov, (2) exon_pre_cov, (3) exon_aft_cov,
174174 # (4) exon_pre_exon_conf, (5) exon_exon_aft_conf, (6) exon_pre_exon_aft_conf
175175
@@ -236,7 +236,7 @@ def verify_alt_prime(event, gene, counts_segments, counts_edges, options):
236236 # (0) coverage of diff region is at least FACTOR * coverage constant region
237237 # (1) both alternative introns are >= threshold
238238
239- info = [1 , 0 , 0 , 0 , 0 ]
239+ info = np . array ( [1 , 0 , 0 , 0 , 0 ], dtype = 'float' )
240240 # (0) valid, (1) exon_diff_cov, (2) exon_const_cov
241241 # (3) intron1_conf, (4) intron2_conf
242242
@@ -332,7 +332,7 @@ def verify_mutex_exons(event, gene, counts_segments, counts_edges, options):
332332 # (2) both introns neighboring first alt exon are confirmed >= threshold
333333 # (3) both introns neighboring second alt exon are confirmed >= threshold
334334
335- info = [1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
335+ info = np . array ( [1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], dtype = 'float' )
336336 # (0) valid, (1) exon_pre_cov, (2) exon1_cov, (3) exon2_cov, (4) exon_aft_cov,
337337 # (5) exon_pre_exon1_conf, (6) exon_pre_exon2_conf, (7) exon1_exon_aft_conf, (8) exon2_exon_aft_conf
338338
@@ -513,9 +513,9 @@ def verify_all_events(ev, strain_idx=None, list_bam=None, event_type=None, optio
513513
514514 ev [i ].verified .append (ver )
515515 if s_idx == 0 :
516- counts .append (np .array ([ info ], dtype = 'float' ) )
516+ counts .append (info [ np .newaxis , :] )
517517 else :
518- counts [- 1 ] = np .r_ [ counts [- 1 ], np .array ([ info ], dtype = 'float' )]
518+ counts [- 1 ] = np .append ( counts [- 1 ], info [ np .newaxis , : ], axis = 0 )
519519 ev [i ].verified = np .array (ev [i ].verified , dtype = 'bool' )
520520
521521 IN .close ()
@@ -532,18 +532,18 @@ def verify_empty(event_type):
532532
533533 if event_type == 'exon_skip' :
534534 verified = [0 , 0 , 0 , 0 ]
535- info = [1 , 0 , 0 , 0 , 0 , 0 , 0 ]
535+ info = np . array ( [1 , 0 , 0 , 0 , 0 , 0 , 0 ], dtype = 'float' )
536536 elif event_type in ['alt_3prime' , 'alt_5prime' ]:
537537 verified = [0 , 0 ]
538- info = [1 , 0 , 0 , 0 , 0 ]
538+ info = np . array ( [1 , 0 , 0 , 0 , 0 ], dtype = 'float' )
539539 elif event_type == 'intron_retention' :
540540 verified = [0 , 0 ]
541- info = [1 , 0 , 0 , 0 , 0 , 0 ]
541+ info = np . array ( [1 , 0 , 0 , 0 , 0 , 0 ], dtype = 'float' )
542542 elif event_type == 'mult_exon_skip' :
543543 verified = [0 , 0 , 0 , 0 , 0 ]
544- info = [1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
544+ info = np . array ( [1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], dtype = 'float' )
545545 elif event_type == 'mutex_exons' :
546546 verified = [0 , 0 , 0 , 0 ]
547- info = [1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ]
547+ info = np . array ( [1 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 ], dtype = 'float' )
548548
549549 return (verified , info )
0 commit comments