diff --git a/bookend/core/assemble.py b/bookend/core/assemble.py index 5add2d8..1eae56d 100644 --- a/bookend/core/assemble.py +++ b/bookend/core/assemble.py @@ -91,6 +91,9 @@ def __init__(self, args): 'sj':None, } config.update(long_defaults) + elif self.input_file.header.get("HD",{}).get("SO",'unsorted') != 'coordinate': + print("ERROR: BAM input reads must be sorted by coordinate.") + sys.exit(1) self.dataset = RNAseqDataset(chrom_array=self.input_file.header.references, config=config) elif self.file_type == 'elr.gz': diff --git a/bookend/core/bam_to_elr.py b/bookend/core/bam_to_elr.py index 089f4d0..6f468f2 100644 --- a/bookend/core/bam_to_elr.py +++ b/bookend/core/bam_to_elr.py @@ -15,7 +15,6 @@ class BAMtoELRconverter: def __init__(self, args): """Parses input arguments for converting BAM to ELR""" - print(args) self.source = args['SOURCE'] self.genome = args['GENOME'] self.reference = args['REFERENCE'] @@ -139,6 +138,10 @@ def __init__(self, args): if self.source is None: self.source = self.bam_in.header['PG'][0]['ID'] + if self.bam_in.header.get("HD",{}).get("SO",'unsorted') == 'coordinate': + print("WARNING: BAM sorted by coordinate. Mate pairs will not be merged.") + print("Sort by read name (samtools sort -n) if using paired-end reads.") + self.dataset = RNAseqDataset( chrom_array=self.bam_in.header.references, chrom_lengths=list(self.bam_in.header.lengths), diff --git a/bookend/core/cython_utils/_rnaseq_utils.c b/bookend/core/cython_utils/_rnaseq_utils.c index 613418e..297a531 100644 --- a/bookend/core/cython_utils/_rnaseq_utils.c +++ b/bookend/core/cython_utils/_rnaseq_utils.c @@ -1256,7 +1256,7 @@ typedef npy_double __pyx_t_5numpy_double_t; */ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; -/* "_rnaseq_utils.pyx":11 +/* "_rnaseq_utils.pyx":12 * from ast import literal_eval * import copy * ctypedef unsigned char uint8 # <<<<<<<<<<<<<< @@ -1265,7 +1265,7 @@ typedef npy_longdouble __pyx_t_5numpy_longdouble_t; */ typedef unsigned char __pyx_t_13_rnaseq_utils_uint8; -/* "_rnaseq_utils.pyx":12 +/* "_rnaseq_utils.pyx":13 * import copy * ctypedef unsigned char uint8 * ctypedef np.float32_t float32 # <<<<<<<<<<<<<< @@ -1374,14 +1374,13 @@ struct __pyx_opt_args_13_rnaseq_utils_is_homopolymer; struct __pyx_ctuple_int__and_int__and_int__and_int; typedef struct __pyx_ctuple_int__and_int__and_int__and_int __pyx_ctuple_int__and_int__and_int__and_int; struct __pyx_opt_args_13_rnaseq_utils_parse_tag; -struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_determine_strand; -struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_get_splice_info; -struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_orient_read_by_softclip; struct __pyx_ctuple_int__and_int__and_int; typedef struct __pyx_ctuple_int__and_int__and_int __pyx_ctuple_int__and_int__and_int; +struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_determine_strand; +struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_orient_read_by_softclip; struct __pyx_opt_args_13_rnaseq_utils_get_gaps; -/* "_rnaseq_utils.pyx":23 +/* "_rnaseq_utils.pyx":24 * cdef public bint s_tag, e_tag, capped, complete, is_reference, condensed * cdef public dict attributes * cdef public (int, int) span # <<<<<<<<<<<<<< @@ -1393,7 +1392,7 @@ struct __pyx_ctuple_int__and_int { int f1; }; -/* "_rnaseq_utils.pyx":25 +/* "_rnaseq_utils.pyx":26 * cdef public (int, int) span * cdef public float weight, coverage * cdef public (float, float, float) tripleweight # <<<<<<<<<<<<<< @@ -1406,7 +1405,7 @@ struct __pyx_ctuple_float__and_float__and_float { float f2; }; -/* "_rnaseq_utils.pyx":189 +/* "_rnaseq_utils.pyx":190 * return False * * cpdef bint splice_match(self, RNAseqMapping other, bint ignore_ends=True): # <<<<<<<<<<<<<< @@ -1418,7 +1417,7 @@ struct __pyx_opt_args_13_rnaseq_utils_13RNAseqMapping_splice_match { int ignore_ends; }; -/* "_rnaseq_utils.pyx":226 +/* "_rnaseq_utils.pyx":227 * return False * * cpdef bint is_compatible(self, RNAseqMapping other, bint ignore_ends=False, bint ignore_source=False): # <<<<<<<<<<<<<< @@ -1431,7 +1430,7 @@ struct __pyx_opt_args_13_rnaseq_utils_13RNAseqMapping_is_compatible { int ignore_source; }; -/* "_rnaseq_utils.pyx":298 +/* "_rnaseq_utils.pyx":299 * return True * * cpdef str get_node_labels(self, bint record_artifacts=False, bint condense=False): # <<<<<<<<<<<<<< @@ -1444,7 +1443,7 @@ struct __pyx_opt_args_13_rnaseq_utils_13RNAseqMapping_get_node_labels { int condense; }; -/* "_rnaseq_utils.pyx":320 +/* "_rnaseq_utils.pyx":321 * return ''.join([startchar]+[gapchar if i else '..' for i in self.splice]+[endchar]) * * cpdef write_as_elr(self, bint as_string=True, bint record_artifacts=False, bint condense=False, bint endweights=False): # <<<<<<<<<<<<<< @@ -1459,7 +1458,7 @@ struct __pyx_opt_args_13_rnaseq_utils_13RNAseqMapping_write_as_elr { int endweights; }; -/* "_rnaseq_utils.pyx":351 +/* "_rnaseq_utils.pyx":352 * return elr_line * * cpdef write_as_bed(self, chrom_array, source_array, as_string=True, score_column='weight', record_artifacts=False, name_attr=None, color=None, condense=False, longStart=None, longEnd=None): # <<<<<<<<<<<<<< @@ -1478,7 +1477,7 @@ struct __pyx_opt_args_13_rnaseq_utils_13RNAseqMapping_write_as_bed { PyObject *longEnd; }; -/* "_rnaseq_utils.pyx":619 +/* "_rnaseq_utils.pyx":621 * self.chrom_index += 1 * * cpdef add_read_from_BED(self, bed_line, source_string=None, s_tag=False, e_tag=False, capped=False, gaps_are_junctions=False): # <<<<<<<<<<<<<< @@ -1494,7 +1493,7 @@ struct __pyx_opt_args_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED { PyObject *gaps_are_junctions; }; -/* "_rnaseq_utils.pyx":678 +/* "_rnaseq_utils.pyx":680 * self.read_list += new_read_list * * cpdef pop_read(self, read_format='elr', as_string=True): # <<<<<<<<<<<<<< @@ -1507,7 +1506,7 @@ struct __pyx_opt_args_13_rnaseq_utils_13RNAseqDataset_pop_read { PyObject *as_string; }; -/* "_rnaseq_utils.pyx":1405 +/* "_rnaseq_utils.pyx":1407 * return source_lookup * * cpdef build_depth_matrix(int leftmost, int rightmost, tuple reads, bint use_attributes=True, bint splice=True): # <<<<<<<<<<<<<< @@ -1520,7 +1519,7 @@ struct __pyx_opt_args_13_rnaseq_utils_build_depth_matrix { int splice; }; -/* "_rnaseq_utils.pyx":1506 +/* "_rnaseq_utils.pyx":1508 * return depth_matrix, J_plus, J_minus * * cpdef str bedgraph(str chrom, int leftmost, np.ndarray depth_matrix, str seqtype='', int strand=0): # <<<<<<<<<<<<<< @@ -1533,7 +1532,7 @@ struct __pyx_opt_args_13_rnaseq_utils_bedgraph { int strand; }; -/* "_rnaseq_utils.pyx":1582 +/* "_rnaseq_utils.pyx":1584 * * * cdef parse_BED_line(bed_line, chrom_dict, source_dict, source_string=None, s_tag=False, e_tag=False, capped=False, gaps_are_junctions=False, keep_readname=False): # <<<<<<<<<<<<<< @@ -1550,7 +1549,7 @@ struct __pyx_opt_args_13_rnaseq_utils_parse_BED_line { PyObject *keep_readname; }; -/* "_rnaseq_utils.pyx":1825 +/* "_rnaseq_utils.pyx":1777 * * * cpdef parse_SAM_CIGAR(int pos, list cigartuples, str mdstring, float error_rate=0.1, bint quality_filter=False): # <<<<<<<<<<<<<< @@ -1563,7 +1562,7 @@ struct __pyx_opt_args_13_rnaseq_utils_parse_SAM_CIGAR { int quality_filter; }; -/* "_rnaseq_utils.pyx":1913 +/* "_rnaseq_utils.pyx":1865 * * * cdef bint is_homopolymer(str string, float threshold=0.8): # <<<<<<<<<<<<<< @@ -1575,7 +1574,7 @@ struct __pyx_opt_args_13_rnaseq_utils_is_homopolymer { float threshold; }; -/* "_rnaseq_utils.pyx":1939 +/* "_rnaseq_utils.pyx":1891 * * * cdef (bint, bint, int, int) parse_tag(str string, str tagsplit='_TAG='): # <<<<<<<<<<<<<< @@ -1593,7 +1592,20 @@ struct __pyx_opt_args_13_rnaseq_utils_parse_tag { PyObject *tagsplit; }; -/* "_rnaseq_utils.pyx":2236 +/* "_rnaseq_utils.pyx":2211 + * return strand, ranges, canonical + * + * cdef (int, int, int) shift_junction(self, str chrom, int left, int right, int strand): # <<<<<<<<<<<<<< + * """Returns a new left/right border of an intron and its strand.""" + * cdef int i, js + */ +struct __pyx_ctuple_int__and_int__and_int { + int f0; + int f1; + int f2; +}; + +/* "_rnaseq_utils.pyx":2280 * return Nmap * * cdef (int, int) determine_strand(self, line, bint stranded, bint reverse=False): # <<<<<<<<<<<<<< @@ -1605,20 +1617,8 @@ struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_determine_strand { int reverse; }; -/* "_rnaseq_utils.pyx":2274 - * return alignment_strand - * - * cdef tuple get_splice_info(self, list ranges, set introns, str chrom, int alignment_strand, bint remove_noncanonical=False): # <<<<<<<<<<<<<< - * """Returns a list of booleans denoting whether each gap - * between ranges is a splice junction or not on the given alignment strand.""" - */ -struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_get_splice_info { - int __pyx_n; - int remove_noncanonical; -}; - -/* "_rnaseq_utils.pyx":2301 - * return ranges, splice +/* "_rnaseq_utils.pyx":2326 + * return strand * * cdef int orient_read_by_softclip(self, str seq, int head, int tail, int eval_length=15): # <<<<<<<<<<<<<< * """Assume end labels are present as softclipped sequences on @@ -1629,20 +1629,7 @@ struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_orient_read_by_softclip { int eval_length; }; -/* "_rnaseq_utils.pyx":2317 - * return strand - * - * cdef (bint, bint, bint) filter_labels_by_softclip_length(self, bint s_tag, bint e_tag, bint capped, bint fiveprime, bint threeprime, int strand, int head, int tail, int max_headclip): # <<<<<<<<<<<<<< - * """Determines whether the s_tag, e_tag and capped parameters - * should be removed an alignment that has softclipping on its edges.""" - */ -struct __pyx_ctuple_int__and_int__and_int { - int f0; - int f1; - int f2; -}; - -/* "_rnaseq_utils.pyx":2617 +/* "_rnaseq_utils.pyx":2642 * return False * * cpdef list get_gaps(np.ndarray[float, ndim=1] array, int maxgap, threshold = float(1)): # <<<<<<<<<<<<<< @@ -1654,7 +1641,7 @@ struct __pyx_opt_args_13_rnaseq_utils_get_gaps { PyObject *threshold; }; -/* "_rnaseq_utils.pyx":18 +/* "_rnaseq_utils.pyx":19 * ############################################## * ELdata = namedtuple('ELdata', 'chrom source strand ranges splice s_tag e_tag capped weight condensed') * cdef class RNAseqMapping(): # <<<<<<<<<<<<<< @@ -1685,7 +1672,7 @@ struct __pyx_obj_13_rnaseq_utils_RNAseqMapping { }; -/* "_rnaseq_utils.pyx":481 +/* "_rnaseq_utils.pyx":482 * } * * cdef class RNAseqDataset(): # <<<<<<<<<<<<<< @@ -1735,7 +1722,7 @@ struct __pyx_obj_13_rnaseq_utils_RNAseqDataset { }; -/* "_rnaseq_utils.pyx":984 +/* "_rnaseq_utils.pyx":986 * * * cdef class AnnotationObject: # <<<<<<<<<<<<<< @@ -1760,7 +1747,7 @@ struct __pyx_obj_13_rnaseq_utils_AnnotationObject { }; -/* "_rnaseq_utils.pyx":1072 +/* "_rnaseq_utils.pyx":1074 * * * cdef class AnnotationDataset(RNAseqDataset): # <<<<<<<<<<<<<< @@ -1781,7 +1768,7 @@ struct __pyx_obj_13_rnaseq_utils_AnnotationDataset { }; -/* "_rnaseq_utils.pyx":1970 +/* "_rnaseq_utils.pyx":1922 * return s_tag, e_tag, s_len, e_len * * cdef class BAMobject: # <<<<<<<<<<<<<< @@ -1803,7 +1790,7 @@ struct __pyx_obj_13_rnaseq_utils_BAMobject { }; -/* "_rnaseq_utils.pyx":26 +/* "_rnaseq_utils.pyx":27 * cdef public float weight, coverage * cdef public (float, float, float) tripleweight * def __init__(self, input_data, attributes = None): # <<<<<<<<<<<<<< @@ -1816,7 +1803,7 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct____init__ { }; -/* "_rnaseq_utils.pyx":53 +/* "_rnaseq_utils.pyx":54 * * if '|' in str(input_data.weight): * tripleweight = tuple(float(s) for s in str(input_data.weight).split('|')) # <<<<<<<<<<<<<< @@ -1832,7 +1819,7 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_1_genexpr { }; -/* "_rnaseq_utils.pyx":1193 +/* "_rnaseq_utils.pyx":1195 * return children_out * * def generate_loci(self): # <<<<<<<<<<<<<< @@ -1860,7 +1847,7 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_2_generate_loci { }; -/* "_rnaseq_utils.pyx":1235 +/* "_rnaseq_utils.pyx":1237 * } * * def array_to_blocks(list arr): # <<<<<<<<<<<<<< @@ -1880,8 +1867,8 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_3_array_to_blocks { }; -/* "_rnaseq_utils.pyx":1802 - * return False +/* "_rnaseq_utils.pyx":1754 + * return 0 * * def parse_MD_string(str mdstring): # <<<<<<<<<<<<<< * """Creates a generator object to yield the elements @@ -1903,7 +1890,7 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_4_parse_MD_string { }; -/* "_rnaseq_utils.pyx":2459 +/* "_rnaseq_utils.pyx":2484 * return False * * def read_generator(fileconn, RNAseqDataset dataset, str file_type, int max_gap, float minimum_proportion): # <<<<<<<<<<<<<< @@ -1920,7 +1907,7 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_5_read_generator { PyObject *__pyx_v_file_type; PyObject *__pyx_v_fileconn; PyObject *__pyx_v_header_line; - int __pyx_9genexpr50__pyx_v_k; + int __pyx_9genexpr52__pyx_v_k; int __pyx_v_k; int __pyx_v_l; PyObject *__pyx_v_line; @@ -1929,9 +1916,9 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_5_read_generator { int __pyx_v_old_chrom; int __pyx_v_old_l; int __pyx_v_old_r; - struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr48__pyx_v_outread; - struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr49__pyx_v_outread; + struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr50__pyx_v_outread; struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr51__pyx_v_outread; + struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr53__pyx_v_outread; struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_v_outread; PyObject *__pyx_v_passed_positions; int __pyx_v_r; @@ -1947,7 +1934,7 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_5_read_generator { }; -/* "_rnaseq_utils.pyx":2539 +/* "_rnaseq_utils.pyx":2564 * fileconn.close() * * def generate_subchunks(list list_of_reads, list split_positions): # <<<<<<<<<<<<<< @@ -1961,7 +1948,7 @@ struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_6_generate_subchunks { int __pyx_v_lasti; PyObject *__pyx_v_list_of_reads; PyObject *__pyx_v_position; - int __pyx_9genexpr52__pyx_v_r; + int __pyx_9genexpr54__pyx_v_r; int __pyx_v_r; struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_v_read; int __pyx_v_sp; @@ -2050,7 +2037,7 @@ struct __pyx_memoryviewslice_obj { -/* "_rnaseq_utils.pyx":18 +/* "_rnaseq_utils.pyx":19 * ############################################## * ELdata = namedtuple('ELdata', 'chrom source strand ranges splice s_tag e_tag capped weight condensed') * cdef class RNAseqMapping(): # <<<<<<<<<<<<<< @@ -2082,7 +2069,7 @@ struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping { static struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *__pyx_vtabptr_13_rnaseq_utils_RNAseqMapping; -/* "_rnaseq_utils.pyx":481 +/* "_rnaseq_utils.pyx":482 * } * * cdef class RNAseqDataset(): # <<<<<<<<<<<<<< @@ -2109,7 +2096,7 @@ struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset { static struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *__pyx_vtabptr_13_rnaseq_utils_RNAseqDataset; -/* "_rnaseq_utils.pyx":984 +/* "_rnaseq_utils.pyx":986 * * * cdef class AnnotationObject: # <<<<<<<<<<<<<< @@ -2123,7 +2110,7 @@ struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationObject { static struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationObject *__pyx_vtabptr_13_rnaseq_utils_AnnotationObject; -/* "_rnaseq_utils.pyx":1072 +/* "_rnaseq_utils.pyx":1074 * * * cdef class AnnotationDataset(RNAseqDataset): # <<<<<<<<<<<<<< @@ -2139,7 +2126,7 @@ struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationDataset { static struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationDataset *__pyx_vtabptr_13_rnaseq_utils_AnnotationDataset; -/* "_rnaseq_utils.pyx":1970 +/* "_rnaseq_utils.pyx":1922 * return s_tag, e_tag, s_len, e_len * * cdef class BAMobject: # <<<<<<<<<<<<<< @@ -2149,13 +2136,14 @@ static struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationDataset *__pyx_vtabptr_ struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject { PyObject *(*generate_read)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int __pyx_skip_dispatch); + __pyx_ctuple_int__and_int__and_int (*shift_junction)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, int, int); PyObject *(*resolve_overlapping_mappings)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *); int (*get_mapping_number)(struct __pyx_obj_13_rnaseq_utils_BAMobject *); __pyx_ctuple_int__and_int (*determine_strand)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_determine_strand *__pyx_optional_args); int (*should_skip)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *); int (*fails_stringent_filters)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int, int, int, int, int); int (*get_alignment_strand)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int); - PyObject *(*get_splice_info)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, PyObject *, PyObject *, int, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_get_splice_info *__pyx_optional_args); + int (*check_sjdb)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, int); int (*orient_read_by_softclip)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, int, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_orient_read_by_softclip *__pyx_optional_args); __pyx_ctuple_int__and_int__and_int (*filter_labels_by_softclip_length)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int, int, int, int, int, int, int, int, int); int (*untemplated_upstream_g)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int, int, int, PyObject *, PyObject *, PyObject *); @@ -2821,6 +2809,9 @@ static int __Pyx_DelItem_Generic(PyObject *o, PyObject *j); static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list, int wraparound); +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + /* py_dict_values.proto */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d); @@ -3468,13 +3459,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fasta(struct __pyx_obj_13_rnaseq_utils_AnnotationDataset *__pyx_v_self, struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_v_transcript, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTHON_UNUSED struct __pyx_obj_13_rnaseq_utils_AnnotationDataset *__pyx_v_self, PyObject *__pyx_v_children, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_shift_junction(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_chrom, int __pyx_v_left, int __pyx_v_right, int __pyx_v_strand); /* proto*/ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings(CYTHON_UNUSED struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_mappings); /* proto*/ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto*/ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_determine_strand(CYTHON_UNUSED struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_line, int __pyx_v_stranded, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_determine_strand *__pyx_optional_args); /* proto*/ static int __pyx_f_13_rnaseq_utils_9BAMobject_should_skip(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_line); /* proto*/ static int __pyx_f_13_rnaseq_utils_9BAMobject_fails_stringent_filters(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, int __pyx_v_Nmap, int __pyx_v_match_length, int __pyx_v_head, int __pyx_v_tail, int __pyx_v_errors); /* proto*/ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_line, int __pyx_v_strand); /* proto*/ -static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_get_splice_info(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_ranges, PyObject *__pyx_v_introns, PyObject *__pyx_v_chrom, int __pyx_v_alignment_strand, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_get_splice_info *__pyx_optional_args); /* proto*/ +static int __pyx_f_13_rnaseq_utils_9BAMobject_check_sjdb(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_chrom, int __pyx_v_start, int __pyx_v_end); /* proto*/ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_seq, int __pyx_v_head, int __pyx_v_tail, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_orient_read_by_softclip *__pyx_optional_args); /* proto*/ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_filter_labels_by_softclip_length(CYTHON_UNUSED struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, int __pyx_v_s_tag, int __pyx_v_e_tag, int __pyx_v_capped, int __pyx_v_fiveprime, int __pyx_v_threeprime, int __pyx_v_strand, int __pyx_v_head, int __pyx_v_tail, int __pyx_v_max_headclip); /* proto*/ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, int __pyx_v_strand, int __pyx_v_head, int __pyx_v_tail, PyObject *__pyx_v_seq, PyObject *__pyx_v_chrom, PyObject *__pyx_v_ranges); /* proto*/ @@ -3644,8 +3636,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_e static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject *, int __pyx_skip_dispatch); /*proto*/ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *, int, int, int __pyx_skip_dispatch); /*proto*/ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *, PyObject *, int, int, PyObject *, int, int __pyx_skip_dispatch); /*proto*/ -static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_shift_junction(PyObject *, PyObject *, int, int, int, int); /*proto*/ -static int __pyx_f_13_rnaseq_utils_junction_is_canonical(PyObject *, PyObject *, int, int, int); /*proto*/ +static int __pyx_f_13_rnaseq_utils_motif_strand(PyObject *, PyObject *, int, int); /*proto*/ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_13_rnaseq_utils_parse_SAM_CIGAR *__pyx_optional_args); /*proto*/ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *, struct __pyx_opt_args_13_rnaseq_utils_is_homopolymer *__pyx_optional_args); /*proto*/ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse_tag(PyObject *, struct __pyx_opt_args_13_rnaseq_utils_parse_tag *__pyx_optional_args); /*proto*/ @@ -3815,10 +3806,13 @@ static const char __pyx_k_pop[] = "pop"; static const char __pyx_k_pos[] = "pos"; static const char __pyx_k_sam[] = "sam"; static const char __pyx_k_sum[] = "sum"; +static const char __pyx_k_sys[] = "sys"; static const char __pyx_k_zip[] = "zip"; static const char __pyx_k_ATAC[] = "ATAC"; static const char __pyx_k_CTAC[] = "CTAC"; static const char __pyx_k_CTGC[] = "CTGC"; +static const char __pyx_k_CTTC[] = "CTTC"; +static const char __pyx_k_GAAG[] = "GAAG"; static const char __pyx_k_GCAG[] = "GCAG"; static const char __pyx_k_GFF3[] = "GFF3"; static const char __pyx_k_GTAG[] = "GTAG"; @@ -3831,6 +3825,7 @@ static const char __pyx_k_base[] = "base"; static const char __pyx_k_copy[] = "copy"; static const char __pyx_k_dict[] = "__dict__"; static const char __pyx_k_diff[] = "diff"; +static const char __pyx_k_exit[] = "exit"; static const char __pyx_k_exon[] = "exon"; static const char __pyx_k_full[] = "full"; static const char __pyx_k_gaps[] = "gaps"; @@ -3951,6 +3946,7 @@ static const char __pyx_k_fortran[] = "fortran"; static const char __pyx_k_gene_id[] = "gene_id"; static const char __pyx_k_genexpr[] = "genexpr"; static const char __pyx_k_get_tag[] = "get_tag"; +static const char __pyx_k_introns[] = "introns"; static const char __pyx_k_isdigit[] = "isdigit"; static const char __pyx_k_lincRNA[] = "lincRNA"; static const char __pyx_k_lnc_RNA[] = "lnc_RNA"; @@ -4011,8 +4007,6 @@ static const char __pyx_k_IG_D_gene[] = "IG_D_gene"; static const char __pyx_k_IG_J_gene[] = "IG_J_gene"; static const char __pyx_k_IG_V_gene[] = "IG_V_gene"; static const char __pyx_k_Importing[] = "Importing {}..."; -static const char __pyx_k_Shifted_l[] = "Shifted l+{}"; -static const char __pyx_k_Shifted_r[] = "Shifted r+{}"; static const char __pyx_k_TR_C_gene[] = "TR_C_gene"; static const char __pyx_k_TR_D_gene[] = "TR_D_gene"; static const char __pyx_k_TR_J_gene[] = "TR_J_gene"; @@ -4023,6 +4017,7 @@ static const char __pyx_k_anno_type[] = "anno_type"; static const char __pyx_k_antisense[] = "antisense"; static const char __pyx_k_as_string[] = "as_string"; static const char __pyx_k_block_end[] = "block_end"; +static const char __pyx_k_canonical[] = "canonical"; static const char __pyx_k_cap_bonus[] = "cap_bonus"; static const char __pyx_k_condensed[] = "condensed"; static const char __pyx_k_enumerate[] = "enumerate"; @@ -4082,9 +4077,6 @@ static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_MemoryError[] = "MemoryError"; static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_RNase_P_RNA[] = "RNase_P_RNA"; -static const char __pyx_k_Shifted_l_2[] = "Shifted l-{}"; -static const char __pyx_k_Shifted_l_r[] = "Shifted l+{}r+{}"; -static const char __pyx_k_Shifted_r_2[] = "Shifted r-{}"; static const char __pyx_k_anno_string[] = "anno_string"; static const char __pyx_k_attr_format[] = "attr_format"; static const char __pyx_k_attr_string[] = "attr_string"; @@ -4137,7 +4129,6 @@ static const char __pyx_k_IG_pseudogene[] = "IG_pseudogene"; static const char __pyx_k_RNAseqDataset[] = "RNAseqDataset"; static const char __pyx_k_RNAseqMapping[] = "RNAseqMapping"; static const char __pyx_k_RNase_MRP_RNA[] = "RNase_MRP_RNA"; -static const char __pyx_k_Shifted_l_r_2[] = "Shifted l-{}r-{}"; static const char __pyx_k_StopIteration[] = "StopIteration"; static const char __pyx_k_antisense_RNA[] = "antisense_RNA"; static const char __pyx_k_chrom_lengths[] = "chrom_lengths"; @@ -4216,6 +4207,7 @@ static const char __pyx_k_nontranslating_CDS[] = "nontranslating_CDS"; static const char __pyx_k_primary_transcript[] = "primary_transcript"; static const char __pyx_k_strided_and_direct[] = ""; static const char __pyx_k_unitary_pseudogene[] = "unitary_pseudogene"; +static const char __pyx_k_adjust_splice_sites[] = "adjust_splice_sites"; static const char __pyx_k_remove_noncanonical[] = "remove_noncanonical"; static const char __pyx_k_RRRRRRRRRRRRRRRRRRRR[] = "RRRRRRRRRRRRRRRRRRRR"; static const char __pyx_k_child_key_transcript[] = "child_key_transcript"; @@ -4225,6 +4217,7 @@ static const char __pyx_k_processed_pseudogene[] = "processed_pseudogene"; static const char __pyx_k_processed_transcript[] = "processed_transcript"; static const char __pyx_k_strided_and_indirect[] = ""; static const char __pyx_k_contiguous_and_direct[] = ""; +static const char __pyx_k_evaluate_splice_sites[] = "evaluate_splice_sites"; static const char __pyx_k_init___locals_genexpr[] = "__init__..genexpr"; static const char __pyx_k_parent_key_transcript[] = "parent_key_transcript"; static const char __pyx_k_MemoryView_of_r_object[] = ""; @@ -4255,6 +4248,7 @@ static const char __pyx_k_Buffer_view_does_not_expose_stri[] = "Buffer view does static const char __pyx_k_Can_only_create_a_buffer_that_is[] = "Can only create a buffer that is contiguous in memory."; static const char __pyx_k_Cannot_assign_to_read_only_memor[] = "Cannot assign to read-only memoryview"; static const char __pyx_k_Cannot_create_writable_memory_vi[] = "Cannot create writable memory view from read-only memoryview"; +static const char __pyx_k_ERROR_splice_file_not_recognized[] = "ERROR: --splice file not recognized. Provide SJ.out.tab or BED6."; static const char __pyx_k_Empty_shape_tuple_for_cython_arr[] = "Empty shape tuple for cython.array"; static const char __pyx_k_For_BED12_GTF_GFF3_use_reference[] = "For BED12/GTF/GFF3, use --reference."; static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x58f1cad, 0xc9458fb, 0x1a371b8) = (attributes, capped, chrom, complete, condensed, coverage, e_len, e_tag, is_reference, ranges, s_len, s_tag, source, span, splice, strand, tripleweight, weight))"; @@ -4262,7 +4256,6 @@ static const char __pyx_k_Indirect_dimensions_not_supporte[] = "Indirect dimensi static const char __pyx_k_Invalid_mode_expected_c_or_fortr[] = "Invalid mode, expected 'c' or 'fortran', got %s"; static const char __pyx_k_Out_of_bounds_on_buffer_access_a[] = "Out of bounds on buffer access (axis %d)"; static const char __pyx_k_Unable_to_convert_item_to_object[] = "Unable to convert item to object"; -static const char __pyx_k_WARNING_splice_file_not_recogniz[] = "WARNING: --splice file not recognized. Provide SJ.out.tab or BED6."; static const char __pyx_k_bookend_core_cython_utils__fasta[] = "bookend.core.cython_utils._fasta_utils"; static const char __pyx_k_chrom_source_strand_ranges_splic[] = "chrom source strand ranges splice s_tag e_tag capped weight condensed"; static const char __pyx_k_got_differing_extents_in_dimensi[] = "got differing extents in dimension %d (got %d and %d)"; @@ -4319,6 +4312,7 @@ static PyObject *__pyx_n_u_CE; static PyObject *__pyx_n_u_COV; static PyObject *__pyx_n_u_CTAC; static PyObject *__pyx_n_u_CTGC; +static PyObject *__pyx_n_u_CTTC; static PyObject *__pyx_kp_u_C_2; static PyObject *__pyx_kp_u_C_3; static PyObject *__pyx_kp_s_Can_only_create_a_buffer_that_is; @@ -4333,6 +4327,7 @@ static PyObject *__pyx_n_u_EC; static PyObject *__pyx_n_u_ELR; static PyObject *__pyx_n_s_ELdata; static PyObject *__pyx_n_u_ELdata; +static PyObject *__pyx_kp_u_ERROR_splice_file_not_recognized; static PyObject *__pyx_n_u_ES; static PyObject *__pyx_kp_u_E_left; static PyObject *__pyx_kp_u_E_reads; @@ -4342,6 +4337,7 @@ static PyObject *__pyx_kp_s_Empty_shape_tuple_for_cython_arr; static PyObject *__pyx_n_u_False; static PyObject *__pyx_kp_u_For_BED12_GTF_GFF3_use_reference; static PyObject *__pyx_n_u_G; +static PyObject *__pyx_n_u_GAAG; static PyObject *__pyx_n_u_GCAG; static PyObject *__pyx_n_u_GFF; static PyObject *__pyx_n_u_GFF3; @@ -4400,12 +4396,6 @@ static PyObject *__pyx_kp_u_S_capped; static PyObject *__pyx_kp_u_S_left; static PyObject *__pyx_kp_u_S_reads; static PyObject *__pyx_kp_u_S_right; -static PyObject *__pyx_kp_u_Shifted_l; -static PyObject *__pyx_kp_u_Shifted_l_2; -static PyObject *__pyx_kp_u_Shifted_l_r; -static PyObject *__pyx_kp_u_Shifted_l_r_2; -static PyObject *__pyx_kp_u_Shifted_r; -static PyObject *__pyx_kp_u_Shifted_r_2; static PyObject *__pyx_n_s_StopIteration; static PyObject *__pyx_n_u_T; static PyObject *__pyx_kp_u_TAG; @@ -4422,7 +4412,6 @@ static PyObject *__pyx_n_u_U; static PyObject *__pyx_kp_s_Unable_to_convert_item_to_object; static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_View_MemoryView; -static PyObject *__pyx_kp_u_WARNING_splice_file_not_recogniz; static PyObject *__pyx_n_u_X; static PyObject *__pyx_n_u_XS; static PyObject *__pyx_n_u_Y_RNA; @@ -4464,6 +4453,7 @@ static PyObject *__pyx_n_s_add_read_from_BAM; static PyObject *__pyx_n_s_add_read_from_BED; static PyObject *__pyx_n_s_add_read_from_ELR; static PyObject *__pyx_n_s_add_source; +static PyObject *__pyx_n_s_adjust_splice_sites; static PyObject *__pyx_n_s_all; static PyObject *__pyx_n_s_allocate_buffer; static PyObject *__pyx_n_s_anno_string; @@ -4499,6 +4489,7 @@ static PyObject *__pyx_n_s_block_start; static PyObject *__pyx_n_s_bookend_core_cython_utils__fasta; static PyObject *__pyx_n_s_c; static PyObject *__pyx_n_u_c; +static PyObject *__pyx_n_s_canonical; static PyObject *__pyx_n_u_cap_bonus; static PyObject *__pyx_n_s_capped; static PyObject *__pyx_n_u_capped; @@ -4557,6 +4548,8 @@ static PyObject *__pyx_n_s_error; static PyObject *__pyx_n_s_error_rate; static PyObject *__pyx_n_u_error_rate; static PyObject *__pyx_n_u_errors; +static PyObject *__pyx_n_s_evaluate_splice_sites; +static PyObject *__pyx_n_s_exit; static PyObject *__pyx_n_u_exon; static PyObject *__pyx_n_s_file_type; static PyObject *__pyx_n_s_fileconn; @@ -4610,6 +4603,7 @@ static PyObject *__pyx_n_s_init; static PyObject *__pyx_n_s_init___locals_genexpr; static PyObject *__pyx_n_s_input_data; static PyObject *__pyx_n_s_input_lines; +static PyObject *__pyx_n_s_introns; static PyObject *__pyx_n_s_is_compatible; static PyObject *__pyx_n_s_is_digit; static PyObject *__pyx_n_s_is_identical; @@ -4821,6 +4815,7 @@ static PyObject *__pyx_kp_s_stringsource; static PyObject *__pyx_n_s_strip; static PyObject *__pyx_n_s_struct; static PyObject *__pyx_n_s_sum; +static PyObject *__pyx_n_s_sys; static PyObject *__pyx_n_u_tRNA; static PyObject *__pyx_n_u_telomerase_RNA; static PyObject *__pyx_n_s_test; @@ -5085,6 +5080,8 @@ static PyObject *__pyx_pf_13_rnaseq_utils_25parse_MD_string(CYTHON_UNUSED PyObje static PyObject *__pyx_pf_13_rnaseq_utils_28parse_SAM_CIGAR(CYTHON_UNUSED PyObject *__pyx_self, int __pyx_v_pos, PyObject *__pyx_v_cigartuples, PyObject *__pyx_v_mdstring, float __pyx_v_error_rate, int __pyx_v_quality_filter); /* proto */ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *__pyx_v_dataset, PyObject *__pyx_v_input_lines); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_2generate_read(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_4evaluate_splice_sites(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_strand, PyObject *__pyx_v_introns); /* proto */ +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_6adjust_splice_sites(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_strand, PyObject *__pyx_v_ranges, PyObject *__pyx_v_canonical, PyObject *__pyx_v_chrom); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_7dataset___get__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_11input_lines___get__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_10error_rate___get__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ @@ -5094,8 +5091,8 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_19remove_noncanonical___get static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_14quality_filter___get__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_12max_headclip___get__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_8sj_shift___get__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_4__reduce_cython__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ -static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_6__setstate_cython__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_8__reduce_cython__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_10__setstate_cython__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_30read_generator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_fileconn, struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *__pyx_v_dataset, PyObject *__pyx_v_file_type, int __pyx_v_max_gap, float __pyx_v_minimum_proportion); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_33generate_subchunks(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_list_of_reads, PyObject *__pyx_v_split_positions); /* proto */ static PyObject *__pyx_pf_13_rnaseq_utils_36get_max_deltas(CYTHON_UNUSED PyObject *__pyx_self, PyArrayObject *__pyx_v_array, float __pyx_v_offset); /* proto */ @@ -5286,7 +5283,7 @@ static PyObject *__pyx_codeobj__105; static PyObject *__pyx_codeobj__112; /* Late includes */ -/* "_rnaseq_utils.pyx":26 +/* "_rnaseq_utils.pyx":27 * cdef public float weight, coverage * cdef public (float, float, float) tripleweight * def __init__(self, input_data, attributes = None): # <<<<<<<<<<<<<< @@ -5337,7 +5334,7 @@ static int __pyx_pw_13_rnaseq_utils_13RNAseqMapping_1__init__(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 26, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 27, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -5353,7 +5350,7 @@ static int __pyx_pw_13_rnaseq_utils_13RNAseqMapping_1__init__(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 27, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -5367,7 +5364,7 @@ static int __pyx_pw_13_rnaseq_utils_13RNAseqMapping_1__init__(PyObject *__pyx_v_ } static PyObject *__pyx_gb_13_rnaseq_utils_13RNAseqMapping_8__init___2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_rnaseq_utils.pyx":53 +/* "_rnaseq_utils.pyx":54 * * if '|' in str(input_data.weight): * tripleweight = tuple(float(s) for s in str(input_data.weight).split('|')) # <<<<<<<<<<<<<< @@ -5387,7 +5384,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_8__init___genexpr(PyOb if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_1_genexpr *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 53, __pyx_L1_error) + __PYX_ERR(0, 54, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -5395,7 +5392,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_8__init___genexpr(PyOb __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_13RNAseqMapping_8__init___2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_13RNAseqMapping_8__init___2generator5, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_init___locals_genexpr, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -5431,14 +5428,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_13RNAseqMapping_8__init___2generator5( return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 53, __pyx_L1_error) - if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_input_data)) { __Pyx_RaiseClosureNameError("input_data"); __PYX_ERR(0, 53, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_input_data, __pyx_n_s_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 54, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_input_data)) { __Pyx_RaiseClosureNameError("input_data"); __PYX_ERR(0, 54, __pyx_L1_error) } + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_input_data, __pyx_n_s_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyUnicode_Split(((PyObject*)__pyx_t_2), __pyx_kp_u_, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_1 = PyUnicode_Split(((PyObject*)__pyx_t_2), __pyx_kp_u_, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; @@ -5446,16 +5443,16 @@ static PyObject *__pyx_gb_13_rnaseq_utils_13RNAseqMapping_8__init___2generator5( for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 54, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_cur_scope->__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_cur_scope->__pyx_v_s); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -5473,7 +5470,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_13RNAseqMapping_8__init___2generator5( __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_2); __pyx_t_3 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 53, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 54, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); @@ -5496,7 +5493,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_13RNAseqMapping_8__init___2generator5( return __pyx_r; } -/* "_rnaseq_utils.pyx":26 +/* "_rnaseq_utils.pyx":27 * cdef public float weight, coverage * cdef public (float, float, float) tripleweight * def __init__(self, input_data, attributes = None): # <<<<<<<<<<<<<< @@ -5528,7 +5525,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct____init__ *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 26, __pyx_L1_error) + __PYX_ERR(0, 27, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -5536,7 +5533,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __Pyx_INCREF(__pyx_cur_scope->__pyx_v_input_data); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_input_data); - /* "_rnaseq_utils.pyx":30 + /* "_rnaseq_utils.pyx":31 * Requires a chromosome, strand, source, weight, a sorted tuple of * exon ranges and an array of booleans indicating which gaps between exons are splice junctions.""" * self.is_reference = False # <<<<<<<<<<<<<< @@ -5545,7 +5542,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 */ __pyx_v_self->is_reference = 0; - /* "_rnaseq_utils.pyx":31 + /* "_rnaseq_utils.pyx":32 * exon ranges and an array of booleans indicating which gaps between exons are splice junctions.""" * self.is_reference = False * self.s_len = self.e_len = 0 # <<<<<<<<<<<<<< @@ -5555,89 +5552,89 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __pyx_v_self->s_len = 0; __pyx_v_self->e_len = 0; - /* "_rnaseq_utils.pyx":32 + /* "_rnaseq_utils.pyx":33 * self.is_reference = False * self.s_len = self.e_len = 0 * self.chrom, self.source = int(input_data.chrom), int(input_data.source) # <<<<<<<<<<<<<< * self.strand = input_data.strand * self.ranges = input_data.ranges */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 32, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->chrom = __pyx_t_3; __pyx_v_self->source = __pyx_t_4; - /* "_rnaseq_utils.pyx":33 + /* "_rnaseq_utils.pyx":34 * self.s_len = self.e_len = 0 * self.chrom, self.source = int(input_data.chrom), int(input_data.source) * self.strand = input_data.strand # <<<<<<<<<<<<<< * self.ranges = input_data.ranges * self.splice = input_data.splice */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 33, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 34, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->strand = __pyx_t_4; - /* "_rnaseq_utils.pyx":34 + /* "_rnaseq_utils.pyx":35 * self.chrom, self.source = int(input_data.chrom), int(input_data.source) * self.strand = input_data.strand * self.ranges = input_data.ranges # <<<<<<<<<<<<<< * self.splice = input_data.splice * self.condensed = input_data.condensed */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_ranges); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_ranges); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 34, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 35, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->ranges); __Pyx_DECREF(__pyx_v_self->ranges); __pyx_v_self->ranges = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":35 + /* "_rnaseq_utils.pyx":36 * self.strand = input_data.strand * self.ranges = input_data.ranges * self.splice = input_data.splice # <<<<<<<<<<<<<< * self.condensed = input_data.condensed * if self.strand == 0: # Terminal tag information is meaningless for nonstranded reads */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_splice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_splice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 35, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 36, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->splice); __Pyx_DECREF(__pyx_v_self->splice); __pyx_v_self->splice = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":36 + /* "_rnaseq_utils.pyx":37 * self.ranges = input_data.ranges * self.splice = input_data.splice * self.condensed = input_data.condensed # <<<<<<<<<<<<<< * if self.strand == 0: # Terminal tag information is meaningless for nonstranded reads * self.s_tag = self.e_tag = self.capped = False */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_condensed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_condensed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 36, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 37, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->condensed = __pyx_t_5; - /* "_rnaseq_utils.pyx":37 + /* "_rnaseq_utils.pyx":38 * self.splice = input_data.splice * self.condensed = input_data.condensed * if self.strand == 0: # Terminal tag information is meaningless for nonstranded reads # <<<<<<<<<<<<<< @@ -5647,7 +5644,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __pyx_t_5 = ((__pyx_v_self->strand == 0) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":38 + /* "_rnaseq_utils.pyx":39 * self.condensed = input_data.condensed * if self.strand == 0: # Terminal tag information is meaningless for nonstranded reads * self.s_tag = self.e_tag = self.capped = False # <<<<<<<<<<<<<< @@ -5658,7 +5655,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __pyx_v_self->e_tag = 0; __pyx_v_self->capped = 0; - /* "_rnaseq_utils.pyx":37 + /* "_rnaseq_utils.pyx":38 * self.splice = input_data.splice * self.condensed = input_data.condensed * if self.strand == 0: # Terminal tag information is meaningless for nonstranded reads # <<<<<<<<<<<<<< @@ -5668,7 +5665,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 goto __pyx_L3; } - /* "_rnaseq_utils.pyx":40 + /* "_rnaseq_utils.pyx":41 * self.s_tag = self.e_tag = self.capped = False * else: * self.s_tag, self.e_tag, self.capped = input_data.s_tag, input_data.e_tag, input_data.capped # <<<<<<<<<<<<<< @@ -5676,17 +5673,17 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 * self.span = (self.left(), self.right()) */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 40, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 41, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->s_tag = __pyx_t_5; __pyx_v_self->e_tag = __pyx_t_6; @@ -5694,7 +5691,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 } __pyx_L3:; - /* "_rnaseq_utils.pyx":42 + /* "_rnaseq_utils.pyx":43 * self.s_tag, self.e_tag, self.capped = input_data.s_tag, input_data.e_tag, input_data.capped * * self.span = (self.left(), self.right()) # <<<<<<<<<<<<<< @@ -5705,7 +5702,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __pyx_t_8.f1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->right(__pyx_v_self, 0); __pyx_v_self->span = __pyx_t_8; - /* "_rnaseq_utils.pyx":43 + /* "_rnaseq_utils.pyx":44 * * self.span = (self.left(), self.right()) * self.complete = False # <<<<<<<<<<<<<< @@ -5714,7 +5711,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 */ __pyx_v_self->complete = 0; - /* "_rnaseq_utils.pyx":44 + /* "_rnaseq_utils.pyx":45 * self.span = (self.left(), self.right()) * self.complete = False * if self.s_tag and self.e_tag and False not in self.splice: # <<<<<<<<<<<<<< @@ -5733,13 +5730,13 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __pyx_t_7 = __pyx_t_6; goto __pyx_L5_bool_binop_done; } - __pyx_t_6 = (__Pyx_PySequence_ContainsTF(Py_False, __pyx_v_self->splice, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 44, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PySequence_ContainsTF(Py_False, __pyx_v_self->splice, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 45, __pyx_L1_error) __pyx_t_5 = (__pyx_t_6 != 0); __pyx_t_7 = __pyx_t_5; __pyx_L5_bool_binop_done:; if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":45 + /* "_rnaseq_utils.pyx":46 * self.complete = False * if self.s_tag and self.e_tag and False not in self.splice: * self.complete = True # <<<<<<<<<<<<<< @@ -5748,7 +5745,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 */ __pyx_v_self->complete = 1; - /* "_rnaseq_utils.pyx":44 + /* "_rnaseq_utils.pyx":45 * self.span = (self.left(), self.right()) * self.complete = False * if self.s_tag and self.e_tag and False not in self.splice: # <<<<<<<<<<<<<< @@ -5757,7 +5754,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 */ } - /* "_rnaseq_utils.pyx":47 + /* "_rnaseq_utils.pyx":48 * self.complete = True * * if attributes is not None: # <<<<<<<<<<<<<< @@ -5768,14 +5765,14 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __pyx_t_5 = (__pyx_t_7 != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":48 + /* "_rnaseq_utils.pyx":49 * * if attributes is not None: * self.attributes = attributes # <<<<<<<<<<<<<< * else: * self.attributes = {} */ - if (!(likely(PyDict_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(0, 48, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_attributes))||((__pyx_v_attributes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_attributes)->tp_name), 0))) __PYX_ERR(0, 49, __pyx_L1_error) __pyx_t_1 = __pyx_v_attributes; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -5784,7 +5781,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __pyx_v_self->attributes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":47 + /* "_rnaseq_utils.pyx":48 * self.complete = True * * if attributes is not None: # <<<<<<<<<<<<<< @@ -5794,7 +5791,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 goto __pyx_L8; } - /* "_rnaseq_utils.pyx":50 + /* "_rnaseq_utils.pyx":51 * self.attributes = attributes * else: * self.attributes = {} # <<<<<<<<<<<<<< @@ -5802,7 +5799,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 * if '|' in str(input_data.weight): */ /*else*/ { - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->attributes); @@ -5812,68 +5809,68 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 } __pyx_L8:; - /* "_rnaseq_utils.pyx":52 + /* "_rnaseq_utils.pyx":53 * self.attributes = {} * * if '|' in str(input_data.weight): # <<<<<<<<<<<<<< * tripleweight = tuple(float(s) for s in str(input_data.weight).split('|')) * self.weight = tripleweight[0] */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 52, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 52, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = (__Pyx_PyUnicode_ContainsTF(__pyx_kp_u_, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 52, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_ContainsTF(__pyx_kp_u_, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 53, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__pyx_t_5 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":53 + /* "_rnaseq_utils.pyx":54 * * if '|' in str(input_data.weight): * tripleweight = tuple(float(s) for s in str(input_data.weight).split('|')) # <<<<<<<<<<<<<< * self.weight = tripleweight[0] * self.attributes['E.reads'] = tripleweight[2] */ - __pyx_t_2 = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_2 = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_8__init___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_tripleweight = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":54 + /* "_rnaseq_utils.pyx":55 * if '|' in str(input_data.weight): * tripleweight = tuple(float(s) for s in str(input_data.weight).split('|')) * self.weight = tripleweight[0] # <<<<<<<<<<<<<< * self.attributes['E.reads'] = tripleweight[2] * if self.capped: */ - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_tripleweight, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_tripleweight, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 54, __pyx_L1_error) + __pyx_t_9 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_9 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 55, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->weight = __pyx_t_9; - /* "_rnaseq_utils.pyx":55 + /* "_rnaseq_utils.pyx":56 * tripleweight = tuple(float(s) for s in str(input_data.weight).split('|')) * self.weight = tripleweight[0] * self.attributes['E.reads'] = tripleweight[2] # <<<<<<<<<<<<<< * if self.capped: * self.attributes['S.capped'] = tripleweight[1] */ - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_tripleweight, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 55, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_tripleweight, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 55, __pyx_L1_error) + __PYX_ERR(0, 56, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_kp_u_E_reads, __pyx_t_1) < 0)) __PYX_ERR(0, 55, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_kp_u_E_reads, __pyx_t_1) < 0)) __PYX_ERR(0, 56, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":56 + /* "_rnaseq_utils.pyx":57 * self.weight = tripleweight[0] * self.attributes['E.reads'] = tripleweight[2] * if self.capped: # <<<<<<<<<<<<<< @@ -5883,23 +5880,23 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 __pyx_t_7 = (__pyx_v_self->capped != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":57 + /* "_rnaseq_utils.pyx":58 * self.attributes['E.reads'] = tripleweight[2] * if self.capped: * self.attributes['S.capped'] = tripleweight[1] # <<<<<<<<<<<<<< * else: * self.attributes['S.reads'] = tripleweight[1] */ - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_tripleweight, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_tripleweight, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 57, __pyx_L1_error) + __PYX_ERR(0, 58, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_kp_u_S_capped, __pyx_t_1) < 0)) __PYX_ERR(0, 57, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_kp_u_S_capped, __pyx_t_1) < 0)) __PYX_ERR(0, 58, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":56 + /* "_rnaseq_utils.pyx":57 * self.weight = tripleweight[0] * self.attributes['E.reads'] = tripleweight[2] * if self.capped: # <<<<<<<<<<<<<< @@ -5909,7 +5906,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 goto __pyx_L10; } - /* "_rnaseq_utils.pyx":59 + /* "_rnaseq_utils.pyx":60 * self.attributes['S.capped'] = tripleweight[1] * else: * self.attributes['S.reads'] = tripleweight[1] # <<<<<<<<<<<<<< @@ -5917,18 +5914,18 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 * self.weight = float(input_data.weight) */ /*else*/ { - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_tripleweight, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_tripleweight, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 59, __pyx_L1_error) + __PYX_ERR(0, 60, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_kp_u_S_reads, __pyx_t_1) < 0)) __PYX_ERR(0, 59, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_kp_u_S_reads, __pyx_t_1) < 0)) __PYX_ERR(0, 60, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L10:; - /* "_rnaseq_utils.pyx":52 + /* "_rnaseq_utils.pyx":53 * self.attributes = {} * * if '|' in str(input_data.weight): # <<<<<<<<<<<<<< @@ -5938,7 +5935,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 goto __pyx_L9; } - /* "_rnaseq_utils.pyx":61 + /* "_rnaseq_utils.pyx":62 * self.attributes['S.reads'] = tripleweight[1] * else: * self.weight = float(input_data.weight) # <<<<<<<<<<<<<< @@ -5946,15 +5943,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 * def __eq__(self, other): return self.span == other.span */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_input_data, __pyx_n_s_weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 61, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_AsDouble(__pyx_t_1); if (unlikely(__pyx_t_10 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 62, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->weight = __pyx_t_10; } __pyx_L9:; - /* "_rnaseq_utils.pyx":26 + /* "_rnaseq_utils.pyx":27 * cdef public float weight, coverage * cdef public (float, float, float) tripleweight * def __init__(self, input_data, attributes = None): # <<<<<<<<<<<<<< @@ -5978,7 +5975,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping___init__(struct __pyx_obj_13 return __pyx_r; } -/* "_rnaseq_utils.pyx":63 +/* "_rnaseq_utils.pyx":64 * self.weight = float(input_data.weight) * * def __eq__(self, other): return self.span == other.span # <<<<<<<<<<<<<< @@ -6010,11 +6007,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_2__eq__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 63, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -6034,7 +6031,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_2__eq__(struct __pyx_o return __pyx_r; } -/* "_rnaseq_utils.pyx":64 +/* "_rnaseq_utils.pyx":65 * * def __eq__(self, other): return self.span == other.span * def __gt__(self, other): return self.span > other.span # <<<<<<<<<<<<<< @@ -6066,11 +6063,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_4__gt__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__gt__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 64, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -6090,7 +6087,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_4__gt__(struct __pyx_o return __pyx_r; } -/* "_rnaseq_utils.pyx":65 +/* "_rnaseq_utils.pyx":66 * def __eq__(self, other): return self.span == other.span * def __gt__(self, other): return self.span > other.span * def __ge__(self, other): return self.span >= other.span # <<<<<<<<<<<<<< @@ -6122,11 +6119,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_6__ge__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__ge__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 65, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -6146,7 +6143,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_6__ge__(struct __pyx_o return __pyx_r; } -/* "_rnaseq_utils.pyx":66 +/* "_rnaseq_utils.pyx":67 * def __gt__(self, other): return self.span > other.span * def __ge__(self, other): return self.span >= other.span * def __lt__(self, other): return self.span < other.span # <<<<<<<<<<<<<< @@ -6178,11 +6175,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_8__lt__(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__lt__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 66, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -6202,7 +6199,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_8__lt__(struct __pyx_o return __pyx_r; } -/* "_rnaseq_utils.pyx":67 +/* "_rnaseq_utils.pyx":68 * def __ge__(self, other): return self.span >= other.span * def __lt__(self, other): return self.span < other.span * def __le__(self, other): return self.span <= other.span # <<<<<<<<<<<<<< @@ -6234,11 +6231,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_10__le__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__le__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 67, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -6258,7 +6255,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_10__le__(struct __pyx_ return __pyx_r; } -/* "_rnaseq_utils.pyx":68 +/* "_rnaseq_utils.pyx":69 * def __lt__(self, other): return self.span < other.span * def __le__(self, other): return self.span <= other.span * def __ne__(self, other): return self.span != other.span # <<<<<<<<<<<<<< @@ -6290,11 +6287,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_12__ne__(struct __pyx_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__ne__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 68, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -6314,7 +6311,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_12__ne__(struct __pyx_ return __pyx_r; } -/* "_rnaseq_utils.pyx":70 +/* "_rnaseq_utils.pyx":71 * def __ne__(self, other): return self.span != other.span * * def __repr__(self): # <<<<<<<<<<<<<< @@ -6366,7 +6363,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__repr__", 0); - /* "_rnaseq_utils.pyx":74 + /* "_rnaseq_utils.pyx":75 * >>, <<, || represent plus, minus, and unstranded * Ranges are connected by ^ (splice) or . (gap)""" * if self.strand == 1: # <<<<<<<<<<<<<< @@ -6376,7 +6373,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py switch (__pyx_v_self->strand) { case 1: - /* "_rnaseq_utils.pyx":75 + /* "_rnaseq_utils.pyx":76 * Ranges are connected by ^ (splice) or . (gap)""" * if self.strand == 1: * strandchar = '>' # <<<<<<<<<<<<<< @@ -6386,7 +6383,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_INCREF(__pyx_kp_u__2); __pyx_v_strandchar = __pyx_kp_u__2; - /* "_rnaseq_utils.pyx":74 + /* "_rnaseq_utils.pyx":75 * >>, <<, || represent plus, minus, and unstranded * Ranges are connected by ^ (splice) or . (gap)""" * if self.strand == 1: # <<<<<<<<<<<<<< @@ -6396,7 +6393,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py break; case -1L: - /* "_rnaseq_utils.pyx":77 + /* "_rnaseq_utils.pyx":78 * strandchar = '>' * elif self.strand == -1: * strandchar = '<' # <<<<<<<<<<<<<< @@ -6406,7 +6403,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_INCREF(__pyx_kp_u__3); __pyx_v_strandchar = __pyx_kp_u__3; - /* "_rnaseq_utils.pyx":76 + /* "_rnaseq_utils.pyx":77 * if self.strand == 1: * strandchar = '>' * elif self.strand == -1: # <<<<<<<<<<<<<< @@ -6416,7 +6413,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py break; default: - /* "_rnaseq_utils.pyx":79 + /* "_rnaseq_utils.pyx":80 * strandchar = '<' * else: * strandchar = '|' # <<<<<<<<<<<<<< @@ -6428,7 +6425,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py break; } - /* "_rnaseq_utils.pyx":81 + /* "_rnaseq_utils.pyx":82 * strandchar = '|' * * gapchar = ['^' if i else '_' for i in self.splice] + [strandchar] # <<<<<<<<<<<<<< @@ -6436,24 +6433,24 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py * return(''.join([a+b for a,b in zip(rangechar,gapchar)])) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->splice == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 81, __pyx_L5_error) + __PYX_ERR(0, 82, __pyx_L5_error) } __pyx_t_2 = __pyx_v_self->splice; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 81, __pyx_L5_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 82, __pyx_L5_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L5_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_8genexpr1__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_8genexpr1__pyx_v_i); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 81, __pyx_L5_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_8genexpr1__pyx_v_i); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 82, __pyx_L5_error) if (__pyx_t_5) { __Pyx_INCREF(__pyx_kp_u__4); __pyx_t_4 = __pyx_kp_u__4; @@ -6461,7 +6458,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_INCREF(__pyx_n_u__5); __pyx_t_4 = __pyx_n_u__5; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 81, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 82, __pyx_L5_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -6472,19 +6469,19 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py goto __pyx_L1_error; __pyx_L8_exit_scope:; } /* exit inner scope */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_strandchar); __Pyx_GIVEREF(__pyx_v_strandchar); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_strandchar); - __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 81, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_gapchar = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":82 + /* "_rnaseq_utils.pyx":83 * * gapchar = ['^' if i else '_' for i in self.splice] + [strandchar] * rangechar = ['{}-{}'.format(a,b) for a,b in self.ranges] # <<<<<<<<<<<<<< @@ -6492,19 +6489,19 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py * */ { /* enter inner scope */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 82, __pyx_L11_error) + __PYX_ERR(0, 83, __pyx_L11_error) } __pyx_t_2 = __pyx_v_self->ranges; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 83, __pyx_L11_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); #endif if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -6513,7 +6510,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 82, __pyx_L11_error) + __PYX_ERR(0, 83, __pyx_L11_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6526,15 +6523,15 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -6542,7 +6539,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L14_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 82, __pyx_L11_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 83, __pyx_L11_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L15_unpacking_done; @@ -6550,14 +6547,14 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 82, __pyx_L11_error) + __PYX_ERR(0, 83, __pyx_L11_error) __pyx_L15_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_a, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_b, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__6, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__6, __pyx_n_s_format); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; __pyx_t_10 = 0; @@ -6574,7 +6571,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_8genexpr2__pyx_v_a, __pyx_8genexpr2__pyx_v_b}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -6582,13 +6579,13 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_8genexpr2__pyx_v_a, __pyx_8genexpr2__pyx_v_b}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -6599,12 +6596,12 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_INCREF(__pyx_8genexpr2__pyx_v_b); __Pyx_GIVEREF(__pyx_8genexpr2__pyx_v_b); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_8genexpr2__pyx_v_b); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L11_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 82, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 83, __pyx_L11_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -6620,7 +6617,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __pyx_v_rangechar = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":83 + /* "_rnaseq_utils.pyx":84 * gapchar = ['^' if i else '_' for i in self.splice] + [strandchar] * rangechar = ['{}-{}'.format(a,b) for a,b in self.ranges] * return(''.join([a+b for a,b in zip(rangechar,gapchar)])) # <<<<<<<<<<<<<< @@ -6629,9 +6626,9 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_rangechar); __Pyx_GIVEREF(__pyx_v_rangechar); @@ -6639,16 +6636,16 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_INCREF(__pyx_v_gapchar); __Pyx_GIVEREF(__pyx_v_gapchar); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_gapchar); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; __pyx_t_11 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_11 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 84, __pyx_L19_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -6656,17 +6653,17 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 84, __pyx_L19_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 84, __pyx_L19_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -6676,7 +6673,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 83, __pyx_L19_error) + else __PYX_ERR(0, 84, __pyx_L19_error) } break; } @@ -6688,7 +6685,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 83, __pyx_L19_error) + __PYX_ERR(0, 84, __pyx_L19_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -6701,15 +6698,15 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -6717,7 +6714,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_8 = __pyx_t_9(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L22_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_6), 2) < 0) __PYX_ERR(0, 83, __pyx_L19_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_6), 2) < 0) __PYX_ERR(0, 84, __pyx_L19_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L23_unpacking_done; @@ -6725,16 +6722,16 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 83, __pyx_L19_error) + __PYX_ERR(0, 84, __pyx_L19_error) __pyx_L23_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_a, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_b, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_8genexpr3__pyx_v_a, __pyx_8genexpr3__pyx_v_b); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L19_error) + __pyx_t_1 = PyNumber_Add(__pyx_8genexpr3__pyx_v_a, __pyx_8genexpr3__pyx_v_b); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 83, __pyx_L19_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 84, __pyx_L19_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -6747,14 +6744,14 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py goto __pyx_L1_error; __pyx_L24_exit_scope:; } /* exit inner scope */ - __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":70 + /* "_rnaseq_utils.pyx":71 * def __ne__(self, other): return self.span != other.span * * def __repr__(self): # <<<<<<<<<<<<<< @@ -6786,7 +6783,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_14__repr__(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":85 +/* "_rnaseq_utils.pyx":86 * return(''.join([a+b for a,b in zip(rangechar,gapchar)])) * * def __len__(self): # <<<<<<<<<<<<<< @@ -6812,7 +6809,7 @@ static Py_ssize_t __pyx_pf_13_rnaseq_utils_13RNAseqMapping_16__len__(struct __py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__", 0); - /* "_rnaseq_utils.pyx":86 + /* "_rnaseq_utils.pyx":87 * * def __len__(self): * return self.right() - self.left() # <<<<<<<<<<<<<< @@ -6822,7 +6819,7 @@ static Py_ssize_t __pyx_pf_13_rnaseq_utils_13RNAseqMapping_16__len__(struct __py __pyx_r = (((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->right(__pyx_v_self, 0) - ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->left(__pyx_v_self, 0)); goto __pyx_L0; - /* "_rnaseq_utils.pyx":85 + /* "_rnaseq_utils.pyx":86 * return(''.join([a+b for a,b in zip(rangechar,gapchar)])) * * def __len__(self): # <<<<<<<<<<<<<< @@ -6836,7 +6833,7 @@ static Py_ssize_t __pyx_pf_13_rnaseq_utils_13RNAseqMapping_16__len__(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":88 +/* "_rnaseq_utils.pyx":89 * return self.right() - self.left() * * cpdef int left(self): # <<<<<<<<<<<<<< @@ -6866,7 +6863,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_left(struct __pyx_obj_13_rnas if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_19left)) { __Pyx_INCREF(__pyx_t_1); @@ -6882,10 +6879,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_left(struct __pyx_obj_13_rnas } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -6904,7 +6901,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_left(struct __pyx_obj_13_rnas #endif } - /* "_rnaseq_utils.pyx":89 + /* "_rnaseq_utils.pyx":90 * * cpdef int left(self): * return self.ranges[0][0] # <<<<<<<<<<<<<< @@ -6913,19 +6910,19 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_left(struct __pyx_obj_13_rnas */ if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 89, __pyx_L1_error) + __PYX_ERR(0, 90, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 89, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "_rnaseq_utils.pyx":88 + /* "_rnaseq_utils.pyx":89 * return self.right() - self.left() * * cpdef int left(self): # <<<<<<<<<<<<<< @@ -6968,7 +6965,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_18left(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("left", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_left(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_left(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -6985,7 +6982,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_18left(struct __pyx_ob return __pyx_r; } -/* "_rnaseq_utils.pyx":91 +/* "_rnaseq_utils.pyx":92 * return self.ranges[0][0] * * cpdef int right(self): # <<<<<<<<<<<<<< @@ -7015,7 +7012,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_right(struct __pyx_obj_13_rna if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_21right)) { __Pyx_INCREF(__pyx_t_1); @@ -7031,10 +7028,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_right(struct __pyx_obj_13_rna } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -7053,7 +7050,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_right(struct __pyx_obj_13_rna #endif } - /* "_rnaseq_utils.pyx":92 + /* "_rnaseq_utils.pyx":93 * * cpdef int right(self): * return self.ranges[-1][-1] # <<<<<<<<<<<<<< @@ -7062,19 +7059,19 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_right(struct __pyx_obj_13_rna */ if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 92, __pyx_L1_error) + __PYX_ERR(0, 93, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 92, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "_rnaseq_utils.pyx":91 + /* "_rnaseq_utils.pyx":92 * return self.ranges[0][0] * * cpdef int right(self): # <<<<<<<<<<<<<< @@ -7117,7 +7114,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_20right(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("right", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_right(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_right(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7134,7 +7131,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_20right(struct __pyx_o return __pyx_r; } -/* "_rnaseq_utils.pyx":94 +/* "_rnaseq_utils.pyx":95 * return self.ranges[-1][-1] * * cpdef int get_length(self): # <<<<<<<<<<<<<< @@ -7168,7 +7165,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(struct __pyx_obj_1 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_23get_length)) { __Pyx_INCREF(__pyx_t_1); @@ -7184,10 +7181,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(struct __pyx_obj_1 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -7206,7 +7203,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(struct __pyx_obj_1 #endif } - /* "_rnaseq_utils.pyx":96 + /* "_rnaseq_utils.pyx":97 * cpdef int get_length(self): * """Returns the number of nucleotides covered by all blocks of the object.""" * cdef int length = 0 # <<<<<<<<<<<<<< @@ -7215,7 +7212,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(struct __pyx_obj_1 */ __pyx_v_length = 0; - /* "_rnaseq_utils.pyx":98 + /* "_rnaseq_utils.pyx":99 * cdef int length = 0 * cdef (int,int) exon * for exon in self.ranges: # <<<<<<<<<<<<<< @@ -7224,22 +7221,22 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(struct __pyx_obj_1 */ if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 98, __pyx_L1_error) + __PYX_ERR(0, 99, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->ranges; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 99, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif - __pyx_t_7 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 98, __pyx_L1_error) + __pyx_t_7 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 99, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_exon = __pyx_t_7; - /* "_rnaseq_utils.pyx":99 + /* "_rnaseq_utils.pyx":100 * cdef (int,int) exon * for exon in self.ranges: * length += exon[1] - exon[0] # <<<<<<<<<<<<<< @@ -7248,7 +7245,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(struct __pyx_obj_1 */ __pyx_v_length = (__pyx_v_length + (__pyx_v_exon.f1 - __pyx_v_exon.f0)); - /* "_rnaseq_utils.pyx":98 + /* "_rnaseq_utils.pyx":99 * cdef int length = 0 * cdef (int,int) exon * for exon in self.ranges: # <<<<<<<<<<<<<< @@ -7258,7 +7255,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(struct __pyx_obj_1 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":101 + /* "_rnaseq_utils.pyx":102 * length += exon[1] - exon[0] * * return length # <<<<<<<<<<<<<< @@ -7268,7 +7265,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(struct __pyx_obj_1 __pyx_r = __pyx_v_length; goto __pyx_L0; - /* "_rnaseq_utils.pyx":94 + /* "_rnaseq_utils.pyx":95 * return self.ranges[-1][-1] * * cpdef int get_length(self): # <<<<<<<<<<<<<< @@ -7312,7 +7309,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_22get_length(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_length", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_length(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7329,7 +7326,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_22get_length(struct __ return __pyx_r; } -/* "_rnaseq_utils.pyx":103 +/* "_rnaseq_utils.pyx":104 * return length * * cpdef gaps(self): # <<<<<<<<<<<<<< @@ -7364,7 +7361,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_25gaps)) { __Pyx_XDECREF(__pyx_r); @@ -7381,7 +7378,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 103, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -7402,7 +7399,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 #endif } - /* "_rnaseq_utils.pyx":105 + /* "_rnaseq_utils.pyx":106 * cpdef gaps(self): * """Returns an array of 0-indexed (start, end) tuples of gaps between ranges""" * if len(self.ranges) == 1: # <<<<<<<<<<<<<< @@ -7413,14 +7410,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 105, __pyx_L1_error) + __PYX_ERR(0, 106, __pyx_L1_error) } - __pyx_t_5 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 105, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 106, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = ((__pyx_t_5 == 1) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":106 + /* "_rnaseq_utils.pyx":107 * """Returns an array of 0-indexed (start, end) tuples of gaps between ranges""" * if len(self.ranges) == 1: * return [] # <<<<<<<<<<<<<< @@ -7428,13 +7425,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 * return [(self.ranges[i][-1], self.ranges[i+1][0]) for i in range(len(self.ranges)-1)] */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":105 + /* "_rnaseq_utils.pyx":106 * cpdef gaps(self): * """Returns an array of 0-indexed (start, end) tuples of gaps between ranges""" * if len(self.ranges) == 1: # <<<<<<<<<<<<<< @@ -7443,7 +7440,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 */ } - /* "_rnaseq_utils.pyx":108 + /* "_rnaseq_utils.pyx":109 * return [] * * return [(self.ranges[i][-1], self.ranges[i+1][0]) for i in range(len(self.ranges)-1)] # <<<<<<<<<<<<<< @@ -7452,15 +7449,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_v_self->ranges; __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 108, __pyx_L1_error) + __PYX_ERR(0, 109, __pyx_L1_error) } - __pyx_t_5 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__pyx_t_5 - 1); __pyx_t_5 = __pyx_t_7; @@ -7468,24 +7465,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 __pyx_8genexpr4__pyx_v_i = __pyx_t_8; if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 108, __pyx_L1_error) + __PYX_ERR(0, 109, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, __pyx_8genexpr4__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, __pyx_8genexpr4__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 108, __pyx_L1_error) + __PYX_ERR(0, 109, __pyx_L1_error) } __pyx_t_9 = (__pyx_8genexpr4__pyx_v_i + 1); - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, __pyx_t_9, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, __pyx_t_9, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 108, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); @@ -7493,7 +7490,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 108, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 109, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } } /* exit inner scope */ @@ -7501,7 +7498,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(struct __pyx_obj_1 __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":103 + /* "_rnaseq_utils.pyx":104 * return length * * cpdef gaps(self): # <<<<<<<<<<<<<< @@ -7546,7 +7543,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_24gaps(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("gaps", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 103, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqMapping_gaps(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7563,7 +7560,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_24gaps(struct __pyx_ob return __pyx_r; } -/* "_rnaseq_utils.pyx":110 +/* "_rnaseq_utils.pyx":111 * return [(self.ranges[i][-1], self.ranges[i+1][0]) for i in range(len(self.ranges)-1)] * * cpdef junctions(self): # <<<<<<<<<<<<<< @@ -7598,7 +7595,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_junctions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_junctions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_27junctions)) { __Pyx_XDECREF(__pyx_r); @@ -7615,7 +7612,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -7636,19 +7633,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ #endif } - /* "_rnaseq_utils.pyx":112 + /* "_rnaseq_utils.pyx":113 * cpdef junctions(self): * """Returns an array of 0-indexed (start, end) tuples of intron locations""" * j_array = [] # <<<<<<<<<<<<<< * for i,j in enumerate(self.splice): * if j: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_j_array = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":113 + /* "_rnaseq_utils.pyx":114 * """Returns an array of 0-indexed (start, end) tuples of intron locations""" * j_array = [] * for i,j in enumerate(self.splice): # <<<<<<<<<<<<<< @@ -7661,32 +7658,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 114, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":114 + /* "_rnaseq_utils.pyx":115 * j_array = [] * for i,j in enumerate(self.splice): * if j: # <<<<<<<<<<<<<< * j_array += [(self.ranges[i][-1], self.ranges[i+1][0])] * */ - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_j); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 115, __pyx_L1_error) if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":115 + /* "_rnaseq_utils.pyx":116 * for i,j in enumerate(self.splice): * if j: * j_array += [(self.ranges[i][-1], self.ranges[i+1][0])] # <<<<<<<<<<<<<< @@ -7695,26 +7692,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ */ if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 115, __pyx_L1_error) + __PYX_ERR(0, 116, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->ranges, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->ranges, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 115, __pyx_L1_error) + __PYX_ERR(0, 116, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_self->ranges, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_v_self->ranges, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4); @@ -7722,18 +7719,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_3); __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_j_array, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 115, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_j_array, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 116, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF_SET(__pyx_v_j_array, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":114 + /* "_rnaseq_utils.pyx":115 * j_array = [] * for i,j in enumerate(self.splice): * if j: # <<<<<<<<<<<<<< @@ -7742,7 +7739,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ */ } - /* "_rnaseq_utils.pyx":113 + /* "_rnaseq_utils.pyx":114 * """Returns an array of 0-indexed (start, end) tuples of intron locations""" * j_array = [] * for i,j in enumerate(self.splice): # <<<<<<<<<<<<<< @@ -7753,7 +7750,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":117 + /* "_rnaseq_utils.pyx":118 * j_array += [(self.ranges[i][-1], self.ranges[i+1][0])] * * return j_array # <<<<<<<<<<<<<< @@ -7765,7 +7762,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(struct __pyx_ __pyx_r = __pyx_v_j_array; goto __pyx_L0; - /* "_rnaseq_utils.pyx":110 + /* "_rnaseq_utils.pyx":111 * return [(self.ranges[i][-1], self.ranges[i+1][0]) for i in range(len(self.ranges)-1)] * * cpdef junctions(self): # <<<<<<<<<<<<<< @@ -7814,7 +7811,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_26junctions(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("junctions", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqMapping_junctions(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -7831,7 +7828,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_26junctions(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":119 +/* "_rnaseq_utils.pyx":120 * return j_array * * cpdef int diff(self, other): # <<<<<<<<<<<<<< @@ -7861,7 +7858,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_diff(struct __pyx_obj_13_rnas if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_diff); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_diff); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_29diff)) { __Pyx_INCREF(__pyx_t_1); @@ -7877,10 +7874,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_diff(struct __pyx_obj_13_rnas } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_other) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_other); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 119, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -7899,51 +7896,51 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_diff(struct __pyx_obj_13_rnas #endif } - /* "_rnaseq_utils.pyx":121 + /* "_rnaseq_utils.pyx":122 * cpdef int diff(self, other): * """Returns the total number of nucleotides overlapped by only one read.""" * return abs(self.span[0]-other.span[0])+abs(self.span[1]-other.span[1]) # <<<<<<<<<<<<<< * * cpdef bint overlaps(self, RNAseqMapping other): */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->span.f0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->span.f0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyNumber_Absolute(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Absolute(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->span.f1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->span.f1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyNumber_Absolute(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 121, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "_rnaseq_utils.pyx":119 + /* "_rnaseq_utils.pyx":120 * return j_array * * cpdef int diff(self, other): # <<<<<<<<<<<<<< @@ -7987,7 +7984,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_28diff(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("diff", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_diff(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_diff(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -8004,7 +8001,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_28diff(struct __pyx_ob return __pyx_r; } -/* "_rnaseq_utils.pyx":123 +/* "_rnaseq_utils.pyx":124 * return abs(self.span[0]-other.span[0])+abs(self.span[1]-other.span[1]) * * cpdef bint overlaps(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -8042,7 +8039,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_31overlaps)) { __Pyx_INCREF(__pyx_t_1); @@ -8058,10 +8055,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8080,7 +8077,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ #endif } - /* "_rnaseq_utils.pyx":126 + /* "_rnaseq_utils.pyx":127 * """Returns a boolean if the mapping range of self overlaps other.""" * cdef int l1, r1, l2, r2 * l1, r1 = self.span # <<<<<<<<<<<<<< @@ -8093,7 +8090,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ __pyx_v_l1 = __pyx_t_7; __pyx_v_r1 = __pyx_t_8; - /* "_rnaseq_utils.pyx":127 + /* "_rnaseq_utils.pyx":128 * cdef int l1, r1, l2, r2 * l1, r1 = self.span * l2, r2 = other.span # <<<<<<<<<<<<<< @@ -8106,7 +8103,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ __pyx_v_l2 = __pyx_t_8; __pyx_v_r2 = __pyx_t_7; - /* "_rnaseq_utils.pyx":128 + /* "_rnaseq_utils.pyx":129 * l1, r1 = self.span * l2, r2 = other.span * if r1 < l2 or l1 > r2: # <<<<<<<<<<<<<< @@ -8124,7 +8121,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ __pyx_L4_bool_binop_done:; if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":129 + /* "_rnaseq_utils.pyx":130 * l2, r2 = other.span * if r1 < l2 or l1 > r2: * return False # <<<<<<<<<<<<<< @@ -8134,7 +8131,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":128 + /* "_rnaseq_utils.pyx":129 * l1, r1 = self.span * l2, r2 = other.span * if r1 < l2 or l1 > r2: # <<<<<<<<<<<<<< @@ -8143,7 +8140,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ */ } - /* "_rnaseq_utils.pyx":131 + /* "_rnaseq_utils.pyx":132 * return False * * return True # <<<<<<<<<<<<<< @@ -8153,7 +8150,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(struct __pyx_obj_13_ __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":123 + /* "_rnaseq_utils.pyx":124 * return abs(self.span[0]-other.span[0])+abs(self.span[1]-other.span[1]) * * cpdef bint overlaps(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -8184,7 +8181,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_31overlaps(PyObject *_ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlaps (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 123, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 124, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_30overlaps(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other)); /* function exit code */ @@ -8205,7 +8202,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_30overlaps(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlaps", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 123, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_overlaps(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 124, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -8222,7 +8219,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_30overlaps(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":133 +/* "_rnaseq_utils.pyx":134 * return True * * cpdef (int, int) overlap_range(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -8256,7 +8253,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlap if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlap_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlap_range); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_33overlap_range)) { __Pyx_INCREF(__pyx_t_1); @@ -8272,10 +8269,10 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlap } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_5 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8294,7 +8291,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlap #endif } - /* "_rnaseq_utils.pyx":135 + /* "_rnaseq_utils.pyx":136 * cpdef (int, int) overlap_range(self, RNAseqMapping other): * """Returns 0-indexed open range of overlap between self and other""" * return (max([self.span[0],other.span[0]]), min([self.span[1],other.span[1]])) # <<<<<<<<<<<<<< @@ -8320,7 +8317,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_13RNAseqMapping_overlap __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "_rnaseq_utils.pyx":133 + /* "_rnaseq_utils.pyx":134 * return True * * cpdef (int, int) overlap_range(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -8351,7 +8348,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_33overlap_range(PyObje PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("overlap_range (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 133, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 134, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_32overlap_range(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other)); /* function exit code */ @@ -8372,7 +8369,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_32overlap_range(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlap_range", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_overlap_range(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 133, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_overlap_range(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -8389,7 +8386,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_32overlap_range(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":137 +/* "_rnaseq_utils.pyx":138 * return (max([self.span[0],other.span[0]]), min([self.span[1],other.span[1]])) * * cpdef int shared_bases(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -8437,7 +8434,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shared_bases); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_shared_bases); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_35shared_bases)) { __Pyx_INCREF(__pyx_t_1); @@ -8453,10 +8450,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 137, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -8475,7 +8472,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj #endif } - /* "_rnaseq_utils.pyx":141 + /* "_rnaseq_utils.pyx":142 * self and other.""" * cdef int index_self, index_other, exlen_self, exlen_other, l1, r1, l2, r2, shared * if not self.overlaps(other): # <<<<<<<<<<<<<< @@ -8485,7 +8482,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_t_6 = ((!(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->overlaps(__pyx_v_self, __pyx_v_other, 0) != 0)) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":142 + /* "_rnaseq_utils.pyx":143 * cdef int index_self, index_other, exlen_self, exlen_other, l1, r1, l2, r2, shared * if not self.overlaps(other): * return 0 # <<<<<<<<<<<<<< @@ -8495,7 +8492,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":141 + /* "_rnaseq_utils.pyx":142 * self and other.""" * cdef int index_self, index_other, exlen_self, exlen_other, l1, r1, l2, r2, shared * if not self.overlaps(other): # <<<<<<<<<<<<<< @@ -8504,7 +8501,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ } - /* "_rnaseq_utils.pyx":144 + /* "_rnaseq_utils.pyx":145 * return 0 * * shared = 0 # <<<<<<<<<<<<<< @@ -8513,7 +8510,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ __pyx_v_shared = 0; - /* "_rnaseq_utils.pyx":145 + /* "_rnaseq_utils.pyx":146 * * shared = 0 * exlen_self = len(self.ranges) # <<<<<<<<<<<<<< @@ -8524,13 +8521,13 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 145, __pyx_L1_error) + __PYX_ERR(0, 146, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 145, __pyx_L1_error) + __pyx_t_7 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 146, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_exlen_self = __pyx_t_7; - /* "_rnaseq_utils.pyx":146 + /* "_rnaseq_utils.pyx":147 * shared = 0 * exlen_self = len(self.ranges) * exlen_other = len(other.ranges) # <<<<<<<<<<<<<< @@ -8541,13 +8538,13 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 146, __pyx_L1_error) + __PYX_ERR(0, 147, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 146, __pyx_L1_error) + __pyx_t_7 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_exlen_other = __pyx_t_7; - /* "_rnaseq_utils.pyx":147 + /* "_rnaseq_utils.pyx":148 * exlen_self = len(self.ranges) * exlen_other = len(other.ranges) * index_self, index_other = 0, 0 # <<<<<<<<<<<<<< @@ -8559,7 +8556,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_v_index_self = __pyx_t_5; __pyx_v_index_other = __pyx_t_8; - /* "_rnaseq_utils.pyx":148 + /* "_rnaseq_utils.pyx":149 * exlen_other = len(other.ranges) * index_self, index_other = 0, 0 * while index_self < exlen_self and index_other < exlen_other: # <<<<<<<<<<<<<< @@ -8578,7 +8575,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_L6_bool_binop_done:; if (!__pyx_t_6) break; - /* "_rnaseq_utils.pyx":149 + /* "_rnaseq_utils.pyx":150 * index_self, index_other = 0, 0 * while index_self < exlen_self and index_other < exlen_other: * l1, r1 = self.ranges[index_self] # <<<<<<<<<<<<<< @@ -8587,9 +8584,9 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 149, __pyx_L1_error) + __PYX_ERR(0, 150, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, __pyx_v_index_self, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, __pyx_v_index_self, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -8597,7 +8594,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 149, __pyx_L1_error) + __PYX_ERR(0, 150, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8610,15 +8607,15 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -8626,7 +8623,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 149, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 150, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L9_unpacking_done; @@ -8634,17 +8631,17 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 149, __pyx_L1_error) + __PYX_ERR(0, 150, __pyx_L1_error) __pyx_L9_unpacking_done:; } - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 149, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_l1 = __pyx_t_8; __pyx_v_r1 = __pyx_t_5; - /* "_rnaseq_utils.pyx":150 + /* "_rnaseq_utils.pyx":151 * while index_self < exlen_self and index_other < exlen_other: * l1, r1 = self.ranges[index_self] * l2, r2 = other.ranges[index_other] # <<<<<<<<<<<<<< @@ -8653,9 +8650,9 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ if (unlikely(__pyx_v_other->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 150, __pyx_L1_error) + __PYX_ERR(0, 151, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_other->ranges, __pyx_v_index_other, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_other->ranges, __pyx_v_index_other, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -8663,7 +8660,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 150, __pyx_L1_error) + __PYX_ERR(0, 151, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -8676,15 +8673,15 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_2); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -8692,7 +8689,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_2 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 150, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 151, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L11_unpacking_done; @@ -8700,17 +8697,17 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 150, __pyx_L1_error) + __PYX_ERR(0, 151, __pyx_L1_error) __pyx_L11_unpacking_done:; } - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 150, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_l2 = __pyx_t_5; __pyx_v_r2 = __pyx_t_8; - /* "_rnaseq_utils.pyx":151 + /* "_rnaseq_utils.pyx":152 * l1, r1 = self.ranges[index_self] * l2, r2 = other.ranges[index_other] * if l2 > r1: # other is fully right of self # <<<<<<<<<<<<<< @@ -8720,7 +8717,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_t_6 = ((__pyx_v_l2 > __pyx_v_r1) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":152 + /* "_rnaseq_utils.pyx":153 * l2, r2 = other.ranges[index_other] * if l2 > r1: # other is fully right of self * index_self += 1 # <<<<<<<<<<<<<< @@ -8729,7 +8726,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ __pyx_v_index_self = (__pyx_v_index_self + 1); - /* "_rnaseq_utils.pyx":153 + /* "_rnaseq_utils.pyx":154 * if l2 > r1: # other is fully right of self * index_self += 1 * continue # <<<<<<<<<<<<<< @@ -8738,7 +8735,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ goto __pyx_L4_continue; - /* "_rnaseq_utils.pyx":151 + /* "_rnaseq_utils.pyx":152 * l1, r1 = self.ranges[index_self] * l2, r2 = other.ranges[index_other] * if l2 > r1: # other is fully right of self # <<<<<<<<<<<<<< @@ -8747,7 +8744,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ } - /* "_rnaseq_utils.pyx":155 + /* "_rnaseq_utils.pyx":156 * continue * * if l1 > r2: # self is fully right of other # <<<<<<<<<<<<<< @@ -8757,7 +8754,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_t_6 = ((__pyx_v_l1 > __pyx_v_r2) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":156 + /* "_rnaseq_utils.pyx":157 * * if l1 > r2: # self is fully right of other * index_other += 1 # <<<<<<<<<<<<<< @@ -8766,7 +8763,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ __pyx_v_index_other = (__pyx_v_index_other + 1); - /* "_rnaseq_utils.pyx":157 + /* "_rnaseq_utils.pyx":158 * if l1 > r2: # self is fully right of other * index_other += 1 * continue # <<<<<<<<<<<<<< @@ -8775,7 +8772,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ goto __pyx_L4_continue; - /* "_rnaseq_utils.pyx":155 + /* "_rnaseq_utils.pyx":156 * continue * * if l1 > r2: # self is fully right of other # <<<<<<<<<<<<<< @@ -8784,7 +8781,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ } - /* "_rnaseq_utils.pyx":159 + /* "_rnaseq_utils.pyx":160 * continue * * shared += max(0, min(r1,r2)-max(l1,l2)) # <<<<<<<<<<<<<< @@ -8814,7 +8811,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj } __pyx_v_shared = (__pyx_v_shared + __pyx_t_14); - /* "_rnaseq_utils.pyx":160 + /* "_rnaseq_utils.pyx":161 * * shared += max(0, min(r1,r2)-max(l1,l2)) * if r1 > r2: # self is right of other, advance other # <<<<<<<<<<<<<< @@ -8824,7 +8821,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_t_6 = ((__pyx_v_r1 > __pyx_v_r2) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":161 + /* "_rnaseq_utils.pyx":162 * shared += max(0, min(r1,r2)-max(l1,l2)) * if r1 > r2: # self is right of other, advance other * index_other += 1 # <<<<<<<<<<<<<< @@ -8833,7 +8830,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ __pyx_v_index_other = (__pyx_v_index_other + 1); - /* "_rnaseq_utils.pyx":160 + /* "_rnaseq_utils.pyx":161 * * shared += max(0, min(r1,r2)-max(l1,l2)) * if r1 > r2: # self is right of other, advance other # <<<<<<<<<<<<<< @@ -8843,7 +8840,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj goto __pyx_L14; } - /* "_rnaseq_utils.pyx":162 + /* "_rnaseq_utils.pyx":163 * if r1 > r2: # self is right of other, advance other * index_other += 1 * elif r2 > r1: # other is right of self, advance self # <<<<<<<<<<<<<< @@ -8853,7 +8850,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_t_6 = ((__pyx_v_r2 > __pyx_v_r1) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":163 + /* "_rnaseq_utils.pyx":164 * index_other += 1 * elif r2 > r1: # other is right of self, advance self * index_self += 1 # <<<<<<<<<<<<<< @@ -8862,7 +8859,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj */ __pyx_v_index_self = (__pyx_v_index_self + 1); - /* "_rnaseq_utils.pyx":162 + /* "_rnaseq_utils.pyx":163 * if r1 > r2: # self is right of other, advance other * index_other += 1 * elif r2 > r1: # other is right of self, advance self # <<<<<<<<<<<<<< @@ -8872,7 +8869,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj goto __pyx_L14; } - /* "_rnaseq_utils.pyx":165 + /* "_rnaseq_utils.pyx":166 * index_self += 1 * else: # right edges are the same, advance both * index_other += 1 # <<<<<<<<<<<<<< @@ -8882,7 +8879,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj /*else*/ { __pyx_v_index_other = (__pyx_v_index_other + 1); - /* "_rnaseq_utils.pyx":166 + /* "_rnaseq_utils.pyx":167 * else: # right edges are the same, advance both * index_other += 1 * index_self += 1 # <<<<<<<<<<<<<< @@ -8895,7 +8892,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_L4_continue:; } - /* "_rnaseq_utils.pyx":168 + /* "_rnaseq_utils.pyx":169 * index_self += 1 * * return shared # <<<<<<<<<<<<<< @@ -8905,7 +8902,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(struct __pyx_obj __pyx_r = __pyx_v_shared; goto __pyx_L0; - /* "_rnaseq_utils.pyx":137 + /* "_rnaseq_utils.pyx":138 * return (max([self.span[0],other.span[0]]), min([self.span[1],other.span[1]])) * * cpdef int shared_bases(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -8936,7 +8933,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_35shared_bases(PyObjec PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("shared_bases (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 137, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 138, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_34shared_bases(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other)); /* function exit code */ @@ -8957,7 +8954,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_34shared_bases(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("shared_bases", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 137, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_13RNAseqMapping_shared_bases(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 138, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -8974,7 +8971,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_34shared_bases(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":170 +/* "_rnaseq_utils.pyx":171 * return shared * * cpdef bint ends_clash(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -9008,7 +9005,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ends_clash); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_ends_clash); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_37ends_clash)) { __Pyx_INCREF(__pyx_t_1); @@ -9024,10 +9021,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -9046,18 +9043,18 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 #endif } - /* "_rnaseq_utils.pyx":173 + /* "_rnaseq_utils.pyx":174 * """Returns a boolean of whether the combination of end tags between * self and other can be substrings of the same object.""" * cdef (int, int) strands = tuple(sorted([self.strand, other.strand])) # <<<<<<<<<<<<<< * if strands[0] == 1: * assert strands[1] != -1 */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_other->strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_other->strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_4 = PyList_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -9067,19 +9064,19 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 __pyx_t_3 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_6 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 174, __pyx_L1_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 173, __pyx_L1_error) + __PYX_ERR(0, 174, __pyx_L1_error) } - __pyx_t_4 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_4 = PyList_AsTuple(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 173, __pyx_L1_error) + __pyx_t_7 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 174, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_strands = __pyx_t_7; - /* "_rnaseq_utils.pyx":174 + /* "_rnaseq_utils.pyx":175 * self and other can be substrings of the same object.""" * cdef (int, int) strands = tuple(sorted([self.strand, other.strand])) * if strands[0] == 1: # <<<<<<<<<<<<<< @@ -9089,7 +9086,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 __pyx_t_5 = ((__pyx_v_strands.f0 == 1) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":175 + /* "_rnaseq_utils.pyx":176 * cdef (int, int) strands = tuple(sorted([self.strand, other.strand])) * if strands[0] == 1: * assert strands[1] != -1 # <<<<<<<<<<<<<< @@ -9100,12 +9097,12 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_strands.f1 != -1L) != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 175, __pyx_L1_error) + __PYX_ERR(0, 176, __pyx_L1_error) } } #endif - /* "_rnaseq_utils.pyx":176 + /* "_rnaseq_utils.pyx":177 * if strands[0] == 1: * assert strands[1] != -1 * if self.s_tag and self.span[0] > other.span[0]: return True # Other is left of self's S tag # <<<<<<<<<<<<<< @@ -9126,7 +9123,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L0; } - /* "_rnaseq_utils.pyx":177 + /* "_rnaseq_utils.pyx":178 * assert strands[1] != -1 * if self.s_tag and self.span[0] > other.span[0]: return True # Other is left of self's S tag * if other.s_tag and other.span[0] > self.span[0]: return True # Self is left of other's S tag # <<<<<<<<<<<<<< @@ -9147,7 +9144,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L0; } - /* "_rnaseq_utils.pyx":178 + /* "_rnaseq_utils.pyx":179 * if self.s_tag and self.span[0] > other.span[0]: return True # Other is left of self's S tag * if other.s_tag and other.span[0] > self.span[0]: return True # Self is left of other's S tag * if self.e_tag and self.span[1] < other.span[1]: return True # Other is right of self's E tag # <<<<<<<<<<<<<< @@ -9168,7 +9165,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L0; } - /* "_rnaseq_utils.pyx":179 + /* "_rnaseq_utils.pyx":180 * if other.s_tag and other.span[0] > self.span[0]: return True # Self is left of other's S tag * if self.e_tag and self.span[1] < other.span[1]: return True # Other is right of self's E tag * if other.e_tag and other.span[1] < self.span[1]: return True # Self is right of other's E tag # <<<<<<<<<<<<<< @@ -9189,7 +9186,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L0; } - /* "_rnaseq_utils.pyx":174 + /* "_rnaseq_utils.pyx":175 * self and other can be substrings of the same object.""" * cdef (int, int) strands = tuple(sorted([self.strand, other.strand])) * if strands[0] == 1: # <<<<<<<<<<<<<< @@ -9199,7 +9196,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L3; } - /* "_rnaseq_utils.pyx":180 + /* "_rnaseq_utils.pyx":181 * if self.e_tag and self.span[1] < other.span[1]: return True # Other is right of self's E tag * if other.e_tag and other.span[1] < self.span[1]: return True # Self is right of other's E tag * elif strands[0] == -1: # <<<<<<<<<<<<<< @@ -9209,7 +9206,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 __pyx_t_5 = ((__pyx_v_strands.f0 == -1L) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":181 + /* "_rnaseq_utils.pyx":182 * if other.e_tag and other.span[1] < self.span[1]: return True # Self is right of other's E tag * elif strands[0] == -1: * assert strands[1] != 1 # <<<<<<<<<<<<<< @@ -9220,12 +9217,12 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 if (unlikely(!Py_OptimizeFlag)) { if (unlikely(!((__pyx_v_strands.f1 != 1) != 0))) { PyErr_SetNone(PyExc_AssertionError); - __PYX_ERR(0, 181, __pyx_L1_error) + __PYX_ERR(0, 182, __pyx_L1_error) } } #endif - /* "_rnaseq_utils.pyx":182 + /* "_rnaseq_utils.pyx":183 * elif strands[0] == -1: * assert strands[1] != 1 * if self.s_tag and self.span[1] < other.span[1]: return True # Other is right of self's S tag # <<<<<<<<<<<<<< @@ -9246,7 +9243,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L0; } - /* "_rnaseq_utils.pyx":183 + /* "_rnaseq_utils.pyx":184 * assert strands[1] != 1 * if self.s_tag and self.span[1] < other.span[1]: return True # Other is right of self's S tag * if other.s_tag and other.span[1] < self.span[1]: return True # Self is right of other's S tag # <<<<<<<<<<<<<< @@ -9267,7 +9264,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L0; } - /* "_rnaseq_utils.pyx":184 + /* "_rnaseq_utils.pyx":185 * if self.s_tag and self.span[1] < other.span[1]: return True # Other is right of self's S tag * if other.s_tag and other.span[1] < self.span[1]: return True # Self is right of other's S tag * if self.e_tag and self.span[0] > other.span[0]: return True # Other is left of self's E tag # <<<<<<<<<<<<<< @@ -9288,7 +9285,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L0; } - /* "_rnaseq_utils.pyx":185 + /* "_rnaseq_utils.pyx":186 * if other.s_tag and other.span[1] < self.span[1]: return True # Self is right of other's S tag * if self.e_tag and self.span[0] > other.span[0]: return True # Other is left of self's E tag * if other.e_tag and other.span[0] > self.span[0]: return True # Self is left of other's E tag # <<<<<<<<<<<<<< @@ -9309,7 +9306,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 goto __pyx_L0; } - /* "_rnaseq_utils.pyx":180 + /* "_rnaseq_utils.pyx":181 * if self.e_tag and self.span[1] < other.span[1]: return True # Other is right of self's E tag * if other.e_tag and other.span[1] < self.span[1]: return True # Self is right of other's E tag * elif strands[0] == -1: # <<<<<<<<<<<<<< @@ -9319,7 +9316,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 } __pyx_L3:; - /* "_rnaseq_utils.pyx":187 + /* "_rnaseq_utils.pyx":188 * if other.e_tag and other.span[0] > self.span[0]: return True # Self is left of other's E tag * * return False # <<<<<<<<<<<<<< @@ -9329,7 +9326,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(struct __pyx_obj_1 __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":170 + /* "_rnaseq_utils.pyx":171 * return shared * * cpdef bint ends_clash(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -9360,7 +9357,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_37ends_clash(PyObject PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("ends_clash (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 170, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 171, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_36ends_clash(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other)); /* function exit code */ @@ -9381,7 +9378,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_36ends_clash(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("ends_clash", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_ends_clash(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -9398,7 +9395,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_36ends_clash(struct __ return __pyx_r; } -/* "_rnaseq_utils.pyx":189 +/* "_rnaseq_utils.pyx":190 * return False * * cpdef bint splice_match(self, RNAseqMapping other, bint ignore_ends=True): # <<<<<<<<<<<<<< @@ -9437,10 +9434,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_splice_match(struct __pyx_obj if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_splice_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_splice_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_39splice_match)) { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_ignore_ends); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_ignore_ends); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -9458,7 +9455,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_splice_match(struct __pyx_obj #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_other), __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9467,14 +9464,14 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_splice_match(struct __pyx_obj #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_other), __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -9485,12 +9482,12 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_splice_match(struct __pyx_obj __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -9509,7 +9506,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_splice_match(struct __pyx_obj #endif } - /* "_rnaseq_utils.pyx":193 + /* "_rnaseq_utils.pyx":194 * Discards 5' and 3' terminus if ignore_ends.""" * cdef list exons_self, exons_other * if ignore_ends: # <<<<<<<<<<<<<< @@ -9519,26 +9516,26 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_splice_match(struct __pyx_obj __pyx_t_8 = (__pyx_v_ignore_ends != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":194 + /* "_rnaseq_utils.pyx":195 * cdef list exons_self, exons_other * if ignore_ends: * return self.junctions() == other.junctions() # <<<<<<<<<<<<<< * else: * return self.ranges == other.ranges */ - __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->junctions(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->junctions(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other->__pyx_vtab)->junctions(__pyx_v_other, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other->__pyx_vtab)->junctions(__pyx_v_other, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 194, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 195, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_8; goto __pyx_L0; - /* "_rnaseq_utils.pyx":193 + /* "_rnaseq_utils.pyx":194 * Discards 5' and 3' terminus if ignore_ends.""" * cdef list exons_self, exons_other * if ignore_ends: # <<<<<<<<<<<<<< @@ -9547,7 +9544,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_splice_match(struct __pyx_obj */ } - /* "_rnaseq_utils.pyx":196 + /* "_rnaseq_utils.pyx":197 * return self.junctions() == other.junctions() * else: * return self.ranges == other.ranges # <<<<<<<<<<<<<< @@ -9555,14 +9552,14 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_splice_match(struct __pyx_obj * cpdef bint antisense_match(self, RNAseqMapping other, int end_extend): */ /*else*/ { - __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->ranges, __pyx_v_other->ranges, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_self->ranges, __pyx_v_other->ranges, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_8; goto __pyx_L0; } - /* "_rnaseq_utils.pyx":189 + /* "_rnaseq_utils.pyx":190 * return False * * cpdef bint splice_match(self, RNAseqMapping other, bint ignore_ends=True): # <<<<<<<<<<<<<< @@ -9624,7 +9621,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_39splice_match(PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "splice_match") < 0)) __PYX_ERR(0, 189, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "splice_match") < 0)) __PYX_ERR(0, 190, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -9637,20 +9634,20 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_39splice_match(PyObjec } __pyx_v_other = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)values[0]); if (values[1]) { - __pyx_v_ignore_ends = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_ignore_ends == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 189, __pyx_L3_error) + __pyx_v_ignore_ends = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_ignore_ends == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 190, __pyx_L3_error) } else { __pyx_v_ignore_ends = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("splice_match", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 189, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("splice_match", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 190, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.splice_match", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 189, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 190, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_38splice_match(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), __pyx_v_other, __pyx_v_ignore_ends); /* function exit code */ @@ -9676,7 +9673,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_38splice_match(struct __pyx_t_2.__pyx_n = 1; __pyx_t_2.ignore_ends = __pyx_v_ignore_ends; __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping->splice_match(__pyx_v_self, __pyx_v_other, 1, &__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 189, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -9693,7 +9690,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_38splice_match(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":198 +/* "_rnaseq_utils.pyx":199 * return self.ranges == other.ranges * * cpdef bint antisense_match(self, RNAseqMapping other, int end_extend): # <<<<<<<<<<<<<< @@ -9734,10 +9731,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_antisense_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_antisense_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_41antisense_match)) { - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_end_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_end_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -9755,7 +9752,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_other), __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -9764,14 +9761,14 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_other), __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -9782,12 +9779,12 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -9806,7 +9803,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ #endif } - /* "_rnaseq_utils.pyx":201 + /* "_rnaseq_utils.pyx":202 * """Returns bool if self is antisense to other and overlaps by at least end_extend.""" * cdef int left, right, self_size, other_size * if self.overlaps(other): # <<<<<<<<<<<<<< @@ -9816,7 +9813,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ __pyx_t_8 = (((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->overlaps(__pyx_v_self, __pyx_v_other, 0) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":202 + /* "_rnaseq_utils.pyx":203 * cdef int left, right, self_size, other_size * if self.overlaps(other): * self_size = self.span[1]-self.span[0] # <<<<<<<<<<<<<< @@ -9825,7 +9822,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ */ __pyx_v_self_size = (__pyx_v_self->span.f1 - __pyx_v_self->span.f0); - /* "_rnaseq_utils.pyx":203 + /* "_rnaseq_utils.pyx":204 * if self.overlaps(other): * self_size = self.span[1]-self.span[0] * other_size = other.span[1]-other.span[0] # <<<<<<<<<<<<<< @@ -9834,7 +9831,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ */ __pyx_v_other_size = (__pyx_v_other->span.f1 - __pyx_v_other->span.f0); - /* "_rnaseq_utils.pyx":204 + /* "_rnaseq_utils.pyx":205 * self_size = self.span[1]-self.span[0] * other_size = other.span[1]-other.span[0] * end_extend = min([end_extend, self_size, other_size]) # <<<<<<<<<<<<<< @@ -9857,7 +9854,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ } __pyx_v_end_extend = __pyx_t_11; - /* "_rnaseq_utils.pyx":205 + /* "_rnaseq_utils.pyx":206 * other_size = other.span[1]-other.span[0] * end_extend = min([end_extend, self_size, other_size]) * if self.strand == -other.strand: # <<<<<<<<<<<<<< @@ -9867,7 +9864,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ __pyx_t_8 = ((__pyx_v_self->strand == (-__pyx_v_other->strand)) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":206 + /* "_rnaseq_utils.pyx":207 * end_extend = min([end_extend, self_size, other_size]) * if self.strand == -other.strand: * left, right = self.overlap_range(other) # <<<<<<<<<<<<<< @@ -9880,7 +9877,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ __pyx_v_left = __pyx_t_11; __pyx_v_right = __pyx_t_6; - /* "_rnaseq_utils.pyx":207 + /* "_rnaseq_utils.pyx":208 * if self.strand == -other.strand: * left, right = self.overlap_range(other) * if right - left >= end_extend: # <<<<<<<<<<<<<< @@ -9890,7 +9887,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ __pyx_t_8 = (((__pyx_v_right - __pyx_v_left) >= __pyx_v_end_extend) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":208 + /* "_rnaseq_utils.pyx":209 * left, right = self.overlap_range(other) * if right - left >= end_extend: * return True # <<<<<<<<<<<<<< @@ -9900,7 +9897,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":207 + /* "_rnaseq_utils.pyx":208 * if self.strand == -other.strand: * left, right = self.overlap_range(other) * if right - left >= end_extend: # <<<<<<<<<<<<<< @@ -9909,7 +9906,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ */ } - /* "_rnaseq_utils.pyx":205 + /* "_rnaseq_utils.pyx":206 * other_size = other.span[1]-other.span[0] * end_extend = min([end_extend, self_size, other_size]) * if self.strand == -other.strand: # <<<<<<<<<<<<<< @@ -9918,7 +9915,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ */ } - /* "_rnaseq_utils.pyx":201 + /* "_rnaseq_utils.pyx":202 * """Returns bool if self is antisense to other and overlaps by at least end_extend.""" * cdef int left, right, self_size, other_size * if self.overlaps(other): # <<<<<<<<<<<<<< @@ -9927,7 +9924,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ */ } - /* "_rnaseq_utils.pyx":210 + /* "_rnaseq_utils.pyx":211 * return True * * return False # <<<<<<<<<<<<<< @@ -9937,7 +9934,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(struct __pyx_ __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":198 + /* "_rnaseq_utils.pyx":199 * return self.ranges == other.ranges * * cpdef bint antisense_match(self, RNAseqMapping other, int end_extend): # <<<<<<<<<<<<<< @@ -9995,11 +9992,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_41antisense_match(PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_extend)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("antisense_match", 1, 2, 2, 1); __PYX_ERR(0, 198, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("antisense_match", 1, 2, 2, 1); __PYX_ERR(0, 199, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "antisense_match") < 0)) __PYX_ERR(0, 198, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "antisense_match") < 0)) __PYX_ERR(0, 199, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -10008,17 +10005,17 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_41antisense_match(PyOb values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_other = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)values[0]); - __pyx_v_end_extend = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_end_extend == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 198, __pyx_L3_error) + __pyx_v_end_extend = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_end_extend == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 199, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("antisense_match", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 198, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("antisense_match", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 199, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.antisense_match", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 198, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 199, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_40antisense_match(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), __pyx_v_other, __pyx_v_end_extend); /* function exit code */ @@ -10039,7 +10036,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_40antisense_match(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("antisense_match", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(__pyx_v_self, __pyx_v_other, __pyx_v_end_extend, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_antisense_match(__pyx_v_self, __pyx_v_other, __pyx_v_end_extend, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10056,7 +10053,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_40antisense_match(stru return __pyx_r; } -/* "_rnaseq_utils.pyx":212 +/* "_rnaseq_utils.pyx":213 * return False * * cpdef bint sense_match(self, RNAseqMapping other, int end_extend): # <<<<<<<<<<<<<< @@ -10097,10 +10094,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sense_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sense_match); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_43sense_match)) { - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_end_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_end_extend); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -10118,7 +10115,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_other), __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10127,14 +10124,14 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_other), __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -10145,12 +10142,12 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10169,7 +10166,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ #endif } - /* "_rnaseq_utils.pyx":215 + /* "_rnaseq_utils.pyx":216 * """Returns bool if self is sense to other and overlaps by at least end_extend.""" * cdef int left, right, self_size, other_size * if self.overlaps(other): # <<<<<<<<<<<<<< @@ -10179,7 +10176,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ __pyx_t_8 = (((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->overlaps(__pyx_v_self, __pyx_v_other, 0) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":216 + /* "_rnaseq_utils.pyx":217 * cdef int left, right, self_size, other_size * if self.overlaps(other): * self_size = self.span[1]-self.span[0] # <<<<<<<<<<<<<< @@ -10188,7 +10185,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ */ __pyx_v_self_size = (__pyx_v_self->span.f1 - __pyx_v_self->span.f0); - /* "_rnaseq_utils.pyx":217 + /* "_rnaseq_utils.pyx":218 * if self.overlaps(other): * self_size = self.span[1]-self.span[0] * other_size = other.span[1]-other.span[0] # <<<<<<<<<<<<<< @@ -10197,7 +10194,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ */ __pyx_v_other_size = (__pyx_v_other->span.f1 - __pyx_v_other->span.f0); - /* "_rnaseq_utils.pyx":218 + /* "_rnaseq_utils.pyx":219 * self_size = self.span[1]-self.span[0] * other_size = other.span[1]-other.span[0] * end_extend = min([end_extend, self_size, other_size]) # <<<<<<<<<<<<<< @@ -10220,7 +10217,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ } __pyx_v_end_extend = __pyx_t_11; - /* "_rnaseq_utils.pyx":219 + /* "_rnaseq_utils.pyx":220 * other_size = other.span[1]-other.span[0] * end_extend = min([end_extend, self_size, other_size]) * if self.strand == other.strand: # <<<<<<<<<<<<<< @@ -10230,7 +10227,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ __pyx_t_8 = ((__pyx_v_self->strand == __pyx_v_other->strand) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":220 + /* "_rnaseq_utils.pyx":221 * end_extend = min([end_extend, self_size, other_size]) * if self.strand == other.strand: * left, right = self.overlap_range(other) # <<<<<<<<<<<<<< @@ -10243,7 +10240,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ __pyx_v_left = __pyx_t_11; __pyx_v_right = __pyx_t_6; - /* "_rnaseq_utils.pyx":221 + /* "_rnaseq_utils.pyx":222 * if self.strand == other.strand: * left, right = self.overlap_range(other) * if right - left >= end_extend: # <<<<<<<<<<<<<< @@ -10253,7 +10250,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ __pyx_t_8 = (((__pyx_v_right - __pyx_v_left) >= __pyx_v_end_extend) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":222 + /* "_rnaseq_utils.pyx":223 * left, right = self.overlap_range(other) * if right - left >= end_extend: * return True # <<<<<<<<<<<<<< @@ -10263,7 +10260,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":221 + /* "_rnaseq_utils.pyx":222 * if self.strand == other.strand: * left, right = self.overlap_range(other) * if right - left >= end_extend: # <<<<<<<<<<<<<< @@ -10272,7 +10269,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ */ } - /* "_rnaseq_utils.pyx":219 + /* "_rnaseq_utils.pyx":220 * other_size = other.span[1]-other.span[0] * end_extend = min([end_extend, self_size, other_size]) * if self.strand == other.strand: # <<<<<<<<<<<<<< @@ -10281,7 +10278,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ */ } - /* "_rnaseq_utils.pyx":215 + /* "_rnaseq_utils.pyx":216 * """Returns bool if self is sense to other and overlaps by at least end_extend.""" * cdef int left, right, self_size, other_size * if self.overlaps(other): # <<<<<<<<<<<<<< @@ -10290,7 +10287,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ */ } - /* "_rnaseq_utils.pyx":224 + /* "_rnaseq_utils.pyx":225 * return True * * return False # <<<<<<<<<<<<<< @@ -10300,7 +10297,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(struct __pyx_obj_ __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":212 + /* "_rnaseq_utils.pyx":213 * return False * * cpdef bint sense_match(self, RNAseqMapping other, int end_extend): # <<<<<<<<<<<<<< @@ -10358,11 +10355,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_43sense_match(PyObject case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_end_extend)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("sense_match", 1, 2, 2, 1); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("sense_match", 1, 2, 2, 1); __PYX_ERR(0, 213, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sense_match") < 0)) __PYX_ERR(0, 212, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "sense_match") < 0)) __PYX_ERR(0, 213, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -10371,17 +10368,17 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_43sense_match(PyObject values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_other = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)values[0]); - __pyx_v_end_extend = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_end_extend == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 212, __pyx_L3_error) + __pyx_v_end_extend = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_end_extend == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 213, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("sense_match", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 212, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("sense_match", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 213, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.sense_match", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 212, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 213, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_42sense_match(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), __pyx_v_other, __pyx_v_end_extend); /* function exit code */ @@ -10402,7 +10399,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_42sense_match(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("sense_match", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(__pyx_v_self, __pyx_v_other, __pyx_v_end_extend, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_sense_match(__pyx_v_self, __pyx_v_other, __pyx_v_end_extend, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -10419,7 +10416,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_42sense_match(struct _ return __pyx_r; } -/* "_rnaseq_utils.pyx":226 +/* "_rnaseq_utils.pyx":227 * return False * * cpdef bint is_compatible(self, RNAseqMapping other, bint ignore_ends=False, bint ignore_source=False): # <<<<<<<<<<<<<< @@ -10471,12 +10468,12 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_compatible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_compatible); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_45is_compatible)) { - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_ignore_ends); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_ignore_ends); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_ignore_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_ignore_source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -10494,7 +10491,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_6, ((PyObject *)__pyx_v_other), __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10504,7 +10501,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[4] = {__pyx_t_6, ((PyObject *)__pyx_v_other), __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -10512,7 +10509,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -10526,12 +10523,12 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_9; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -10550,7 +10547,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob #endif } - /* "_rnaseq_utils.pyx":230 + /* "_rnaseq_utils.pyx":231 * not be subsequences of a common longer molecule.""" * cdef (int, int) overlap * if self.chrom != other.chrom: # <<<<<<<<<<<<<< @@ -10560,7 +10557,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_t_9 = ((__pyx_v_self->chrom != __pyx_v_other->chrom) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":231 + /* "_rnaseq_utils.pyx":232 * cdef (int, int) overlap * if self.chrom != other.chrom: * return False # <<<<<<<<<<<<<< @@ -10570,7 +10567,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":230 + /* "_rnaseq_utils.pyx":231 * not be subsequences of a common longer molecule.""" * cdef (int, int) overlap * if self.chrom != other.chrom: # <<<<<<<<<<<<<< @@ -10579,7 +10576,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":233 + /* "_rnaseq_utils.pyx":234 * return False * * if not ignore_source: # <<<<<<<<<<<<<< @@ -10589,7 +10586,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_t_9 = ((!(__pyx_v_ignore_source != 0)) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":234 + /* "_rnaseq_utils.pyx":235 * * if not ignore_source: * if self.source != other.source: # <<<<<<<<<<<<<< @@ -10599,7 +10596,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_t_9 = ((__pyx_v_self->source != __pyx_v_other->source) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":235 + /* "_rnaseq_utils.pyx":236 * if not ignore_source: * if self.source != other.source: * return False # <<<<<<<<<<<<<< @@ -10609,7 +10606,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":234 + /* "_rnaseq_utils.pyx":235 * * if not ignore_source: * if self.source != other.source: # <<<<<<<<<<<<<< @@ -10618,7 +10615,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":233 + /* "_rnaseq_utils.pyx":234 * return False * * if not ignore_source: # <<<<<<<<<<<<<< @@ -10627,7 +10624,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":237 + /* "_rnaseq_utils.pyx":238 * return False * * if self.strand != 0 and other.strand != 0 and self.strand != other.strand: # <<<<<<<<<<<<<< @@ -10651,7 +10648,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_L7_bool_binop_done:; if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":238 + /* "_rnaseq_utils.pyx":239 * * if self.strand != 0 and other.strand != 0 and self.strand != other.strand: * return False # <<<<<<<<<<<<<< @@ -10661,7 +10658,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":237 + /* "_rnaseq_utils.pyx":238 * return False * * if self.strand != 0 and other.strand != 0 and self.strand != other.strand: # <<<<<<<<<<<<<< @@ -10670,7 +10667,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":241 + /* "_rnaseq_utils.pyx":242 * * # If self or other contain terminal tags, the tags must be compatible * if not ignore_ends: # <<<<<<<<<<<<<< @@ -10680,7 +10677,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_t_9 = ((!(__pyx_v_ignore_ends != 0)) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":242 + /* "_rnaseq_utils.pyx":243 * # If self or other contain terminal tags, the tags must be compatible * if not ignore_ends: * if self.ends_clash(other): # <<<<<<<<<<<<<< @@ -10690,7 +10687,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_t_9 = (((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->ends_clash(__pyx_v_self, __pyx_v_other, 0) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":243 + /* "_rnaseq_utils.pyx":244 * if not ignore_ends: * if self.ends_clash(other): * return False # <<<<<<<<<<<<<< @@ -10700,7 +10697,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":242 + /* "_rnaseq_utils.pyx":243 * # If self or other contain terminal tags, the tags must be compatible * if not ignore_ends: * if self.ends_clash(other): # <<<<<<<<<<<<<< @@ -10709,7 +10706,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":241 + /* "_rnaseq_utils.pyx":242 * * # If self or other contain terminal tags, the tags must be compatible * if not ignore_ends: # <<<<<<<<<<<<<< @@ -10718,7 +10715,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":245 + /* "_rnaseq_utils.pyx":246 * return False * * if not self.overlaps(other): # <<<<<<<<<<<<<< @@ -10728,7 +10725,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_t_9 = ((!(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->overlaps(__pyx_v_self, __pyx_v_other, 0) != 0)) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":246 + /* "_rnaseq_utils.pyx":247 * * if not self.overlaps(other): * return True # No incompatibilities were found # <<<<<<<<<<<<<< @@ -10738,7 +10735,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":245 + /* "_rnaseq_utils.pyx":246 * return False * * if not self.overlaps(other): # <<<<<<<<<<<<<< @@ -10747,7 +10744,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":250 + /* "_rnaseq_utils.pyx":251 * # If the two reads share a chrom and strand and overlap, * # check the overlapping range for identical splice architecture * overlap = self.overlap_range(other) # <<<<<<<<<<<<<< @@ -10756,7 +10753,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ __pyx_v_overlap = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->overlap_range(__pyx_v_self, __pyx_v_other, 0); - /* "_rnaseq_utils.pyx":251 + /* "_rnaseq_utils.pyx":252 * # check the overlapping range for identical splice architecture * overlap = self.overlap_range(other) * j1 = [j for j in self.junctions() if j[1] > overlap[0] and j[0] < overlap[1]] # <<<<<<<<<<<<<< @@ -10764,17 +10761,17 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob * if j1 == j2: */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->junctions(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->junctions(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_11 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_12 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 252, __pyx_L15_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -10782,17 +10779,17 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 252, __pyx_L15_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 252, __pyx_L15_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -10802,7 +10799,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 251, __pyx_L15_error) + else __PYX_ERR(0, 252, __pyx_L15_error) } break; } @@ -10810,33 +10807,33 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob } __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_j, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt(__pyx_8genexpr5__pyx_v_j, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_8genexpr5__pyx_v_j, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_overlap.f0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_overlap.f0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L19_bool_binop_done; } - __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr5__pyx_v_j, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr5__pyx_v_j, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_overlap.f1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_overlap.f1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_t_4, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 251, __pyx_L15_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 252, __pyx_L15_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L19_bool_binop_done:; if (__pyx_t_9) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr5__pyx_v_j))) __PYX_ERR(0, 251, __pyx_L15_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr5__pyx_v_j))) __PYX_ERR(0, 252, __pyx_L15_error) } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -10850,7 +10847,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_v_j1 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":252 + /* "_rnaseq_utils.pyx":253 * overlap = self.overlap_range(other) * j1 = [j for j in self.junctions() if j[1] > overlap[0] and j[0] < overlap[1]] * j2 = [j for j in other.junctions() if j[1] > overlap[0] and j[0] < overlap[1]] # <<<<<<<<<<<<<< @@ -10858,17 +10855,17 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob * return True */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other->__pyx_vtab)->junctions(__pyx_v_other, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_5 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other->__pyx_vtab)->junctions(__pyx_v_other, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_2 = __pyx_t_5; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_11 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 253, __pyx_L24_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -10876,17 +10873,17 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 253, __pyx_L24_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_5); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 253, __pyx_L24_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -10896,7 +10893,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 252, __pyx_L24_error) + else __PYX_ERR(0, 253, __pyx_L24_error) } break; } @@ -10904,33 +10901,33 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob } __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_j, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetItemInt(__pyx_8genexpr6__pyx_v_j, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_8genexpr6__pyx_v_j, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_overlap.f0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_overlap.f0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_8, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L28_bool_binop_done; } - __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr6__pyx_v_j, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr6__pyx_v_j, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_overlap.f1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_overlap.f1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_8, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 252, __pyx_L24_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 253, __pyx_L24_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L28_bool_binop_done:; if (__pyx_t_9) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr6__pyx_v_j))) __PYX_ERR(0, 252, __pyx_L24_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr6__pyx_v_j))) __PYX_ERR(0, 253, __pyx_L24_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -10944,19 +10941,19 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_v_j2 = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":253 + /* "_rnaseq_utils.pyx":254 * j1 = [j for j in self.junctions() if j[1] > overlap[0] and j[0] < overlap[1]] * j2 = [j for j in other.junctions() if j[1] > overlap[0] and j[0] < overlap[1]] * if j1 == j2: # <<<<<<<<<<<<<< * return True * */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_j1, __pyx_v_j2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error) - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 253, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_j1, __pyx_v_j2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 254, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":254 + /* "_rnaseq_utils.pyx":255 * j2 = [j for j in other.junctions() if j[1] > overlap[0] and j[0] < overlap[1]] * if j1 == j2: * return True # <<<<<<<<<<<<<< @@ -10966,7 +10963,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":253 + /* "_rnaseq_utils.pyx":254 * j1 = [j for j in self.junctions() if j[1] > overlap[0] and j[0] < overlap[1]] * j2 = [j for j in other.junctions() if j[1] > overlap[0] and j[0] < overlap[1]] * if j1 == j2: # <<<<<<<<<<<<<< @@ -10975,7 +10972,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":256 + /* "_rnaseq_utils.pyx":257 * return True * * return False # <<<<<<<<<<<<<< @@ -10985,7 +10982,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_compatible(struct __pyx_ob __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":226 + /* "_rnaseq_utils.pyx":227 * return False * * cpdef bint is_compatible(self, RNAseqMapping other, bint ignore_ends=False, bint ignore_source=False): # <<<<<<<<<<<<<< @@ -11061,7 +11058,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_45is_compatible(PyObje } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "is_compatible") < 0)) __PYX_ERR(0, 226, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "is_compatible") < 0)) __PYX_ERR(0, 227, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -11076,25 +11073,25 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_45is_compatible(PyObje } __pyx_v_other = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)values[0]); if (values[1]) { - __pyx_v_ignore_ends = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_ignore_ends == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L3_error) + __pyx_v_ignore_ends = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_ignore_ends == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error) } else { __pyx_v_ignore_ends = ((int)0); } if (values[2]) { - __pyx_v_ignore_source = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_ignore_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 226, __pyx_L3_error) + __pyx_v_ignore_source = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_ignore_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 227, __pyx_L3_error) } else { __pyx_v_ignore_source = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("is_compatible", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 226, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("is_compatible", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 227, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.is_compatible", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 226, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 227, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_44is_compatible(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), __pyx_v_other, __pyx_v_ignore_ends, __pyx_v_ignore_source); /* function exit code */ @@ -11121,7 +11118,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_44is_compatible(struct __pyx_t_2.ignore_ends = __pyx_v_ignore_ends; __pyx_t_2.ignore_source = __pyx_v_ignore_source; __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping->is_compatible(__pyx_v_self, __pyx_v_other, 1, &__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -11138,7 +11135,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_44is_compatible(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":258 +/* "_rnaseq_utils.pyx":259 * return False * * cpdef bint is_identical(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -11168,7 +11165,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_identical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_identical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_47is_identical)) { __Pyx_INCREF(__pyx_t_1); @@ -11184,10 +11181,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 258, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11206,7 +11203,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj #endif } - /* "_rnaseq_utils.pyx":260 + /* "_rnaseq_utils.pyx":261 * cpdef bint is_identical(self, RNAseqMapping other): * """Boolean of whether two read objects share all nontrivial attributes""" * if self.source != other.source: return False # <<<<<<<<<<<<<< @@ -11219,7 +11216,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj goto __pyx_L0; } - /* "_rnaseq_utils.pyx":261 + /* "_rnaseq_utils.pyx":262 * """Boolean of whether two read objects share all nontrivial attributes""" * if self.source != other.source: return False * if self.chrom != other.chrom: return False # <<<<<<<<<<<<<< @@ -11232,7 +11229,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj goto __pyx_L0; } - /* "_rnaseq_utils.pyx":262 + /* "_rnaseq_utils.pyx":263 * if self.source != other.source: return False * if self.chrom != other.chrom: return False * if self.strand != other.strand: return False # <<<<<<<<<<<<<< @@ -11245,37 +11242,37 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj goto __pyx_L0; } - /* "_rnaseq_utils.pyx":263 + /* "_rnaseq_utils.pyx":264 * if self.chrom != other.chrom: return False * if self.strand != other.strand: return False * if self.ranges != other.ranges: return False # <<<<<<<<<<<<<< * if self.splice != other.splice: return False * if self.s_tag != other.s_tag: return False */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->ranges, __pyx_v_other->ranges, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 263, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 263, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->ranges, __pyx_v_other->ranges, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 264, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { __pyx_r = 0; goto __pyx_L0; } - /* "_rnaseq_utils.pyx":264 + /* "_rnaseq_utils.pyx":265 * if self.strand != other.strand: return False * if self.ranges != other.ranges: return False * if self.splice != other.splice: return False # <<<<<<<<<<<<<< * if self.s_tag != other.s_tag: return False * if self.e_tag != other.e_tag: return False */ - __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->splice, __pyx_v_other->splice, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 264, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 264, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_self->splice, __pyx_v_other->splice, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 265, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { __pyx_r = 0; goto __pyx_L0; } - /* "_rnaseq_utils.pyx":265 + /* "_rnaseq_utils.pyx":266 * if self.ranges != other.ranges: return False * if self.splice != other.splice: return False * if self.s_tag != other.s_tag: return False # <<<<<<<<<<<<<< @@ -11288,7 +11285,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj goto __pyx_L0; } - /* "_rnaseq_utils.pyx":266 + /* "_rnaseq_utils.pyx":267 * if self.splice != other.splice: return False * if self.s_tag != other.s_tag: return False * if self.e_tag != other.e_tag: return False # <<<<<<<<<<<<<< @@ -11301,7 +11298,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj goto __pyx_L0; } - /* "_rnaseq_utils.pyx":267 + /* "_rnaseq_utils.pyx":268 * if self.s_tag != other.s_tag: return False * if self.e_tag != other.e_tag: return False * if self.capped != other.capped: return False # <<<<<<<<<<<<<< @@ -11314,7 +11311,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj goto __pyx_L0; } - /* "_rnaseq_utils.pyx":268 + /* "_rnaseq_utils.pyx":269 * if self.e_tag != other.e_tag: return False * if self.capped != other.capped: return False * return True # <<<<<<<<<<<<<< @@ -11324,7 +11321,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(struct __pyx_obj __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":258 + /* "_rnaseq_utils.pyx":259 * return False * * cpdef bint is_identical(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -11355,7 +11352,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_47is_identical(PyObjec PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("is_identical (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 258, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 259, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_46is_identical(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other)); /* function exit code */ @@ -11376,7 +11373,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_46is_identical(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("is_identical", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 258, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_is_identical(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11393,7 +11390,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_46is_identical(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":270 +/* "_rnaseq_utils.pyx":271 * return True * * cpdef bint merge(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -11431,7 +11428,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_merge); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_49merge)) { __Pyx_INCREF(__pyx_t_1); @@ -11447,10 +11444,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_other)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_other)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_5; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11469,7 +11466,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna #endif } - /* "_rnaseq_utils.pyx":272 + /* "_rnaseq_utils.pyx":273 * cpdef bint merge(self, RNAseqMapping other): * """Combines with another Mapping object. Must be compatible.""" * if not self.is_compatible(other): # <<<<<<<<<<<<<< @@ -11479,7 +11476,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_t_5 = ((!(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->is_compatible(__pyx_v_self, __pyx_v_other, 0, NULL) != 0)) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":273 + /* "_rnaseq_utils.pyx":274 * """Combines with another Mapping object. Must be compatible.""" * if not self.is_compatible(other): * return False # <<<<<<<<<<<<<< @@ -11489,7 +11486,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":272 + /* "_rnaseq_utils.pyx":273 * cpdef bint merge(self, RNAseqMapping other): * """Combines with another Mapping object. Must be compatible.""" * if not self.is_compatible(other): # <<<<<<<<<<<<<< @@ -11498,7 +11495,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna */ } - /* "_rnaseq_utils.pyx":276 + /* "_rnaseq_utils.pyx":277 * * # Unify the strand information of the two objects * self.s_tag = self.s_tag or other.s_tag # <<<<<<<<<<<<<< @@ -11516,7 +11513,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_L4_bool_binop_done:; __pyx_v_self->s_tag = __pyx_t_5; - /* "_rnaseq_utils.pyx":277 + /* "_rnaseq_utils.pyx":278 * # Unify the strand information of the two objects * self.s_tag = self.s_tag or other.s_tag * self.e_tag = self.e_tag or other.e_tag # <<<<<<<<<<<<<< @@ -11534,7 +11531,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_L6_bool_binop_done:; __pyx_v_self->e_tag = __pyx_t_5; - /* "_rnaseq_utils.pyx":278 + /* "_rnaseq_utils.pyx":279 * self.s_tag = self.s_tag or other.s_tag * self.e_tag = self.e_tag or other.e_tag * self.capped = self.capped or other.capped # <<<<<<<<<<<<<< @@ -11552,7 +11549,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_L8_bool_binop_done:; __pyx_v_self->capped = __pyx_t_5; - /* "_rnaseq_utils.pyx":279 + /* "_rnaseq_utils.pyx":280 * self.e_tag = self.e_tag or other.e_tag * self.capped = self.capped or other.capped * self.weight = self.weight + other.weight # <<<<<<<<<<<<<< @@ -11561,7 +11558,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna */ __pyx_v_self->weight = (__pyx_v_self->weight + __pyx_v_other->weight); - /* "_rnaseq_utils.pyx":280 + /* "_rnaseq_utils.pyx":281 * self.capped = self.capped or other.capped * self.weight = self.weight + other.weight * if self.strand == 0: # <<<<<<<<<<<<<< @@ -11571,7 +11568,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_t_5 = ((__pyx_v_self->strand == 0) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":281 + /* "_rnaseq_utils.pyx":282 * self.weight = self.weight + other.weight * if self.strand == 0: * self.strand = other.strand # <<<<<<<<<<<<<< @@ -11581,7 +11578,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_t_7 = __pyx_v_other->strand; __pyx_v_self->strand = __pyx_t_7; - /* "_rnaseq_utils.pyx":280 + /* "_rnaseq_utils.pyx":281 * self.capped = self.capped or other.capped * self.weight = self.weight + other.weight * if self.strand == 0: # <<<<<<<<<<<<<< @@ -11590,7 +11587,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna */ } - /* "_rnaseq_utils.pyx":283 + /* "_rnaseq_utils.pyx":284 * self.strand = other.strand * * if self.overlaps(other): # The two ranges overlap to some degree # <<<<<<<<<<<<<< @@ -11600,34 +11597,34 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_t_5 = (((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->overlaps(__pyx_v_self, __pyx_v_other, 0) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":284 + /* "_rnaseq_utils.pyx":285 * * if self.overlaps(other): # The two ranges overlap to some degree * junctions = self.junctions() + other.junctions() # <<<<<<<<<<<<<< * self.ranges = collapse_blocks(self.ranges + other.ranges) * new_gaps = self.gaps() */ - __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->junctions(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->junctions(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other->__pyx_vtab)->junctions(__pyx_v_other, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other->__pyx_vtab)->junctions(__pyx_v_other, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 284, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_junctions = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":285 + /* "_rnaseq_utils.pyx":286 * if self.overlaps(other): # The two ranges overlap to some degree * junctions = self.junctions() + other.junctions() * self.ranges = collapse_blocks(self.ranges + other.ranges) # <<<<<<<<<<<<<< * new_gaps = self.gaps() * self.splice = [gap in junctions for gap in new_gaps] */ - __pyx_t_3 = PyNumber_Add(__pyx_v_self->ranges, __pyx_v_other->ranges); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_self->ranges, __pyx_v_other->ranges); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __pyx_f_13_rnaseq_utils_collapse_blocks(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 285, __pyx_L1_error) + __pyx_t_2 = __pyx_f_13_rnaseq_utils_collapse_blocks(((PyObject*)__pyx_t_3), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -11636,19 +11633,19 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_v_self->ranges = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":286 + /* "_rnaseq_utils.pyx":287 * junctions = self.junctions() + other.junctions() * self.ranges = collapse_blocks(self.ranges + other.ranges) * new_gaps = self.gaps() # <<<<<<<<<<<<<< * self.splice = [gap in junctions for gap in new_gaps] * elif self < other: # self is strictly left of other */ - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->gaps(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->gaps(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_new_gaps = __pyx_t_2; __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":287 + /* "_rnaseq_utils.pyx":288 * self.ranges = collapse_blocks(self.ranges + other.ranges) * new_gaps = self.gaps() * self.splice = [gap in junctions for gap in new_gaps] # <<<<<<<<<<<<<< @@ -11656,32 +11653,32 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna * self.ranges = self.ranges + other.ranges */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 287, __pyx_L14_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_new_gaps)) || PyTuple_CheckExact(__pyx_v_new_gaps)) { __pyx_t_3 = __pyx_v_new_gaps; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_new_gaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 287, __pyx_L14_error) + __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_new_gaps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 287, __pyx_L14_error) + __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L14_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 287, __pyx_L14_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 288, __pyx_L14_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L14_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 287, __pyx_L14_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 288, __pyx_L14_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L14_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -11691,7 +11688,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 287, __pyx_L14_error) + else __PYX_ERR(0, 288, __pyx_L14_error) } break; } @@ -11699,10 +11696,10 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna } __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_gap, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr7__pyx_v_gap, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 287, __pyx_L14_error) - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 287, __pyx_L14_error) + __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_8genexpr7__pyx_v_gap, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 288, __pyx_L14_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 287, __pyx_L14_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 288, __pyx_L14_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -11719,7 +11716,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_v_self->splice = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":283 + /* "_rnaseq_utils.pyx":284 * self.strand = other.strand * * if self.overlaps(other): # The two ranges overlap to some degree # <<<<<<<<<<<<<< @@ -11729,26 +11726,26 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna goto __pyx_L11; } - /* "_rnaseq_utils.pyx":288 + /* "_rnaseq_utils.pyx":289 * new_gaps = self.gaps() * self.splice = [gap in junctions for gap in new_gaps] * elif self < other: # self is strictly left of other # <<<<<<<<<<<<<< * self.ranges = self.ranges + other.ranges * self.splice = self.splice + [False] + other.splice # Join the two ranges with a gap */ - __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error) - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 288, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":289 + /* "_rnaseq_utils.pyx":290 * self.splice = [gap in junctions for gap in new_gaps] * elif self < other: # self is strictly left of other * self.ranges = self.ranges + other.ranges # <<<<<<<<<<<<<< * self.splice = self.splice + [False] + other.splice # Join the two ranges with a gap * else: # self is strictly right of other */ - __pyx_t_2 = PyNumber_Add(__pyx_v_self->ranges, __pyx_v_other->ranges); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_self->ranges, __pyx_v_other->ranges); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->ranges); @@ -11756,22 +11753,22 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_v_self->ranges = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":290 + /* "_rnaseq_utils.pyx":291 * elif self < other: # self is strictly left of other * self.ranges = self.ranges + other.ranges * self.splice = self.splice + [False] + other.splice # Join the two ranges with a gap # <<<<<<<<<<<<<< * else: # self is strictly right of other * self.ranges = other.ranges + self.ranges */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyList_SET_ITEM(__pyx_t_2, 0, Py_False); - __pyx_t_3 = PyNumber_Add(__pyx_v_self->splice, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_self->splice, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_other->splice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_other->splice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -11780,7 +11777,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_v_self->splice = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":288 + /* "_rnaseq_utils.pyx":289 * new_gaps = self.gaps() * self.splice = [gap in junctions for gap in new_gaps] * elif self < other: # self is strictly left of other # <<<<<<<<<<<<<< @@ -11790,7 +11787,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna goto __pyx_L11; } - /* "_rnaseq_utils.pyx":292 + /* "_rnaseq_utils.pyx":293 * self.splice = self.splice + [False] + other.splice # Join the two ranges with a gap * else: # self is strictly right of other * self.ranges = other.ranges + self.ranges # <<<<<<<<<<<<<< @@ -11798,7 +11795,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna * */ /*else*/ { - __pyx_t_2 = PyNumber_Add(__pyx_v_other->ranges, __pyx_v_self->ranges); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_other->ranges, __pyx_v_self->ranges); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->ranges); @@ -11806,22 +11803,22 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_v_self->ranges = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":293 + /* "_rnaseq_utils.pyx":294 * else: # self is strictly right of other * self.ranges = other.ranges + self.ranges * self.splice = other.splice + [False] + self.splice # Join the two ranges with a gap # <<<<<<<<<<<<<< * * self.span = (self.left(), self.right()) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyList_SET_ITEM(__pyx_t_2, 0, Py_False); - __pyx_t_3 = PyNumber_Add(__pyx_v_other->splice, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_v_other->splice, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_self->splice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_self->splice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -11832,7 +11829,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna } __pyx_L11:; - /* "_rnaseq_utils.pyx":295 + /* "_rnaseq_utils.pyx":296 * self.splice = other.splice + [False] + self.splice # Join the two ranges with a gap * * self.span = (self.left(), self.right()) # <<<<<<<<<<<<<< @@ -11843,7 +11840,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_t_10.f1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->right(__pyx_v_self, 0); __pyx_v_self->span = __pyx_t_10; - /* "_rnaseq_utils.pyx":296 + /* "_rnaseq_utils.pyx":297 * * self.span = (self.left(), self.right()) * return True # <<<<<<<<<<<<<< @@ -11853,7 +11850,7 @@ static int __pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(struct __pyx_obj_13_rna __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":270 + /* "_rnaseq_utils.pyx":271 * return True * * cpdef bint merge(self, RNAseqMapping other): # <<<<<<<<<<<<<< @@ -11887,7 +11884,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_49merge(PyObject *__py PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("merge (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 270, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_other), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "other", 0))) __PYX_ERR(0, 271, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_48merge(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_other)); /* function exit code */ @@ -11908,7 +11905,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_48merge(struct __pyx_o int __pyx_clineno = 0; __Pyx_RefNannySetupContext("merge", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_13RNAseqMapping_merge(__pyx_v_self, __pyx_v_other, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -11925,7 +11922,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_48merge(struct __pyx_o return __pyx_r; } -/* "_rnaseq_utils.pyx":298 +/* "_rnaseq_utils.pyx":299 * return True * * cpdef str get_node_labels(self, bint record_artifacts=False, bint condense=False): # <<<<<<<<<<<<<< @@ -11979,13 +11976,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_node_labels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_node_labels); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_51get_node_labels)) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_record_artifacts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_record_artifacts); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_condense); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_condense); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL; @@ -12003,7 +12000,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12013,7 +12010,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_4}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12021,7 +12018,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -12032,12 +12029,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 298, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 299, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -12056,14 +12053,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct #endif } - /* "_rnaseq_utils.pyx":301 + /* "_rnaseq_utils.pyx":302 * """Returns a string with one label for each edge of each range in self.ranges.""" * cdef str startchar, endchar, gapchar * gapchar = ['AD','..','DA'][1+self.strand] # <<<<<<<<<<<<<< * startchar = ['.',['S','C'][self.capped]][int(self.s_tag or (record_artifacts and self.s_len > 0))] * endchar = ['.','E'][int(self.e_tag or (record_artifacts and self.e_len > 0))] */ - __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_u_AD); __Pyx_GIVEREF(__pyx_n_u_AD); @@ -12075,20 +12072,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __Pyx_GIVEREF(__pyx_n_u_DA); PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_u_DA); __pyx_t_9 = (1 + __pyx_v_self->strand); - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_1, __pyx_t_9, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_1, __pyx_t_9, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_gapchar = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":302 + /* "_rnaseq_utils.pyx":303 * cdef str startchar, endchar, gapchar * gapchar = ['AD','..','DA'][1+self.strand] * startchar = ['.',['S','C'][self.capped]][int(self.s_tag or (record_artifacts and self.s_len > 0))] # <<<<<<<<<<<<<< * endchar = ['.','E'][int(self.e_tag or (record_artifacts and self.e_len > 0))] * if record_artifacts: */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_S); __Pyx_GIVEREF(__pyx_n_u_S); @@ -12096,10 +12093,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __Pyx_INCREF(__pyx_n_u_C); __Pyx_GIVEREF(__pyx_n_u_C); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_C); - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_t_2, __pyx_v_self->capped, int, 1, __Pyx_PyBool_FromLong, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_t_2, __pyx_v_self->capped, int, 1, __Pyx_PyBool_FromLong, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u__9); __Pyx_GIVEREF(__pyx_kp_u__9); @@ -12109,7 +12106,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __pyx_t_1 = 0; if (!__pyx_v_self->s_tag) { } else { - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->s_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->s_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; @@ -12117,37 +12114,37 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct } if (__pyx_v_record_artifacts) { } else { - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_record_artifacts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_record_artifacts); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L3_bool_binop_done; } __pyx_t_10 = (__pyx_v_self->s_len > 0); - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_t_5; __pyx_t_5 = 0; __pyx_L3_bool_binop_done:; - __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 302, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 303, __pyx_L1_error) __pyx_v_startchar = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":303 + /* "_rnaseq_utils.pyx":304 * gapchar = ['AD','..','DA'][1+self.strand] * startchar = ['.',['S','C'][self.capped]][int(self.s_tag or (record_artifacts and self.s_len > 0))] * endchar = ['.','E'][int(self.e_tag or (record_artifacts and self.e_len > 0))] # <<<<<<<<<<<<<< * if record_artifacts: * if startchar != '.' and not self.s_tag: */ - __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u__9); __Pyx_GIVEREF(__pyx_kp_u__9); @@ -12157,7 +12154,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_E); if (!__pyx_v_self->e_tag) { } else { - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->e_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->e_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; @@ -12165,30 +12162,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct } if (__pyx_v_record_artifacts) { } else { - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_record_artifacts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_record_artifacts); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L6_bool_binop_done; } __pyx_t_10 = (__pyx_v_self->e_len > 0); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = __pyx_t_2; __pyx_t_2 = 0; __pyx_L6_bool_binop_done:; - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 303, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 303, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 304, __pyx_L1_error) __pyx_v_endchar = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":304 + /* "_rnaseq_utils.pyx":305 * startchar = ['.',['S','C'][self.capped]][int(self.s_tag or (record_artifacts and self.s_len > 0))] * endchar = ['.','E'][int(self.e_tag or (record_artifacts and self.e_len > 0))] * if record_artifacts: # <<<<<<<<<<<<<< @@ -12198,14 +12195,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __pyx_t_10 = (__pyx_v_record_artifacts != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":305 + /* "_rnaseq_utils.pyx":306 * endchar = ['.','E'][int(self.e_tag or (record_artifacts and self.e_len > 0))] * if record_artifacts: * if startchar != '.' and not self.s_tag: # <<<<<<<<<<<<<< * startchar = '>' * */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_startchar, __pyx_kp_u__9, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 305, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_startchar, __pyx_kp_u__9, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 306, __pyx_L1_error) __pyx_t_12 = (__pyx_t_11 != 0); if (__pyx_t_12) { } else { @@ -12217,7 +12214,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __pyx_L11_bool_binop_done:; if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":306 + /* "_rnaseq_utils.pyx":307 * if record_artifacts: * if startchar != '.' and not self.s_tag: * startchar = '>' # <<<<<<<<<<<<<< @@ -12227,7 +12224,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __Pyx_INCREF(__pyx_kp_u__2); __Pyx_DECREF_SET(__pyx_v_startchar, __pyx_kp_u__2); - /* "_rnaseq_utils.pyx":305 + /* "_rnaseq_utils.pyx":306 * endchar = ['.','E'][int(self.e_tag or (record_artifacts and self.e_len > 0))] * if record_artifacts: * if startchar != '.' and not self.s_tag: # <<<<<<<<<<<<<< @@ -12236,14 +12233,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct */ } - /* "_rnaseq_utils.pyx":308 + /* "_rnaseq_utils.pyx":309 * startchar = '>' * * if endchar != '.' and not self.e_tag: # <<<<<<<<<<<<<< * endchar = '<' * */ - __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_v_endchar, __pyx_kp_u__9, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 308, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_v_endchar, __pyx_kp_u__9, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 309, __pyx_L1_error) __pyx_t_11 = (__pyx_t_12 != 0); if (__pyx_t_11) { } else { @@ -12255,7 +12252,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __pyx_L14_bool_binop_done:; if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":309 + /* "_rnaseq_utils.pyx":310 * * if endchar != '.' and not self.e_tag: * endchar = '<' # <<<<<<<<<<<<<< @@ -12265,7 +12262,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __Pyx_INCREF(__pyx_kp_u__3); __Pyx_DECREF_SET(__pyx_v_endchar, __pyx_kp_u__3); - /* "_rnaseq_utils.pyx":308 + /* "_rnaseq_utils.pyx":309 * startchar = '>' * * if endchar != '.' and not self.e_tag: # <<<<<<<<<<<<<< @@ -12274,7 +12271,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct */ } - /* "_rnaseq_utils.pyx":304 + /* "_rnaseq_utils.pyx":305 * startchar = ['.',['S','C'][self.capped]][int(self.s_tag or (record_artifacts and self.s_len > 0))] * endchar = ['.','E'][int(self.e_tag or (record_artifacts and self.e_len > 0))] * if record_artifacts: # <<<<<<<<<<<<<< @@ -12283,7 +12280,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct */ } - /* "_rnaseq_utils.pyx":311 + /* "_rnaseq_utils.pyx":312 * endchar = '<' * * if self.strand == -1: # <<<<<<<<<<<<<< @@ -12293,7 +12290,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __pyx_t_10 = ((__pyx_v_self->strand == -1L) != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":312 + /* "_rnaseq_utils.pyx":313 * * if self.strand == -1: * startchar, endchar = endchar, startchar # <<<<<<<<<<<<<< @@ -12307,7 +12304,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __pyx_v_endchar = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":311 + /* "_rnaseq_utils.pyx":312 * endchar = '<' * * if self.strand == -1: # <<<<<<<<<<<<<< @@ -12316,7 +12313,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct */ } - /* "_rnaseq_utils.pyx":314 + /* "_rnaseq_utils.pyx":315 * startchar, endchar = endchar, startchar * * if condense: # <<<<<<<<<<<<<< @@ -12326,14 +12323,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __pyx_t_10 = (__pyx_v_condense != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":315 + /* "_rnaseq_utils.pyx":316 * * if condense: * startchar = startchar.lower() # <<<<<<<<<<<<<< * endchar = endchar.lower() * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_startchar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_startchar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -12347,21 +12344,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct } __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 315, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 315, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 316, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_startchar, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":316 + /* "_rnaseq_utils.pyx":317 * if condense: * startchar = startchar.lower() * endchar = endchar.lower() # <<<<<<<<<<<<<< * * return ''.join([startchar]+[gapchar if i else '..' for i in self.splice]+[endchar]) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_endchar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_endchar, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -12375,14 +12372,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct } __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 316, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 316, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 317, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_endchar, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":314 + /* "_rnaseq_utils.pyx":315 * startchar, endchar = endchar, startchar * * if condense: # <<<<<<<<<<<<<< @@ -12391,7 +12388,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct */ } - /* "_rnaseq_utils.pyx":318 + /* "_rnaseq_utils.pyx":319 * endchar = endchar.lower() * * return ''.join([startchar]+[gapchar if i else '..' for i in self.splice]+[endchar]) # <<<<<<<<<<<<<< @@ -12399,30 +12396,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct * cpdef write_as_elr(self, bint as_string=True, bint record_artifacts=False, bint condense=False, bint endweights=False): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_startchar); __Pyx_GIVEREF(__pyx_v_startchar); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_startchar); { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L20_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_self->splice == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 318, __pyx_L20_error) + __PYX_ERR(0, 319, __pyx_L20_error) } __pyx_t_1 = __pyx_v_self->splice; __Pyx_INCREF(__pyx_t_1); __pyx_t_15 = 0; for (;;) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_8); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 318, __pyx_L20_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_8); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 319, __pyx_L20_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 318, __pyx_L20_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 319, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_XDECREF_SET(__pyx_8genexpr8__pyx_v_i, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_8genexpr8__pyx_v_i); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 318, __pyx_L20_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_8genexpr8__pyx_v_i); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 319, __pyx_L20_error) if (__pyx_t_10) { __Pyx_INCREF(__pyx_v_gapchar); __pyx_t_8 = __pyx_v_gapchar; @@ -12430,7 +12427,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct __Pyx_INCREF(__pyx_kp_u__8); __pyx_t_8 = __pyx_kp_u__8; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 318, __pyx_L20_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 319, __pyx_L20_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -12441,27 +12438,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels(struct goto __pyx_L1_error; __pyx_L23_exit_scope:; } /* exit inner scope */ - __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_endchar); __Pyx_GIVEREF(__pyx_v_endchar); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_endchar); - __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":298 + /* "_rnaseq_utils.pyx":299 * return True * * cpdef str get_node_labels(self, bint record_artifacts=False, bint condense=False): # <<<<<<<<<<<<<< @@ -12531,7 +12528,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_51get_node_labels(PyOb } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_labels") < 0)) __PYX_ERR(0, 298, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_node_labels") < 0)) __PYX_ERR(0, 299, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -12544,19 +12541,19 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_51get_node_labels(PyOb } } if (values[0]) { - __pyx_v_record_artifacts = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_record_artifacts == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error) + __pyx_v_record_artifacts = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_record_artifacts == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 299, __pyx_L3_error) } else { __pyx_v_record_artifacts = ((int)0); } if (values[1]) { - __pyx_v_condense = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_condense == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 298, __pyx_L3_error) + __pyx_v_condense = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_condense == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 299, __pyx_L3_error) } else { __pyx_v_condense = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_node_labels", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 298, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_node_labels", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 299, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.get_node_labels", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -12582,7 +12579,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_50get_node_labels(stru __pyx_t_2.__pyx_n = 2; __pyx_t_2.record_artifacts = __pyx_v_record_artifacts; __pyx_t_2.condense = __pyx_v_condense; - __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping->get_node_labels(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 298, __pyx_L1_error) + __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping->get_node_labels(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -12599,7 +12596,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_50get_node_labels(stru return __pyx_r; } -/* "_rnaseq_utils.pyx":320 +/* "_rnaseq_utils.pyx":321 * return ''.join([startchar]+[gapchar if i else '..' for i in self.splice]+[endchar]) * * cpdef write_as_elr(self, bint as_string=True, bint record_artifacts=False, bint condense=False, bint endweights=False): # <<<<<<<<<<<<<< @@ -12675,17 +12672,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_as_elr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_as_elr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_53write_as_elr)) { __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_as_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_as_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_record_artifacts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_record_artifacts); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_condense); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_condense); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_endweights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_endweights); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = __pyx_t_1; __pyx_t_8 = NULL; @@ -12703,7 +12700,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12715,7 +12712,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[5] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 4+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -12725,7 +12722,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p } else #endif { - __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(4+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -12742,7 +12739,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_6 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -12765,7 +12762,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p #endif } - /* "_rnaseq_utils.pyx":325 + /* "_rnaseq_utils.pyx":326 * cdef str elr_strand, labels, weightstring * cdef list block_ends, elr_line * elr_strand = '.' # <<<<<<<<<<<<<< @@ -12775,7 +12772,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_INCREF(__pyx_kp_u__9); __pyx_v_elr_strand = __pyx_kp_u__9; - /* "_rnaseq_utils.pyx":326 + /* "_rnaseq_utils.pyx":327 * cdef list block_ends, elr_line * elr_strand = '.' * if self.strand == 1: # <<<<<<<<<<<<<< @@ -12785,7 +12782,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p switch (__pyx_v_self->strand) { case 1: - /* "_rnaseq_utils.pyx":327 + /* "_rnaseq_utils.pyx":328 * elr_strand = '.' * if self.strand == 1: * elr_strand = '+' # <<<<<<<<<<<<<< @@ -12795,7 +12792,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_INCREF(__pyx_kp_u__10); __Pyx_DECREF_SET(__pyx_v_elr_strand, __pyx_kp_u__10); - /* "_rnaseq_utils.pyx":326 + /* "_rnaseq_utils.pyx":327 * cdef list block_ends, elr_line * elr_strand = '.' * if self.strand == 1: # <<<<<<<<<<<<<< @@ -12805,7 +12802,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p break; case -1L: - /* "_rnaseq_utils.pyx":329 + /* "_rnaseq_utils.pyx":330 * elr_strand = '+' * elif self.strand == -1: * elr_strand = '-' # <<<<<<<<<<<<<< @@ -12815,7 +12812,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_INCREF(__pyx_kp_u__11); __Pyx_DECREF_SET(__pyx_v_elr_strand, __pyx_kp_u__11); - /* "_rnaseq_utils.pyx":328 + /* "_rnaseq_utils.pyx":329 * if self.strand == 1: * elr_strand = '+' * elif self.strand == -1: # <<<<<<<<<<<<<< @@ -12826,7 +12823,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p default: break; } - /* "_rnaseq_utils.pyx":331 + /* "_rnaseq_utils.pyx":332 * elr_strand = '-' * * block_ends = flatten(self.ranges) # <<<<<<<<<<<<<< @@ -12835,13 +12832,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p */ __pyx_t_1 = __pyx_v_self->ranges; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_13_rnaseq_utils_flatten(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L1_error) + __pyx_t_2 = __pyx_f_13_rnaseq_utils_flatten(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_block_ends = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":332 + /* "_rnaseq_utils.pyx":333 * * block_ends = flatten(self.ranges) * lengths = [block_ends[i]-block_ends[i-1] for i in range(1,len(block_ends))] # <<<<<<<<<<<<<< @@ -12849,41 +12846,41 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p * EL_CIGAR = ''.join([str(a)+str(b) for a,b in zip(labels,lengths+[''])]) */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_block_ends == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 332, __pyx_L1_error) + __PYX_ERR(0, 333, __pyx_L1_error) } - __pyx_t_11 = PyList_GET_SIZE(__pyx_v_block_ends); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_11 = PyList_GET_SIZE(__pyx_v_block_ends); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 333, __pyx_L1_error) __pyx_t_12 = __pyx_t_11; for (__pyx_t_13 = 1; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { __pyx_8genexpr9__pyx_v_i = __pyx_t_13; if (unlikely(__pyx_v_block_ends == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 332, __pyx_L1_error) + __PYX_ERR(0, 333, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_block_ends, __pyx_8genexpr9__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_block_ends, __pyx_8genexpr9__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_block_ends == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 332, __pyx_L1_error) + __PYX_ERR(0, 333, __pyx_L1_error) } __pyx_t_14 = (__pyx_8genexpr9__pyx_v_i - 1); - __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_block_ends, __pyx_t_14, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_block_ends, __pyx_t_14, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = PyNumber_Subtract(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 332, __pyx_L1_error) + __pyx_t_10 = PyNumber_Subtract(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 332, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_10))) __PYX_ERR(0, 333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } } /* exit inner scope */ __pyx_v_lengths = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":333 + /* "_rnaseq_utils.pyx":334 * block_ends = flatten(self.ranges) * lengths = [block_ends[i]-block_ends[i-1] for i in range(1,len(block_ends))] * labels = self.get_node_labels(record_artifacts, condense) # <<<<<<<<<<<<<< @@ -12893,12 +12890,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __pyx_t_15.__pyx_n = 2; __pyx_t_15.record_artifacts = __pyx_v_record_artifacts; __pyx_t_15.condense = __pyx_v_condense; - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->get_node_labels(__pyx_v_self, 0, &__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 333, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->get_node_labels(__pyx_v_self, 0, &__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_labels = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":334 + /* "_rnaseq_utils.pyx":335 * lengths = [block_ends[i]-block_ends[i-1] for i in range(1,len(block_ends))] * labels = self.get_node_labels(record_artifacts, condense) * EL_CIGAR = ''.join([str(a)+str(b) for a,b in zip(labels,lengths+[''])]) # <<<<<<<<<<<<<< @@ -12906,17 +12903,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p * if endweights and (self.s_tag or self.e_tag): */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_10 = PyList_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_kp_u__7); __Pyx_GIVEREF(__pyx_kp_u__7); PyList_SET_ITEM(__pyx_t_10, 0, __pyx_kp_u__7); - __pyx_t_7 = PyNumber_Add(__pyx_v_lengths, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_7 = PyNumber_Add(__pyx_v_lengths, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_INCREF(__pyx_v_labels); __Pyx_GIVEREF(__pyx_v_labels); @@ -12924,16 +12921,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_10 = __pyx_t_7; __Pyx_INCREF(__pyx_t_10); __pyx_t_11 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_11 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 335, __pyx_L7_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -12941,17 +12938,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p if (likely(PyList_CheckExact(__pyx_t_10))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 335, __pyx_L7_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_11); __Pyx_INCREF(__pyx_t_7); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 335, __pyx_L7_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -12961,7 +12958,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 334, __pyx_L7_error) + else __PYX_ERR(0, 335, __pyx_L7_error) } break; } @@ -12973,7 +12970,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 334, __pyx_L7_error) + __PYX_ERR(0, 335, __pyx_L7_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -12986,15 +12983,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_5 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_17 = Py_TYPE(__pyx_t_5)->tp_iternext; @@ -13002,7 +12999,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_6 = __pyx_t_17(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_5), 2) < 0) __PYX_ERR(0, 334, __pyx_L7_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_5), 2) < 0) __PYX_ERR(0, 335, __pyx_L7_error) __pyx_t_17 = NULL; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L11_unpacking_done; @@ -13010,22 +13007,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_17 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 334, __pyx_L7_error) + __PYX_ERR(0, 335, __pyx_L7_error) __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_a, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr10__pyx_v_b, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr10__pyx_v_a); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr10__pyx_v_a); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr10__pyx_v_b); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr10__pyx_v_b); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyUnicode_Concat(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 334, __pyx_L7_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 335, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -13038,13 +13035,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p goto __pyx_L1_error; __pyx_L12_exit_scope:; } /* exit inner scope */ - __pyx_t_10 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 334, __pyx_L1_error) + __pyx_t_10 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_EL_CIGAR = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":335 + /* "_rnaseq_utils.pyx":336 * labels = self.get_node_labels(record_artifacts, condense) * EL_CIGAR = ''.join([str(a)+str(b) for a,b in zip(labels,lengths+[''])]) * read_len = self.right() - self.left() # <<<<<<<<<<<<<< @@ -13053,7 +13050,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p */ __pyx_v_read_len = (((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->right(__pyx_v_self, 0) - ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->left(__pyx_v_self, 0)); - /* "_rnaseq_utils.pyx":336 + /* "_rnaseq_utils.pyx":337 * EL_CIGAR = ''.join([str(a)+str(b) for a,b in zip(labels,lengths+[''])]) * read_len = self.right() - self.left() * if endweights and (self.s_tag or self.e_tag): # <<<<<<<<<<<<<< @@ -13077,26 +13074,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __pyx_L14_bool_binop_done:; if (__pyx_t_18) { - /* "_rnaseq_utils.pyx":337 + /* "_rnaseq_utils.pyx":338 * read_len = self.right() - self.left() * if endweights and (self.s_tag or self.e_tag): * weightstring = '{}|{}|{}'.format( # <<<<<<<<<<<<<< * round(self.weight,2), * round(float(self.attributes.get('S.reads', 0))+float(self.attributes.get('S.capped', 0)),2), */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__12, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__12, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_rnaseq_utils.pyx":338 + /* "_rnaseq_utils.pyx":339 * if endweights and (self.s_tag or self.e_tag): * weightstring = '{}|{}|{}'.format( * round(self.weight,2), # <<<<<<<<<<<<<< * round(float(self.attributes.get('S.reads', 0))+float(self.attributes.get('S.capped', 0)),2), * round(float(self.attributes.get('E.reads', 0)),2) */ - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); @@ -13104,11 +13101,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_2); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":339 + /* "_rnaseq_utils.pyx":340 * weightstring = '{}|{}|{}'.format( * round(self.weight,2), * round(float(self.attributes.get('S.reads', 0))+float(self.attributes.get('S.capped', 0)),2), # <<<<<<<<<<<<<< @@ -13117,23 +13114,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p */ if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 339, __pyx_L1_error) + __PYX_ERR(0, 340, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_kp_u_S_reads, __pyx_int_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_kp_u_S_reads, __pyx_int_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_20 = __Pyx_PyObject_AsDouble(__pyx_t_6); if (unlikely(__pyx_t_20 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyObject_AsDouble(__pyx_t_6); if (unlikely(__pyx_t_20 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 339, __pyx_L1_error) + __PYX_ERR(0, 340, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_kp_u_S_capped, __pyx_int_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_kp_u_S_capped, __pyx_int_0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_21 = __Pyx_PyObject_AsDouble(__pyx_t_6); if (unlikely(__pyx_t_21 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_21 = __Pyx_PyObject_AsDouble(__pyx_t_6); if (unlikely(__pyx_t_21 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyFloat_FromDouble((__pyx_t_20 + __pyx_t_21)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble((__pyx_t_20 + __pyx_t_21)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); @@ -13141,11 +13138,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_2); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":340 + /* "_rnaseq_utils.pyx":341 * round(self.weight,2), * round(float(self.attributes.get('S.reads', 0))+float(self.attributes.get('S.capped', 0)),2), * round(float(self.attributes.get('E.reads', 0)),2) # <<<<<<<<<<<<<< @@ -13154,14 +13151,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p */ if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 340, __pyx_L1_error) + __PYX_ERR(0, 341, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_kp_u_E_reads, __pyx_int_0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_kp_u_E_reads, __pyx_int_0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); @@ -13169,7 +13166,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_2); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -13187,7 +13184,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_1, __pyx_t_6, __pyx_t_5}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -13198,7 +13195,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_1, __pyx_t_6, __pyx_t_5}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -13207,7 +13204,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p } else #endif { - __pyx_t_4 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -13221,24 +13218,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_5 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 337, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":337 + /* "_rnaseq_utils.pyx":338 * read_len = self.right() - self.left() * if endweights and (self.s_tag or self.e_tag): * weightstring = '{}|{}|{}'.format( # <<<<<<<<<<<<<< * round(self.weight,2), * round(float(self.attributes.get('S.reads', 0))+float(self.attributes.get('S.capped', 0)),2), */ - if (!(likely(PyUnicode_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 337, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 338, __pyx_L1_error) __pyx_v_weightstring = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":336 + /* "_rnaseq_utils.pyx":337 * EL_CIGAR = ''.join([str(a)+str(b) for a,b in zip(labels,lengths+[''])]) * read_len = self.right() - self.left() * if endweights and (self.s_tag or self.e_tag): # <<<<<<<<<<<<<< @@ -13248,7 +13245,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p goto __pyx_L13; } - /* "_rnaseq_utils.pyx":343 + /* "_rnaseq_utils.pyx":344 * ) * else: * weightstring = str(round(self.weight,2)) # <<<<<<<<<<<<<< @@ -13256,9 +13253,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p * elr_line = [self.chrom, self.left(), read_len, elr_strand, EL_CIGAR, self.source, weightstring] */ /*else*/ { - __pyx_t_10 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_10); @@ -13266,10 +13263,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_weightstring = ((PyObject*)__pyx_t_2); @@ -13277,22 +13274,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p } __pyx_L13:; - /* "_rnaseq_utils.pyx":345 + /* "_rnaseq_utils.pyx":346 * weightstring = str(round(self.weight,2)) * * elr_line = [self.chrom, self.left(), read_len, elr_strand, EL_CIGAR, self.source, weightstring] # <<<<<<<<<<<<<< * if as_string: * return '\t'.join([str(i) for i in elr_line]) */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->left(__pyx_v_self, 0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->left(__pyx_v_self, 0)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_read_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_read_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->source); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->source); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyList_New(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 345, __pyx_L1_error) + __pyx_t_6 = PyList_New(7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); @@ -13318,7 +13315,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __pyx_v_elr_line = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":346 + /* "_rnaseq_utils.pyx":347 * * elr_line = [self.chrom, self.left(), read_len, elr_strand, EL_CIGAR, self.source, weightstring] * if as_string: # <<<<<<<<<<<<<< @@ -13328,7 +13325,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p __pyx_t_18 = (__pyx_v_as_string != 0); if (__pyx_t_18) { - /* "_rnaseq_utils.pyx":347 + /* "_rnaseq_utils.pyx":348 * elr_line = [self.chrom, self.left(), read_len, elr_strand, EL_CIGAR, self.source, weightstring] * if as_string: * return '\t'.join([str(i) for i in elr_line]) # <<<<<<<<<<<<<< @@ -13337,22 +13334,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 347, __pyx_L20_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 348, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_5 = __pyx_v_elr_line; __Pyx_INCREF(__pyx_t_5); __pyx_t_11 = 0; for (;;) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 347, __pyx_L20_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 348, __pyx_L20_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L20_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_9genexpr11__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr11__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 347, __pyx_L20_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr11__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 348, __pyx_L20_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 347, __pyx_L20_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 348, __pyx_L20_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -13363,14 +13360,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p goto __pyx_L1_error; __pyx_L23_exit_scope:; } /* exit inner scope */ - __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__13, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 347, __pyx_L1_error) + __pyx_t_5 = PyUnicode_Join(__pyx_kp_u__13, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":346 + /* "_rnaseq_utils.pyx":347 * * elr_line = [self.chrom, self.left(), read_len, elr_strand, EL_CIGAR, self.source, weightstring] * if as_string: # <<<<<<<<<<<<<< @@ -13379,7 +13376,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p */ } - /* "_rnaseq_utils.pyx":349 + /* "_rnaseq_utils.pyx":350 * return '\t'.join([str(i) for i in elr_line]) * else: * return elr_line # <<<<<<<<<<<<<< @@ -13393,7 +13390,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr(struct __p goto __pyx_L0; } - /* "_rnaseq_utils.pyx":320 + /* "_rnaseq_utils.pyx":321 * return ''.join([startchar]+[gapchar if i else '..' for i in self.splice]+[endchar]) * * cpdef write_as_elr(self, bint as_string=True, bint record_artifacts=False, bint condense=False, bint endweights=False): # <<<<<<<<<<<<<< @@ -13489,7 +13486,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_53write_as_elr(PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_as_elr") < 0)) __PYX_ERR(0, 320, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_as_elr") < 0)) __PYX_ERR(0, 321, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -13506,29 +13503,29 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_53write_as_elr(PyObjec } } if (values[0]) { - __pyx_v_as_string = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_as_string == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error) + __pyx_v_as_string = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_as_string == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error) } else { __pyx_v_as_string = ((int)1); } if (values[1]) { - __pyx_v_record_artifacts = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_record_artifacts == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error) + __pyx_v_record_artifacts = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_record_artifacts == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error) } else { __pyx_v_record_artifacts = ((int)0); } if (values[2]) { - __pyx_v_condense = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_condense == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error) + __pyx_v_condense = __Pyx_PyObject_IsTrue(values[2]); if (unlikely((__pyx_v_condense == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error) } else { __pyx_v_condense = ((int)0); } if (values[3]) { - __pyx_v_endweights = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_endweights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 320, __pyx_L3_error) + __pyx_v_endweights = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_endweights == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 321, __pyx_L3_error) } else { __pyx_v_endweights = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_as_elr", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 320, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_as_elr", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 321, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.write_as_elr", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -13556,7 +13553,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_52write_as_elr(struct __pyx_t_2.record_artifacts = __pyx_v_record_artifacts; __pyx_t_2.condense = __pyx_v_condense; __pyx_t_2.endweights = __pyx_v_endweights; - __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping->write_as_elr(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 320, __pyx_L1_error) + __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping->write_as_elr(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -13573,7 +13570,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_52write_as_elr(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":351 +/* "_rnaseq_utils.pyx":352 * return elr_line * * cpdef write_as_bed(self, chrom_array, source_array, as_string=True, score_column='weight', record_artifacts=False, name_attr=None, color=None, condense=False, longStart=None, longEnd=None): # <<<<<<<<<<<<<< @@ -13667,7 +13664,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_as_bed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_as_bed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqMapping_55write_as_bed)) { __Pyx_XDECREF(__pyx_r); @@ -13687,7 +13684,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[11] = {__pyx_t_4, __pyx_v_chrom_array, __pyx_v_source_array, __pyx_v_as_string, __pyx_v_score_column, __pyx_v_record_artifacts, __pyx_v_name_attr, __pyx_v_color, __pyx_v_condense, __pyx_v_longStart, __pyx_v_longEnd}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 10+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 10+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -13695,13 +13692,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[11] = {__pyx_t_4, __pyx_v_chrom_array, __pyx_v_source_array, __pyx_v_as_string, __pyx_v_score_column, __pyx_v_record_artifacts, __pyx_v_name_attr, __pyx_v_color, __pyx_v_condense, __pyx_v_longStart, __pyx_v_longEnd}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 10+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 10+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(10+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(10+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -13736,7 +13733,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_INCREF(__pyx_v_longEnd); __Pyx_GIVEREF(__pyx_v_longEnd); PyTuple_SET_ITEM(__pyx_t_6, 9+__pyx_t_5, __pyx_v_longEnd); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -13759,24 +13756,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p #endif } - /* "_rnaseq_utils.pyx":355 + /* "_rnaseq_utils.pyx":356 * in a 15-column BED format""" * cdef int chromStart, chromEnd * labels = self.get_node_labels(record_artifacts, condense) # <<<<<<<<<<<<<< * bed_strand = '.' * if self.strand == 1: */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_record_artifacts); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_condense); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_record_artifacts); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_condense); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 356, __pyx_L1_error) __pyx_t_9.__pyx_n = 2; __pyx_t_9.record_artifacts = __pyx_t_7; __pyx_t_9.condense = __pyx_t_8; - __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->get_node_labels(__pyx_v_self, 0, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 355, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->get_node_labels(__pyx_v_self, 0, &__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_labels = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":356 + /* "_rnaseq_utils.pyx":357 * cdef int chromStart, chromEnd * labels = self.get_node_labels(record_artifacts, condense) * bed_strand = '.' # <<<<<<<<<<<<<< @@ -13786,7 +13783,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_INCREF(__pyx_kp_u__9); __pyx_v_bed_strand = __pyx_kp_u__9; - /* "_rnaseq_utils.pyx":357 + /* "_rnaseq_utils.pyx":358 * labels = self.get_node_labels(record_artifacts, condense) * bed_strand = '.' * if self.strand == 1: # <<<<<<<<<<<<<< @@ -13796,7 +13793,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p switch (__pyx_v_self->strand) { case 1: - /* "_rnaseq_utils.pyx":358 + /* "_rnaseq_utils.pyx":359 * bed_strand = '.' * if self.strand == 1: * bed_strand = '+' # <<<<<<<<<<<<<< @@ -13806,7 +13803,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_INCREF(__pyx_kp_u__10); __Pyx_DECREF_SET(__pyx_v_bed_strand, __pyx_kp_u__10); - /* "_rnaseq_utils.pyx":357 + /* "_rnaseq_utils.pyx":358 * labels = self.get_node_labels(record_artifacts, condense) * bed_strand = '.' * if self.strand == 1: # <<<<<<<<<<<<<< @@ -13816,7 +13813,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p break; case -1L: - /* "_rnaseq_utils.pyx":360 + /* "_rnaseq_utils.pyx":361 * bed_strand = '+' * elif self.strand == -1: * bed_strand = '-' # <<<<<<<<<<<<<< @@ -13826,7 +13823,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_INCREF(__pyx_kp_u__11); __Pyx_DECREF_SET(__pyx_v_bed_strand, __pyx_kp_u__11); - /* "_rnaseq_utils.pyx":359 + /* "_rnaseq_utils.pyx":360 * if self.strand == 1: * bed_strand = '+' * elif self.strand == -1: # <<<<<<<<<<<<<< @@ -13837,45 +13834,45 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p default: break; } - /* "_rnaseq_utils.pyx":362 + /* "_rnaseq_utils.pyx":363 * bed_strand = '-' * * l = labels[0] # <<<<<<<<<<<<<< * r = labels[-1] * ends = l+r */ - __pyx_t_10 = __Pyx_GetItemInt_Unicode(__pyx_v_labels, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == (Py_UCS4)-1)) __PYX_ERR(0, 362, __pyx_L1_error) - __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 362, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetItemInt_Unicode(__pyx_v_labels, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_10 == (Py_UCS4)-1)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_l = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":363 + /* "_rnaseq_utils.pyx":364 * * l = labels[0] * r = labels[-1] # <<<<<<<<<<<<<< * ends = l+r * if color is None: */ - __pyx_t_10 = __Pyx_GetItemInt_Unicode(__pyx_v_labels, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_10 == (Py_UCS4)-1)) __PYX_ERR(0, 363, __pyx_L1_error) - __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error) + __pyx_t_10 = __Pyx_GetItemInt_Unicode(__pyx_v_labels, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_10 == (Py_UCS4)-1)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_r = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":364 + /* "_rnaseq_utils.pyx":365 * l = labels[0] * r = labels[-1] * ends = l+r # <<<<<<<<<<<<<< * if color is None: * rgb = '0,0,0' */ - __pyx_t_1 = PyNumber_Add(__pyx_v_l, __pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 364, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_v_l, __pyx_v_r); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ends = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":365 + /* "_rnaseq_utils.pyx":366 * r = labels[-1] * ends = l+r * if color is None: # <<<<<<<<<<<<<< @@ -13886,7 +13883,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":366 + /* "_rnaseq_utils.pyx":367 * ends = l+r * if color is None: * rgb = '0,0,0' # <<<<<<<<<<<<<< @@ -13896,7 +13893,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_INCREF(__pyx_kp_u_0_0_0); __pyx_v_rgb = __pyx_kp_u_0_0_0; - /* "_rnaseq_utils.pyx":367 + /* "_rnaseq_utils.pyx":368 * if color is None: * rgb = '0,0,0' * if ends in ['SE','ES']: # <<<<<<<<<<<<<< @@ -13905,35 +13902,35 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ __Pyx_INCREF(__pyx_v_ends); __pyx_t_1 = __pyx_v_ends; - __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_SE, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_SE, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 368, __pyx_L1_error) if (!__pyx_t_8) { } else { __pyx_t_7 = __pyx_t_8; goto __pyx_L5_bool_binop_done; } - __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_ES, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 367, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_ES, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 368, __pyx_L1_error) __pyx_t_7 = __pyx_t_8; __pyx_L5_bool_binop_done:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":368 + /* "_rnaseq_utils.pyx":369 * rgb = '0,0,0' * if ends in ['SE','ES']: * rgb = bed_colors['SE'] # <<<<<<<<<<<<<< * elif ends in ['CE','EC']: * rgb = bed_colors['CE'] */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_SE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_SE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_rgb, __pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":367 + /* "_rnaseq_utils.pyx":368 * if color is None: * rgb = '0,0,0' * if ends in ['SE','ES']: # <<<<<<<<<<<<<< @@ -13943,7 +13940,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L4; } - /* "_rnaseq_utils.pyx":369 + /* "_rnaseq_utils.pyx":370 * if ends in ['SE','ES']: * rgb = bed_colors['SE'] * elif ends in ['CE','EC']: # <<<<<<<<<<<<<< @@ -13952,35 +13949,35 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ __Pyx_INCREF(__pyx_v_ends); __pyx_t_2 = __pyx_v_ends; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_CE, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_CE, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 370, __pyx_L1_error) if (!__pyx_t_7) { } else { __pyx_t_8 = __pyx_t_7; goto __pyx_L7_bool_binop_done; } - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_EC, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 369, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_EC, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 370, __pyx_L1_error) __pyx_t_8 = __pyx_t_7; __pyx_L7_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":370 + /* "_rnaseq_utils.pyx":371 * rgb = bed_colors['SE'] * elif ends in ['CE','EC']: * rgb = bed_colors['CE'] # <<<<<<<<<<<<<< * elif 'C' in ends: * rgb = bed_colors['C'] */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_CE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 370, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_CE); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_rgb, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":369 + /* "_rnaseq_utils.pyx":370 * if ends in ['SE','ES']: * rgb = bed_colors['SE'] * elif ends in ['CE','EC']: # <<<<<<<<<<<<<< @@ -13990,33 +13987,33 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L4; } - /* "_rnaseq_utils.pyx":371 + /* "_rnaseq_utils.pyx":372 * elif ends in ['CE','EC']: * rgb = bed_colors['CE'] * elif 'C' in ends: # <<<<<<<<<<<<<< * rgb = bed_colors['C'] * elif 'S' in ends: */ - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_C, __pyx_v_ends, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 371, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_C, __pyx_v_ends, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 372, __pyx_L1_error) __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":372 + /* "_rnaseq_utils.pyx":373 * rgb = bed_colors['CE'] * elif 'C' in ends: * rgb = bed_colors['C'] # <<<<<<<<<<<<<< * elif 'S' in ends: * rgb = bed_colors['S'] */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 372, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_C); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_rgb, __pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":371 + /* "_rnaseq_utils.pyx":372 * elif ends in ['CE','EC']: * rgb = bed_colors['CE'] * elif 'C' in ends: # <<<<<<<<<<<<<< @@ -14026,33 +14023,33 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L4; } - /* "_rnaseq_utils.pyx":373 + /* "_rnaseq_utils.pyx":374 * elif 'C' in ends: * rgb = bed_colors['C'] * elif 'S' in ends: # <<<<<<<<<<<<<< * rgb = bed_colors['S'] * elif 'E' in ends: */ - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_S, __pyx_v_ends, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 373, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_S, __pyx_v_ends, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 374, __pyx_L1_error) __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":374 + /* "_rnaseq_utils.pyx":375 * rgb = bed_colors['C'] * elif 'S' in ends: * rgb = bed_colors['S'] # <<<<<<<<<<<<<< * elif 'E' in ends: * rgb = bed_colors['E'] */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 374, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 374, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_S); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_rgb, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":373 + /* "_rnaseq_utils.pyx":374 * elif 'C' in ends: * rgb = bed_colors['C'] * elif 'S' in ends: # <<<<<<<<<<<<<< @@ -14062,33 +14059,33 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L4; } - /* "_rnaseq_utils.pyx":375 + /* "_rnaseq_utils.pyx":376 * elif 'S' in ends: * rgb = bed_colors['S'] * elif 'E' in ends: # <<<<<<<<<<<<<< * rgb = bed_colors['E'] * else: */ - __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_E, __pyx_v_ends, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 375, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_E, __pyx_v_ends, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 376, __pyx_L1_error) __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":376 + /* "_rnaseq_utils.pyx":377 * rgb = bed_colors['S'] * elif 'E' in ends: * rgb = bed_colors['E'] # <<<<<<<<<<<<<< * else: * rgb = bed_colors['U'] */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 376, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_E); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Dict_GetItem(__pyx_t_1, __pyx_n_u_E); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_rgb, __pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":375 + /* "_rnaseq_utils.pyx":376 * elif 'S' in ends: * rgb = bed_colors['S'] * elif 'E' in ends: # <<<<<<<<<<<<<< @@ -14098,7 +14095,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L4; } - /* "_rnaseq_utils.pyx":378 + /* "_rnaseq_utils.pyx":379 * rgb = bed_colors['E'] * else: * rgb = bed_colors['U'] # <<<<<<<<<<<<<< @@ -14106,9 +14103,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p * rgb = color */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 378, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_bed_colors); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_U); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 378, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_t_2, __pyx_n_u_U); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_rgb, __pyx_t_1); @@ -14116,7 +14113,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p } __pyx_L4:; - /* "_rnaseq_utils.pyx":365 + /* "_rnaseq_utils.pyx":366 * r = labels[-1] * ends = l+r * if color is None: # <<<<<<<<<<<<<< @@ -14126,7 +14123,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L3; } - /* "_rnaseq_utils.pyx":380 + /* "_rnaseq_utils.pyx":381 * rgb = bed_colors['U'] * else: * rgb = color # <<<<<<<<<<<<<< @@ -14139,7 +14136,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p } __pyx_L3:; - /* "_rnaseq_utils.pyx":382 + /* "_rnaseq_utils.pyx":383 * rgb = color * * name = '.' # <<<<<<<<<<<<<< @@ -14149,7 +14146,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_INCREF(__pyx_kp_u__9); __pyx_v_name = __pyx_kp_u__9; - /* "_rnaseq_utils.pyx":383 + /* "_rnaseq_utils.pyx":384 * * name = '.' * if name_attr is not None: # <<<<<<<<<<<<<< @@ -14160,7 +14157,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":384 + /* "_rnaseq_utils.pyx":385 * name = '.' * if name_attr is not None: * name = self.attributes.get(name_attr, '.') # <<<<<<<<<<<<<< @@ -14169,14 +14166,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 384, __pyx_L1_error) + __PYX_ERR(0, 385, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_v_name_attr, __pyx_kp_u__9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_v_name_attr, __pyx_kp_u__9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_name, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":383 + /* "_rnaseq_utils.pyx":384 * * name = '.' * if name_attr is not None: # <<<<<<<<<<<<<< @@ -14185,26 +14182,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ } - /* "_rnaseq_utils.pyx":386 + /* "_rnaseq_utils.pyx":387 * name = self.attributes.get(name_attr, '.') * * if score_column == 'weight': # <<<<<<<<<<<<<< * score = round(self.weight,2) * elif score_column == 'coverage': */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_score_column, __pyx_n_u_weight, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 386, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_score_column, __pyx_n_u_weight, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 387, __pyx_L1_error) if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":387 + /* "_rnaseq_utils.pyx":388 * * if score_column == 'weight': * score = round(self.weight,2) # <<<<<<<<<<<<<< * elif score_column == 'coverage': * score = round(self.coverage,2) */ - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -14212,13 +14209,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 387, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_score = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":386 + /* "_rnaseq_utils.pyx":387 * name = self.attributes.get(name_attr, '.') * * if score_column == 'weight': # <<<<<<<<<<<<<< @@ -14228,26 +14225,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L10; } - /* "_rnaseq_utils.pyx":388 + /* "_rnaseq_utils.pyx":389 * if score_column == 'weight': * score = round(self.weight,2) * elif score_column == 'coverage': # <<<<<<<<<<<<<< * score = round(self.coverage,2) * else: */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_score_column, __pyx_n_u_coverage, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 388, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_score_column, __pyx_n_u_coverage, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 389, __pyx_L1_error) if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":389 + /* "_rnaseq_utils.pyx":390 * score = round(self.weight,2) * elif score_column == 'coverage': * score = round(self.coverage,2) # <<<<<<<<<<<<<< * else: * score = str(score_column) */ - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->coverage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->coverage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -14255,13 +14252,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_score = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":388 + /* "_rnaseq_utils.pyx":389 * if score_column == 'weight': * score = round(self.weight,2) * elif score_column == 'coverage': # <<<<<<<<<<<<<< @@ -14271,7 +14268,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L10; } - /* "_rnaseq_utils.pyx":391 + /* "_rnaseq_utils.pyx":392 * score = round(self.coverage,2) * else: * score = str(score_column) # <<<<<<<<<<<<<< @@ -14279,14 +14276,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p * chromStart = self.ranges[0][0] */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_score_column); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_v_score_column); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_score = __pyx_t_1; __pyx_t_1 = 0; } __pyx_L10:; - /* "_rnaseq_utils.pyx":393 + /* "_rnaseq_utils.pyx":394 * score = str(score_column) * * chromStart = self.ranges[0][0] # <<<<<<<<<<<<<< @@ -14295,18 +14292,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 393, __pyx_L1_error) + __PYX_ERR(0, 394, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 393, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_chromStart = __pyx_t_5; - /* "_rnaseq_utils.pyx":394 + /* "_rnaseq_utils.pyx":395 * * chromStart = self.ranges[0][0] * chromEnd = self.right() # <<<<<<<<<<<<<< @@ -14315,7 +14312,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ __pyx_v_chromEnd = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->right(__pyx_v_self, 0); - /* "_rnaseq_utils.pyx":395 + /* "_rnaseq_utils.pyx":396 * chromStart = self.ranges[0][0] * chromEnd = self.right() * if longStart is None: # <<<<<<<<<<<<<< @@ -14326,19 +14323,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":396 + /* "_rnaseq_utils.pyx":397 * chromEnd = self.right() * if longStart is None: * longStart = chromStart # <<<<<<<<<<<<<< * else: * self.ranges[0] = (min(self.ranges[0][0],longStart), self.ranges[0][1]) */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_chromStart); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 396, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_chromStart); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_longStart, __pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":395 + /* "_rnaseq_utils.pyx":396 * chromStart = self.ranges[0][0] * chromEnd = self.right() * if longStart is None: # <<<<<<<<<<<<<< @@ -14348,7 +14345,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L11; } - /* "_rnaseq_utils.pyx":398 + /* "_rnaseq_utils.pyx":399 * longStart = chromStart * else: * self.ranges[0] = (min(self.ranges[0][0],longStart), self.ranges[0][1]) # <<<<<<<<<<<<<< @@ -14360,15 +14357,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __pyx_t_2 = __pyx_v_longStart; if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 398, __pyx_L1_error) + __PYX_ERR(0, 399, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 398, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_8) { __Pyx_INCREF(__pyx_t_2); @@ -14381,14 +14378,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 398, __pyx_L1_error) + __PYX_ERR(0, 399, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 398, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -14399,14 +14396,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __pyx_t_3 = 0; if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 398, __pyx_L1_error) + __PYX_ERR(0, 399, __pyx_L1_error) } - if (unlikely(__Pyx_SetItemInt(__pyx_v_self->ranges, 0, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 398, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_self->ranges, 0, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 399, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L11:; - /* "_rnaseq_utils.pyx":400 + /* "_rnaseq_utils.pyx":401 * self.ranges[0] = (min(self.ranges[0][0],longStart), self.ranges[0][1]) * * if longEnd is None: # <<<<<<<<<<<<<< @@ -14417,19 +14414,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":401 + /* "_rnaseq_utils.pyx":402 * * if longEnd is None: * longEnd = chromEnd # <<<<<<<<<<<<<< * else: * self.ranges[-1] = (self.ranges[-1][0], max(self.ranges[-1][1],longEnd)) */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_chromEnd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 401, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_chromEnd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF_SET(__pyx_v_longEnd, __pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":400 + /* "_rnaseq_utils.pyx":401 * self.ranges[0] = (min(self.ranges[0][0],longStart), self.ranges[0][1]) * * if longEnd is None: # <<<<<<<<<<<<<< @@ -14439,7 +14436,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L12; } - /* "_rnaseq_utils.pyx":403 + /* "_rnaseq_utils.pyx":404 * longEnd = chromEnd * else: * self.ranges[-1] = (self.ranges[-1][0], max(self.ranges[-1][1],longEnd)) # <<<<<<<<<<<<<< @@ -14449,26 +14446,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p /*else*/ { if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 403, __pyx_L1_error) + __PYX_ERR(0, 404, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v_longEnd); __pyx_t_2 = __pyx_v_longEnd; if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 403, __pyx_L1_error) + __PYX_ERR(0, 404, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 403, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_2, __pyx_t_6, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 404, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_7) { __Pyx_INCREF(__pyx_t_2); @@ -14479,7 +14476,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 403, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); @@ -14490,14 +14487,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 403, __pyx_L1_error) + __PYX_ERR(0, 404, __pyx_L1_error) } - if (unlikely(__Pyx_SetItemInt(__pyx_v_self->ranges, -1L, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 403, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_self->ranges, -1L, __pyx_t_2, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 404, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __pyx_L12:; - /* "_rnaseq_utils.pyx":405 + /* "_rnaseq_utils.pyx":406 * self.ranges[-1] = (self.ranges[-1][0], max(self.ranges[-1][1],longEnd)) * * longStart, blockStarts, blockSizes = explode_block_ranges(self.ranges) # <<<<<<<<<<<<<< @@ -14506,7 +14503,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ __pyx_t_2 = __pyx_v_self->ranges; __Pyx_INCREF(__pyx_t_2); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_explode_block_ranges(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_explode_block_ranges(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -14515,7 +14512,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p if (unlikely(size != 3)) { if (size > 3) __Pyx_RaiseTooManyValuesError(3); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 405, __pyx_L1_error) + __PYX_ERR(0, 406, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -14531,17 +14528,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 405, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -14551,7 +14548,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_GOTREF(__pyx_t_3); index = 2; __pyx_t_6 = __pyx_t_11(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L13_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_4), 3) < 0) __PYX_ERR(0, 405, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_4), 3) < 0) __PYX_ERR(0, 406, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L14_unpacking_done; @@ -14559,7 +14556,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 405, __pyx_L1_error) + __PYX_ERR(0, 406, __pyx_L1_error) __pyx_L14_unpacking_done:; } __Pyx_DECREF_SET(__pyx_v_longStart, __pyx_t_2); @@ -14569,29 +14566,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __pyx_v_blockSizes = __pyx_t_6; __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":407 + /* "_rnaseq_utils.pyx":408 * longStart, blockStarts, blockSizes = explode_block_ranges(self.ranges) * bed_line = [ * chrom_array[self.chrom], longStart, longEnd, # <<<<<<<<<<<<<< * name, score, bed_strand, chromStart, chromEnd, rgb, * len(self.ranges), */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_chrom_array, __pyx_v_self->chrom, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 407, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_chrom_array, __pyx_v_self->chrom, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "_rnaseq_utils.pyx":408 + /* "_rnaseq_utils.pyx":409 * bed_line = [ * chrom_array[self.chrom], longStart, longEnd, * name, score, bed_strand, chromStart, chromEnd, rgb, # <<<<<<<<<<<<<< * len(self.ranges), * ','.join([str(i-1) for i in blockSizes]), */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_chromStart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_chromStart); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_chromEnd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 408, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_chromEnd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 409, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "_rnaseq_utils.pyx":409 + /* "_rnaseq_utils.pyx":410 * chrom_array[self.chrom], longStart, longEnd, * name, score, bed_strand, chromStart, chromEnd, rgb, * len(self.ranges), # <<<<<<<<<<<<<< @@ -14602,14 +14599,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 409, __pyx_L1_error) + __PYX_ERR(0, 410, __pyx_L1_error) } - __pyx_t_12 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_12 = PyList_GET_SIZE(__pyx_t_2); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 409, __pyx_L1_error) + __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "_rnaseq_utils.pyx":410 + /* "_rnaseq_utils.pyx":411 * name, score, bed_strand, chromStart, chromEnd, rgb, * len(self.ranges), * ','.join([str(i-1) for i in blockSizes]), # <<<<<<<<<<<<<< @@ -14617,32 +14614,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p * round(self.weight,2), source_array[self.source], labels */ { /* enter inner scope */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_v_blockSizes)) || PyTuple_CheckExact(__pyx_v_blockSizes)) { __pyx_t_13 = __pyx_v_blockSizes; __Pyx_INCREF(__pyx_t_13); __pyx_t_12 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_blockSizes); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_12 = -1; __pyx_t_13 = PyObject_GetIter(__pyx_v_blockSizes); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 411, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 411, __pyx_L17_error) } for (;;) { if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_13))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_15 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_12); __Pyx_INCREF(__pyx_t_15); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_15 = PyList_GET_ITEM(__pyx_t_13, __pyx_t_12); __Pyx_INCREF(__pyx_t_15); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 411, __pyx_L17_error) #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_13, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_15 = PySequence_ITEM(__pyx_t_13, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 411, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_15); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_13)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_12); __Pyx_INCREF(__pyx_t_15); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_13, __pyx_t_12); __Pyx_INCREF(__pyx_t_15); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 411, __pyx_L17_error) #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_13, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_15 = PySequence_ITEM(__pyx_t_13, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 411, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_15); #endif } @@ -14652,7 +14649,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 410, __pyx_L17_error) + else __PYX_ERR(0, 411, __pyx_L17_error) } break; } @@ -14660,12 +14657,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p } __Pyx_XDECREF_SET(__pyx_9genexpr12__pyx_v_i, __pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = __Pyx_PyInt_SubtractObjC(__pyx_9genexpr12__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_15 = __Pyx_PyInt_SubtractObjC(__pyx_9genexpr12__pyx_v_i, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 411, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 410, __pyx_L17_error) + __pyx_t_16 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 411, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_16))) __PYX_ERR(0, 410, __pyx_L17_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_16))) __PYX_ERR(0, 411, __pyx_L17_error) __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; } __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; @@ -14676,11 +14673,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L1_error; __pyx_L20_exit_scope:; } /* exit inner scope */ - __pyx_t_13 = PyUnicode_Join(__pyx_kp_u__14, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 410, __pyx_L1_error) + __pyx_t_13 = PyUnicode_Join(__pyx_kp_u__14, __pyx_t_4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":411 + /* "_rnaseq_utils.pyx":412 * len(self.ranges), * ','.join([str(i-1) for i in blockSizes]), * ','.join([str(i) for i in blockStarts]), # <<<<<<<<<<<<<< @@ -14688,32 +14685,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p * ] */ { /* enter inner scope */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L23_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_v_blockStarts)) || PyTuple_CheckExact(__pyx_v_blockStarts)) { __pyx_t_16 = __pyx_v_blockStarts; __Pyx_INCREF(__pyx_t_16); __pyx_t_12 = 0; __pyx_t_14 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_v_blockStarts); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 411, __pyx_L23_error) + __pyx_t_12 = -1; __pyx_t_16 = PyObject_GetIter(__pyx_v_blockStarts); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 412, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_16); - __pyx_t_14 = Py_TYPE(__pyx_t_16)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 411, __pyx_L23_error) + __pyx_t_14 = Py_TYPE(__pyx_t_16)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 412, __pyx_L23_error) } for (;;) { if (likely(!__pyx_t_14)) { if (likely(PyList_CheckExact(__pyx_t_16))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_16)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_15 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_12); __Pyx_INCREF(__pyx_t_15); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 411, __pyx_L23_error) + __pyx_t_15 = PyList_GET_ITEM(__pyx_t_16, __pyx_t_12); __Pyx_INCREF(__pyx_t_15); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 412, __pyx_L23_error) #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_16, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 411, __pyx_L23_error) + __pyx_t_15 = PySequence_ITEM(__pyx_t_16, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 412, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_15); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_16)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_12); __Pyx_INCREF(__pyx_t_15); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 411, __pyx_L23_error) + __pyx_t_15 = PyTuple_GET_ITEM(__pyx_t_16, __pyx_t_12); __Pyx_INCREF(__pyx_t_15); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 412, __pyx_L23_error) #else - __pyx_t_15 = PySequence_ITEM(__pyx_t_16, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 411, __pyx_L23_error) + __pyx_t_15 = PySequence_ITEM(__pyx_t_16, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 412, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_15); #endif } @@ -14723,7 +14720,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 411, __pyx_L23_error) + else __PYX_ERR(0, 412, __pyx_L23_error) } break; } @@ -14731,9 +14728,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p } __Pyx_XDECREF_SET(__pyx_9genexpr13__pyx_v_i, __pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr13__pyx_v_i); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 411, __pyx_L23_error) + __pyx_t_15 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr13__pyx_v_i); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 412, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_15); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_15))) __PYX_ERR(0, 411, __pyx_L23_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_15))) __PYX_ERR(0, 412, __pyx_L23_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; } __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; @@ -14744,20 +14741,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L1_error; __pyx_L26_exit_scope:; } /* exit inner scope */ - __pyx_t_16 = PyUnicode_Join(__pyx_kp_u__14, __pyx_t_4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 411, __pyx_L1_error) + __pyx_t_16 = PyUnicode_Join(__pyx_kp_u__14, __pyx_t_4); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 412, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":412 + /* "_rnaseq_utils.pyx":413 * ','.join([str(i-1) for i in blockSizes]), * ','.join([str(i) for i in blockStarts]), * round(self.weight,2), source_array[self.source], labels # <<<<<<<<<<<<<< * ] * if as_string: */ - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_15 = PyTuple_New(2); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_4); @@ -14765,20 +14762,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_int_2); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_15, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_source_array, __pyx_v_self->source, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 412, __pyx_L1_error) + __pyx_t_15 = __Pyx_GetItemInt(__pyx_v_source_array, __pyx_v_self->source, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 413, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - /* "_rnaseq_utils.pyx":406 + /* "_rnaseq_utils.pyx":407 * * longStart, blockStarts, blockSizes = explode_block_ranges(self.ranges) * bed_line = [ # <<<<<<<<<<<<<< * chrom_array[self.chrom], longStart, longEnd, * name, score, bed_strand, chromStart, chromEnd, rgb, */ - __pyx_t_17 = PyList_New(15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 406, __pyx_L1_error) + __pyx_t_17 = PyList_New(15); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_17, 0, __pyx_t_1); @@ -14828,17 +14825,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p __pyx_v_bed_line = ((PyObject*)__pyx_t_17); __pyx_t_17 = 0; - /* "_rnaseq_utils.pyx":414 + /* "_rnaseq_utils.pyx":415 * round(self.weight,2), source_array[self.source], labels * ] * if as_string: # <<<<<<<<<<<<<< * return '\t'.join([str(i) for i in bed_line]) * else: */ - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_as_string); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 414, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_v_as_string); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 415, __pyx_L1_error) if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":415 + /* "_rnaseq_utils.pyx":416 * ] * if as_string: * return '\t'.join([str(i) for i in bed_line]) # <<<<<<<<<<<<<< @@ -14847,22 +14844,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_17 = PyList_New(0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 415, __pyx_L30_error) + __pyx_t_17 = PyList_New(0); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 416, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_15 = __pyx_v_bed_line; __Pyx_INCREF(__pyx_t_15); __pyx_t_12 = 0; for (;;) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_15)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 415, __pyx_L30_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 416, __pyx_L30_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L30_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_9genexpr14__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr14__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L30_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_9genexpr14__pyx_v_i); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 416, __pyx_L30_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_17, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 415, __pyx_L30_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_17, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 416, __pyx_L30_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -14873,14 +14870,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L1_error; __pyx_L33_exit_scope:; } /* exit inner scope */ - __pyx_t_15 = PyUnicode_Join(__pyx_kp_u__13, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 415, __pyx_L1_error) + __pyx_t_15 = PyUnicode_Join(__pyx_kp_u__13, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_r = __pyx_t_15; __pyx_t_15 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":414 + /* "_rnaseq_utils.pyx":415 * round(self.weight,2), source_array[self.source], labels * ] * if as_string: # <<<<<<<<<<<<<< @@ -14889,7 +14886,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p */ } - /* "_rnaseq_utils.pyx":417 + /* "_rnaseq_utils.pyx":418 * return '\t'.join([str(i) for i in bed_line]) * else: * return bed_line # <<<<<<<<<<<<<< @@ -14903,7 +14900,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed(struct __p goto __pyx_L0; } - /* "_rnaseq_utils.pyx":351 + /* "_rnaseq_utils.pyx":352 * return elr_line * * cpdef write_as_bed(self, chrom_array, source_array, as_string=True, score_column='weight', record_artifacts=False, name_attr=None, color=None, condense=False, longStart=None, longEnd=None): # <<<<<<<<<<<<<< @@ -15013,7 +15010,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_55write_as_bed(PyObjec case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source_array)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("write_as_bed", 0, 2, 10, 1); __PYX_ERR(0, 351, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_as_bed", 0, 2, 10, 1); __PYX_ERR(0, 352, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -15065,7 +15062,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_55write_as_bed(PyObjec } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_as_bed") < 0)) __PYX_ERR(0, 351, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_as_bed") < 0)) __PYX_ERR(0, 352, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -15104,7 +15101,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_55write_as_bed(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_as_bed", 0, 2, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 351, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_as_bed", 0, 2, 10, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 352, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.write_as_bed", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -15136,7 +15133,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_54write_as_bed(struct __pyx_t_2.condense = __pyx_v_condense; __pyx_t_2.longStart = __pyx_v_longStart; __pyx_t_2.longEnd = __pyx_v_longEnd; - __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping->write_as_bed(__pyx_v_self, __pyx_v_chrom_array, __pyx_v_source_array, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L1_error) + __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping->write_as_bed(__pyx_v_self, __pyx_v_chrom_array, __pyx_v_source_array, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -15153,7 +15150,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_54write_as_bed(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":419 +/* "_rnaseq_utils.pyx":420 * return bed_line * * def write_as_gtf(self, list chrom_array, str source): # <<<<<<<<<<<<<< @@ -15196,11 +15193,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_57write_as_gtf(PyObjec case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("write_as_gtf", 1, 2, 2, 1); __PYX_ERR(0, 419, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_as_gtf", 1, 2, 2, 1); __PYX_ERR(0, 420, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_as_gtf") < 0)) __PYX_ERR(0, 419, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_as_gtf") < 0)) __PYX_ERR(0, 420, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -15213,14 +15210,14 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_57write_as_gtf(PyObjec } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_as_gtf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 419, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_as_gtf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 420, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.write_as_gtf", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom_array), (&PyList_Type), 1, "chrom_array", 1))) __PYX_ERR(0, 419, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), (&PyUnicode_Type), 1, "source", 1))) __PYX_ERR(0, 419, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom_array), (&PyList_Type), 1, "chrom_array", 1))) __PYX_ERR(0, 420, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_source), (&PyUnicode_Type), 1, "source", 1))) __PYX_ERR(0, 420, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self), __pyx_v_chrom_array, __pyx_v_source); /* function exit code */ @@ -15259,7 +15256,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("write_as_gtf", 0); - /* "_rnaseq_utils.pyx":424 + /* "_rnaseq_utils.pyx":425 * passed in the 'transcript' line.""" * #TODO: Implement export as GTF * cdef str gtf_txt = '' # <<<<<<<<<<<<<< @@ -15269,7 +15266,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __Pyx_INCREF(__pyx_kp_u__7); __pyx_v_gtf_txt = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":425 + /* "_rnaseq_utils.pyx":426 * #TODO: Implement export as GTF * cdef str gtf_txt = '' * cdef str chrom = chrom_array[self.chrom] # <<<<<<<<<<<<<< @@ -15278,37 +15275,37 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct */ if (unlikely(__pyx_v_chrom_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 425, __pyx_L1_error) + __PYX_ERR(0, 426, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_chrom_array, __pyx_v_self->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_chrom_array, __pyx_v_self->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 425, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 426, __pyx_L1_error) __pyx_v_chrom = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":426 + /* "_rnaseq_utils.pyx":427 * cdef str gtf_txt = '' * cdef str chrom = chrom_array[self.chrom] * cdef str strand = {1:'+',-1:'-',0:'.'}[self.strand] # <<<<<<<<<<<<<< * if self.attributes is None: self.attributes = {} * frame = '.' */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, __pyx_kp_u__10) < 0) __PYX_ERR(0, 426, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_neg_1, __pyx_kp_u__11) < 0) __PYX_ERR(0, 426, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_int_0, __pyx_kp_u__9) < 0) __PYX_ERR(0, 426, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_int_1, __pyx_kp_u__10) < 0) __PYX_ERR(0, 427, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_int_neg_1, __pyx_kp_u__11) < 0) __PYX_ERR(0, 427, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_int_0, __pyx_kp_u__9) < 0) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 426, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 426, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 427, __pyx_L1_error) __pyx_v_strand = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":427 + /* "_rnaseq_utils.pyx":428 * cdef str chrom = chrom_array[self.chrom] * cdef str strand = {1:'+',-1:'-',0:'.'}[self.strand] * if self.attributes is None: self.attributes = {} # <<<<<<<<<<<<<< @@ -15318,7 +15315,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __pyx_t_4 = (__pyx_v_self->attributes == ((PyObject*)Py_None)); __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 427, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 428, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->attributes); @@ -15327,7 +15324,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __pyx_t_3 = 0; } - /* "_rnaseq_utils.pyx":428 + /* "_rnaseq_utils.pyx":429 * cdef str strand = {1:'+',-1:'-',0:'.'}[self.strand] * if self.attributes is None: self.attributes = {} * frame = '.' # <<<<<<<<<<<<<< @@ -15337,16 +15334,16 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __Pyx_INCREF(__pyx_kp_u__9); __pyx_v_frame = __pyx_kp_u__9; - /* "_rnaseq_utils.pyx":429 + /* "_rnaseq_utils.pyx":430 * if self.attributes is None: self.attributes = {} * frame = '.' * cdef str score = str(round(self.coverage,2)) # <<<<<<<<<<<<<< * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'transcript', self.left()+1, self.right(), score, strand, frame, self.print_attributes('gtf',True)) * for left,right in self.ranges: */ - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->coverage); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_self->coverage); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); @@ -15354,31 +15351,31 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_int_2); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 429, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_score = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":430 + /* "_rnaseq_utils.pyx":431 * frame = '.' * cdef str score = str(round(self.coverage,2)) * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'transcript', self.left()+1, self.right(), score, strand, frame, self.print_attributes('gtf',True)) # <<<<<<<<<<<<<< * for left,right in self.ranges: * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'exon', left+1, right, score, strand, frame, self.print_attributes('gtf',False)) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__15, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__15, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_From_long((((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->left(__pyx_v_self, 0) + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long((((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->left(__pyx_v_self, 0) + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->right(__pyx_v_self, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_self->__pyx_vtab)->right(__pyx_v_self, 0)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_print_attributes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_print_attributes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -15396,7 +15393,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[10] = {__pyx_t_7, __pyx_v_chrom, __pyx_v_source, __pyx_n_u_transcript, __pyx_t_1, __pyx_t_6, __pyx_v_score, __pyx_v_strand, __pyx_v_frame, __pyx_t_8}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -15407,7 +15404,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[10] = {__pyx_t_7, __pyx_v_chrom, __pyx_v_source, __pyx_n_u_transcript, __pyx_t_1, __pyx_t_6, __pyx_v_score, __pyx_v_strand, __pyx_v_frame, __pyx_t_8}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -15416,7 +15413,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct } else #endif { - __pyx_t_10 = PyTuple_New(9+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(9+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -15448,19 +15445,19 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_8 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_gtf_txt, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_gtf_txt, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 430, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_gtf_txt, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":431 + /* "_rnaseq_utils.pyx":432 * cdef str score = str(round(self.coverage,2)) * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'transcript', self.left()+1, self.right(), score, strand, frame, self.print_attributes('gtf',True)) * for left,right in self.ranges: # <<<<<<<<<<<<<< @@ -15469,15 +15466,15 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct */ if (unlikely(__pyx_v_self->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 431, __pyx_L1_error) + __PYX_ERR(0, 432, __pyx_L1_error) } __pyx_t_3 = __pyx_v_self->ranges; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0; for (;;) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 432, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { @@ -15486,7 +15483,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 431, __pyx_L1_error) + __PYX_ERR(0, 432, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -15499,15 +15496,15 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 431, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -15515,7 +15512,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_8 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 2) < 0) __PYX_ERR(0, 431, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 2) < 0) __PYX_ERR(0, 432, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L7_unpacking_done; @@ -15523,7 +15520,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 431, __pyx_L1_error) + __PYX_ERR(0, 432, __pyx_L1_error) __pyx_L7_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_v_left, __pyx_t_10); @@ -15531,20 +15528,20 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __Pyx_XDECREF_SET(__pyx_v_right, __pyx_t_8); __pyx_t_8 = 0; - /* "_rnaseq_utils.pyx":432 + /* "_rnaseq_utils.pyx":433 * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'transcript', self.left()+1, self.right(), score, strand, frame, self.print_attributes('gtf',True)) * for left,right in self.ranges: * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'exon', left+1, right, score, strand, frame, self.print_attributes('gtf',False)) # <<<<<<<<<<<<<< * * return gtf_txt[:-1] */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__15, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__15, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_left, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_AddObjC(__pyx_v_left, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_print_attributes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_print_attributes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -15562,7 +15559,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[10] = {__pyx_t_6, __pyx_v_chrom, __pyx_v_source, __pyx_n_u_exon, __pyx_t_10, __pyx_v_right, __pyx_v_score, __pyx_v_strand, __pyx_v_frame, __pyx_t_1}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -15572,7 +15569,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[10] = {__pyx_t_6, __pyx_v_chrom, __pyx_v_source, __pyx_n_u_exon, __pyx_t_10, __pyx_v_right, __pyx_v_score, __pyx_v_strand, __pyx_v_frame, __pyx_t_1}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 9+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; @@ -15580,7 +15577,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct } else #endif { - __pyx_t_7 = PyTuple_New(9+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(9+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -15612,19 +15609,19 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct PyTuple_SET_ITEM(__pyx_t_7, 8+__pyx_t_9, __pyx_t_1); __pyx_t_10 = 0; __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_gtf_txt, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_gtf_txt, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 432, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_gtf_txt, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "_rnaseq_utils.pyx":431 + /* "_rnaseq_utils.pyx":432 * cdef str score = str(round(self.coverage,2)) * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'transcript', self.left()+1, self.right(), score, strand, frame, self.print_attributes('gtf',True)) * for left,right in self.ranges: # <<<<<<<<<<<<<< @@ -15634,7 +15631,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":434 + /* "_rnaseq_utils.pyx":435 * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'exon', left+1, right, score, strand, frame, self.print_attributes('gtf',False)) * * return gtf_txt[:-1] # <<<<<<<<<<<<<< @@ -15644,15 +15641,15 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_gtf_txt == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 434, __pyx_L1_error) + __PYX_ERR(0, 435, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyUnicode_Substring(__pyx_v_gtf_txt, 0, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 434, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Substring(__pyx_v_gtf_txt, 0, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":419 + /* "_rnaseq_utils.pyx":420 * return bed_line * * def write_as_gtf(self, list chrom_array, str source): # <<<<<<<<<<<<<< @@ -15684,7 +15681,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_56write_as_gtf(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":436 +/* "_rnaseq_utils.pyx":437 * return gtf_txt[:-1] * * def print_attributes(self, format='gtf', full=True): # <<<<<<<<<<<<<< @@ -15735,7 +15732,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_59print_attributes(PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "print_attributes") < 0)) __PYX_ERR(0, 436, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "print_attributes") < 0)) __PYX_ERR(0, 437, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -15752,7 +15749,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqMapping_59print_attributes(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("print_attributes", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 436, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("print_attributes", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 437, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqMapping.print_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -15790,17 +15787,17 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("print_attributes", 0); - /* "_rnaseq_utils.pyx":439 + /* "_rnaseq_utils.pyx":440 * """Outputs a text string of the key:value pairs in self.attributes, * formatted as GTF or GTF.""" * if full: # <<<<<<<<<<<<<< * attributes = self.attributes * else: */ - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 439, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_full); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 440, __pyx_L1_error) if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":440 + /* "_rnaseq_utils.pyx":441 * formatted as GTF or GTF.""" * if full: * attributes = self.attributes # <<<<<<<<<<<<<< @@ -15812,7 +15809,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str __pyx_v_attributes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":439 + /* "_rnaseq_utils.pyx":440 * """Outputs a text string of the key:value pairs in self.attributes, * formatted as GTF or GTF.""" * if full: # <<<<<<<<<<<<<< @@ -15822,7 +15819,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str goto __pyx_L3; } - /* "_rnaseq_utils.pyx":442 + /* "_rnaseq_utils.pyx":443 * attributes = self.attributes * else: * attributes = {k:self.attributes[k] for k in ('gene_id','transcript_id')} # <<<<<<<<<<<<<< @@ -15831,26 +15828,26 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str */ /*else*/ { { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L6_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_tuple__18; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= 2) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 442, __pyx_L6_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 443, __pyx_L6_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L6_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_9genexpr15__pyx_v_k, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 442, __pyx_L6_error) + __PYX_ERR(0, 443, __pyx_L6_error) } - __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->attributes, __pyx_9genexpr15__pyx_v_k); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L6_error) + __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->attributes, __pyx_9genexpr15__pyx_v_k); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 443, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr15__pyx_v_k, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 442, __pyx_L6_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr15__pyx_v_k, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 443, __pyx_L6_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -15866,17 +15863,17 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str } __pyx_L3:; - /* "_rnaseq_utils.pyx":444 + /* "_rnaseq_utils.pyx":445 * attributes = {k:self.attributes[k] for k in ('gene_id','transcript_id')} * * if format == 'gtf': # <<<<<<<<<<<<<< * return ' '.join(['{} "{}";'.format(k,v) for k,v in attributes.items()]) * elif format == 'gff': */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_gtf, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 444, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_gtf, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 445, __pyx_L1_error) if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":445 + /* "_rnaseq_utils.pyx":446 * * if format == 'gtf': * return ' '.join(['{} "{}";'.format(k,v) for k,v in attributes.items()]) # <<<<<<<<<<<<<< @@ -15885,14 +15882,14 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L13_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = 0; if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 445, __pyx_L13_error) + __PYX_ERR(0, 446, __pyx_L13_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_attributes, 1, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L13_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_attributes, 1, __pyx_n_s_items, (&__pyx_t_6), (&__pyx_t_7)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_5; @@ -15900,14 +15897,14 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_6, &__pyx_t_4, &__pyx_t_5, &__pyx_t_8, NULL, __pyx_t_7); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 445, __pyx_L13_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_k, __pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr16__pyx_v_v, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__20, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L13_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__20, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_10 = NULL; __pyx_t_9 = 0; @@ -15924,7 +15921,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_9genexpr16__pyx_v_k, __pyx_9genexpr16__pyx_v_v}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 445, __pyx_L13_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_8); } else @@ -15932,13 +15929,13 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_9genexpr16__pyx_v_k, __pyx_9genexpr16__pyx_v_v}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 445, __pyx_L13_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_GOTREF(__pyx_t_8); } else #endif { - __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 445, __pyx_L13_error) + __pyx_t_11 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_10) { __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL; @@ -15949,12 +15946,12 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str __Pyx_INCREF(__pyx_9genexpr16__pyx_v_v); __Pyx_GIVEREF(__pyx_9genexpr16__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_9, __pyx_9genexpr16__pyx_v_v); - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 445, __pyx_L13_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 445, __pyx_L13_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 446, __pyx_L13_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -15967,14 +15964,14 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str goto __pyx_L1_error; __pyx_L16_exit_scope:; } /* exit inner scope */ - __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 445, __pyx_L1_error) + __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":444 + /* "_rnaseq_utils.pyx":445 * attributes = {k:self.attributes[k] for k in ('gene_id','transcript_id')} * * if format == 'gtf': # <<<<<<<<<<<<<< @@ -15983,17 +15980,17 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str */ } - /* "_rnaseq_utils.pyx":446 + /* "_rnaseq_utils.pyx":447 * if format == 'gtf': * return ' '.join(['{} "{}";'.format(k,v) for k,v in attributes.items()]) * elif format == 'gff': # <<<<<<<<<<<<<< * return ' '.join(['{}={};'.format(k,v) for k,v in attributes.items()])[:-1] * */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_gff, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 446, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_gff, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 447, __pyx_L1_error) if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":447 + /* "_rnaseq_utils.pyx":448 * return ' '.join(['{} "{}";'.format(k,v) for k,v in attributes.items()]) * elif format == 'gff': * return ' '.join(['{}={};'.format(k,v) for k,v in attributes.items()])[:-1] # <<<<<<<<<<<<<< @@ -16002,14 +15999,14 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L19_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = 0; if (unlikely(__pyx_v_attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "items"); - __PYX_ERR(0, 447, __pyx_L19_error) + __PYX_ERR(0, 448, __pyx_L19_error) } - __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_attributes, 1, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 447, __pyx_L19_error) + __pyx_t_8 = __Pyx_dict_iterator(__pyx_v_attributes, 1, __pyx_n_s_items, (&__pyx_t_4), (&__pyx_t_7)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_8; @@ -16017,14 +16014,14 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str while (1) { __pyx_t_9 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_4, &__pyx_t_6, &__pyx_t_8, &__pyx_t_5, NULL, __pyx_t_7); if (unlikely(__pyx_t_9 == 0)) break; - if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 447, __pyx_L19_error) + if (unlikely(__pyx_t_9 == -1)) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_k, __pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr17__pyx_v_v, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__21, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 447, __pyx_L19_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__21, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_11 = NULL; __pyx_t_9 = 0; @@ -16041,7 +16038,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_9genexpr17__pyx_v_k, __pyx_9genexpr17__pyx_v_v}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L19_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_5); } else @@ -16049,13 +16046,13 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_9genexpr17__pyx_v_k, __pyx_9genexpr17__pyx_v_v}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L19_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_5); } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 447, __pyx_L19_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; @@ -16066,12 +16063,12 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str __Pyx_INCREF(__pyx_9genexpr17__pyx_v_v); __Pyx_GIVEREF(__pyx_9genexpr17__pyx_v_v); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_9genexpr17__pyx_v_v); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L19_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 447, __pyx_L19_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 448, __pyx_L19_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -16084,17 +16081,17 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str goto __pyx_L1_error; __pyx_L22_exit_scope:; } /* exit inner scope */ - __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__19, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyUnicode_Substring(__pyx_t_2, 0, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 447, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_Substring(__pyx_t_2, 0, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":446 + /* "_rnaseq_utils.pyx":447 * if format == 'gtf': * return ' '.join(['{} "{}";'.format(k,v) for k,v in attributes.items()]) * elif format == 'gff': # <<<<<<<<<<<<<< @@ -16103,7 +16100,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str */ } - /* "_rnaseq_utils.pyx":436 + /* "_rnaseq_utils.pyx":437 * return gtf_txt[:-1] * * def print_attributes(self, format='gtf', full=True): # <<<<<<<<<<<<<< @@ -16135,7 +16132,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_58print_attributes(str return __pyx_r; } -/* "_rnaseq_utils.pyx":19 +/* "_rnaseq_utils.pyx":20 * ELdata = namedtuple('ELdata', 'chrom source strand ranges splice s_tag e_tag capped weight condensed') * cdef class RNAseqMapping(): * cdef public int chrom, source, strand, s_len, e_len # <<<<<<<<<<<<<< @@ -16165,7 +16162,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_5chrom___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16203,7 +16200,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_5chrom_2__set__(struct __pyx const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20, __pyx_L1_error) __pyx_v_self->chrom = __pyx_t_1; /* function exit code */ @@ -16239,7 +16236,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_6source___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16277,7 +16274,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_6source_2__set__(struct __py const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20, __pyx_L1_error) __pyx_v_self->source = __pyx_t_1; /* function exit code */ @@ -16313,7 +16310,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_6strand___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16351,7 +16348,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_6strand_2__set__(struct __py const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20, __pyx_L1_error) __pyx_v_self->strand = __pyx_t_1; /* function exit code */ @@ -16387,7 +16384,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_5s_len___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->s_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->s_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16425,7 +16422,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_5s_len_2__set__(struct __pyx const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20, __pyx_L1_error) __pyx_v_self->s_len = __pyx_t_1; /* function exit code */ @@ -16461,7 +16458,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_5e_len___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->e_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->e_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16499,7 +16496,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_5e_len_2__set__(struct __pyx const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 19, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 20, __pyx_L1_error) __pyx_v_self->e_len = __pyx_t_1; /* function exit code */ @@ -16513,7 +16510,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_5e_len_2__set__(struct __pyx return __pyx_r; } -/* "_rnaseq_utils.pyx":20 +/* "_rnaseq_utils.pyx":21 * cdef class RNAseqMapping(): * cdef public int chrom, source, strand, s_len, e_len * cdef public list ranges, splice # <<<<<<<<<<<<<< @@ -16571,7 +16568,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_6ranges_2__set__(struct __py const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 20, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 21, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -16671,7 +16668,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_6splice_2__set__(struct __py const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 20, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 21, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -16721,7 +16718,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_6splice_4__del__(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":21 +/* "_rnaseq_utils.pyx":22 * cdef public int chrom, source, strand, s_len, e_len * cdef public list ranges, splice * cdef public bint s_tag, e_tag, capped, complete, is_reference, condensed # <<<<<<<<<<<<<< @@ -16751,7 +16748,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_5s_tag___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16789,7 +16786,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_5s_tag_2__set__(struct __pyx const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_v_self->s_tag = __pyx_t_1; /* function exit code */ @@ -16825,7 +16822,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_5e_tag___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16863,7 +16860,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_5e_tag_2__set__(struct __pyx const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_v_self->e_tag = __pyx_t_1; /* function exit code */ @@ -16899,7 +16896,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_6capped___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16937,7 +16934,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_6capped_2__set__(struct __py const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_v_self->capped = __pyx_t_1; /* function exit code */ @@ -16973,7 +16970,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_8complete___get__(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->complete); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->complete); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17011,7 +17008,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_8complete_2__set__(struct __ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_v_self->complete = __pyx_t_1; /* function exit code */ @@ -17047,7 +17044,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_12is_reference___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_reference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->is_reference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17085,7 +17082,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_12is_reference_2__set__(stru const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_v_self->is_reference = __pyx_t_1; /* function exit code */ @@ -17121,7 +17118,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_9condensed___get__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->condensed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->condensed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17159,7 +17156,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_9condensed_2__set__(struct _ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 21, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 22, __pyx_L1_error) __pyx_v_self->condensed = __pyx_t_1; /* function exit code */ @@ -17173,7 +17170,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_9condensed_2__set__(struct _ return __pyx_r; } -/* "_rnaseq_utils.pyx":22 +/* "_rnaseq_utils.pyx":23 * cdef public list ranges, splice * cdef public bint s_tag, e_tag, capped, complete, is_reference, condensed * cdef public dict attributes # <<<<<<<<<<<<<< @@ -17231,7 +17228,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_10attributes_2__set__(struct const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 22, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 23, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -17281,7 +17278,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_10attributes_4__del__(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":23 +/* "_rnaseq_utils.pyx":24 * cdef public bint s_tag, e_tag, capped, complete, is_reference, condensed * cdef public dict attributes * cdef public (int, int) span # <<<<<<<<<<<<<< @@ -17311,7 +17308,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_4span___get__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17349,7 +17346,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_4span_2__set__(struct __pyx_ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 23, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) __pyx_v_self->span = __pyx_t_1; /* function exit code */ @@ -17363,7 +17360,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_4span_2__set__(struct __pyx_ return __pyx_r; } -/* "_rnaseq_utils.pyx":24 +/* "_rnaseq_utils.pyx":25 * cdef public dict attributes * cdef public (int, int) span * cdef public float weight, coverage # <<<<<<<<<<<<<< @@ -17393,7 +17390,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_6weight___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->weight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17431,7 +17428,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_6weight_2__set__(struct __py const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) __pyx_v_self->weight = __pyx_t_1; /* function exit code */ @@ -17467,7 +17464,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_8coverage___get__(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->coverage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->coverage); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17505,7 +17502,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_8coverage_2__set__(struct __ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 24, __pyx_L1_error) + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) __pyx_v_self->coverage = __pyx_t_1; /* function exit code */ @@ -17519,7 +17516,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_8coverage_2__set__(struct __ return __pyx_r; } -/* "_rnaseq_utils.pyx":25 +/* "_rnaseq_utils.pyx":26 * cdef public (int, int) span * cdef public float weight, coverage * cdef public (float, float, float) tripleweight # <<<<<<<<<<<<<< @@ -17549,7 +17546,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_12tripleweight___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_float__and_float__and_float(__pyx_v_self->tripleweight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_float__and_float__and_float(__pyx_v_self->tripleweight); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -17587,7 +17584,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqMapping_12tripleweight_2__set__(stru const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_convert__from_py___pyx_ctuple_float__and_float__and_float(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 25, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__from_py___pyx_ctuple_float__and_float__and_float(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 26, __pyx_L1_error) __pyx_v_self->tripleweight = __pyx_t_1; /* function exit code */ @@ -18019,7 +18016,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqMapping_62__setstate_cython__( return __pyx_r; } -/* "_rnaseq_utils.pyx":493 +/* "_rnaseq_utils.pyx":494 * cdef public set sj_set * * def __init__(self, chrom_array=None, source_array=None, chrom_lengths=None, genome_fasta=None, config=config_defaults): # <<<<<<<<<<<<<< @@ -18103,7 +18100,7 @@ static int __pyx_pw_13_rnaseq_utils_13RNAseqDataset_1__init__(PyObject *__pyx_v_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 493, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 494, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -18129,7 +18126,7 @@ static int __pyx_pw_13_rnaseq_utils_13RNAseqDataset_1__init__(PyObject *__pyx_v_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 493, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 494, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -18171,30 +18168,30 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "_rnaseq_utils.pyx":497 + /* "_rnaseq_utils.pyx":498 * chromosome names and sample names. Contains methods for parsing * a variety of files into a collection of read objects.""" * self.config = config_defaults # <<<<<<<<<<<<<< * self.config.update(config) * self.label_tally = {'S':Counter(), 's':Counter(), 'E':Counter(), 'e':Counter()} */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_config_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_config_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 497, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 498, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->config); __Pyx_DECREF(__pyx_v_self->config); __pyx_v_self->config = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":498 + /* "_rnaseq_utils.pyx":499 * a variety of files into a collection of read objects.""" * self.config = config_defaults * self.config.update(config) # <<<<<<<<<<<<<< * self.label_tally = {'S':Counter(), 's':Counter(), 'E':Counter(), 'e':Counter()} * self.read_list = [] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->config, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self->config, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -18208,21 +18205,21 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_config) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_config); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":499 + /* "_rnaseq_utils.pyx":500 * self.config = config_defaults * self.config.update(config) * self.label_tally = {'S':Counter(), 's':Counter(), 'E':Counter(), 'e':Counter()} # <<<<<<<<<<<<<< * self.read_list = [] * self.s_tag = self.config['s_tag'] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -18236,12 +18233,12 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_S, __pyx_t_2) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_S, __pyx_t_2) < 0) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -18255,12 +18252,12 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_s, __pyx_t_2) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_s, __pyx_t_2) < 0) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -18274,12 +18271,12 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_E, __pyx_t_2) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_E, __pyx_t_2) < 0) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 499, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_Counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -18293,10 +18290,10 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_e, __pyx_t_2) < 0) __PYX_ERR(0, 499, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_e, __pyx_t_2) < 0) __PYX_ERR(0, 500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->label_tally); @@ -18304,14 +18301,14 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->label_tally = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":500 + /* "_rnaseq_utils.pyx":501 * self.config.update(config) * self.label_tally = {'S':Counter(), 's':Counter(), 'E':Counter(), 'e':Counter()} * self.read_list = [] # <<<<<<<<<<<<<< * self.s_tag = self.config['s_tag'] * self.e_tag = self.config['e_tag'] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 500, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->read_list); @@ -18319,7 +18316,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->read_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":501 + /* "_rnaseq_utils.pyx":502 * self.label_tally = {'S':Counter(), 's':Counter(), 'E':Counter(), 'e':Counter()} * self.read_list = [] * self.s_tag = self.config['s_tag'] # <<<<<<<<<<<<<< @@ -18328,15 +18325,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 501, __pyx_L1_error) + __PYX_ERR(0, 502, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 501, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->s_tag = __pyx_t_5; - /* "_rnaseq_utils.pyx":502 + /* "_rnaseq_utils.pyx":503 * self.read_list = [] * self.s_tag = self.config['s_tag'] * self.e_tag = self.config['e_tag'] # <<<<<<<<<<<<<< @@ -18345,15 +18342,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 502, __pyx_L1_error) + __PYX_ERR(0, 503, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 502, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 502, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->e_tag = __pyx_t_5; - /* "_rnaseq_utils.pyx":503 + /* "_rnaseq_utils.pyx":504 * self.s_tag = self.config['s_tag'] * self.e_tag = self.config['e_tag'] * self.capped = self.config['capped'] # <<<<<<<<<<<<<< @@ -18362,15 +18359,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 503, __pyx_L1_error) + __PYX_ERR(0, 504, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 503, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->capped = __pyx_t_5; - /* "_rnaseq_utils.pyx":504 + /* "_rnaseq_utils.pyx":505 * self.e_tag = self.config['e_tag'] * self.capped = self.config['capped'] * self.stranded = self.config['stranded'] # <<<<<<<<<<<<<< @@ -18379,15 +18376,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 504, __pyx_L1_error) + __PYX_ERR(0, 505, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_stranded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_stranded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 504, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->stranded = __pyx_t_5; - /* "_rnaseq_utils.pyx":505 + /* "_rnaseq_utils.pyx":506 * self.capped = self.config['capped'] * self.stranded = self.config['stranded'] * self.reverse = self.config['reverse'] # <<<<<<<<<<<<<< @@ -18396,15 +18393,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 505, __pyx_L1_error) + __PYX_ERR(0, 506, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_reverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_reverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 505, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 506, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->reverse = __pyx_t_5; - /* "_rnaseq_utils.pyx":506 + /* "_rnaseq_utils.pyx":507 * self.stranded = self.config['stranded'] * self.reverse = self.config['reverse'] * self.start_seq = str(self.config['start_seq']) # <<<<<<<<<<<<<< @@ -18413,11 +18410,11 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 506, __pyx_L1_error) + __PYX_ERR(0, 507, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_start_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_start_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -18426,7 +18423,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->start_seq = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":507 + /* "_rnaseq_utils.pyx":508 * self.reverse = self.config['reverse'] * self.start_seq = str(self.config['start_seq']) * self.end_seq = str(self.config['end_seq']) # <<<<<<<<<<<<<< @@ -18435,11 +18432,11 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 507, __pyx_L1_error) + __PYX_ERR(0, 508, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_end_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_end_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -18448,7 +18445,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->end_seq = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":508 + /* "_rnaseq_utils.pyx":509 * self.start_seq = str(self.config['start_seq']) * self.end_seq = str(self.config['end_seq']) * self.minlen_strict = self.config['minlen_strict'] # <<<<<<<<<<<<<< @@ -18457,15 +18454,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 508, __pyx_L1_error) + __PYX_ERR(0, 509, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_minlen_strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_minlen_strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 508, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->minlen_strict = __pyx_t_6; - /* "_rnaseq_utils.pyx":509 + /* "_rnaseq_utils.pyx":510 * self.end_seq = str(self.config['end_seq']) * self.minlen_strict = self.config['minlen_strict'] * self.minlen_loose = self.config['minlen_loose'] # <<<<<<<<<<<<<< @@ -18474,15 +18471,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 509, __pyx_L1_error) + __PYX_ERR(0, 510, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_minlen_loose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_minlen_loose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 509, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 510, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->minlen_loose = __pyx_t_6; - /* "_rnaseq_utils.pyx":510 + /* "_rnaseq_utils.pyx":511 * self.minlen_strict = self.config['minlen_strict'] * self.minlen_loose = self.config['minlen_loose'] * self.minlen = self.minlen_strict # <<<<<<<<<<<<<< @@ -18492,7 +18489,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_t_6 = __pyx_v_self->minlen_strict; __pyx_v_self->minlen = __pyx_t_6; - /* "_rnaseq_utils.pyx":511 + /* "_rnaseq_utils.pyx":512 * self.minlen_loose = self.config['minlen_loose'] * self.minlen = self.minlen_strict * self.mismatch_rate = self.config['mismatch_rate'] # <<<<<<<<<<<<<< @@ -18501,15 +18498,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 511, __pyx_L1_error) + __PYX_ERR(0, 512, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_mismatch_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_mismatch_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 511, __pyx_L1_error) + __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 512, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->mismatch_rate = __pyx_t_7; - /* "_rnaseq_utils.pyx":512 + /* "_rnaseq_utils.pyx":513 * self.minlen = self.minlen_strict * self.mismatch_rate = self.config['mismatch_rate'] * self.error_rate = self.config['error_rate'] # <<<<<<<<<<<<<< @@ -18518,15 +18515,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 512, __pyx_L1_error) + __PYX_ERR(0, 513, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_error_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_error_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 512, __pyx_L1_error) + __pyx_t_7 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_7 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->error_rate = __pyx_t_7; - /* "_rnaseq_utils.pyx":513 + /* "_rnaseq_utils.pyx":514 * self.mismatch_rate = self.config['mismatch_rate'] * self.error_rate = self.config['error_rate'] * self.sj_shift = self.config['sj_shift'] # <<<<<<<<<<<<<< @@ -18535,15 +18532,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 513, __pyx_L1_error) + __PYX_ERR(0, 514, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_sj_shift); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 513, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_sj_shift); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 513, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->sj_shift = __pyx_t_6; - /* "_rnaseq_utils.pyx":514 + /* "_rnaseq_utils.pyx":515 * self.error_rate = self.config['error_rate'] * self.sj_shift = self.config['sj_shift'] * self.max_headclip = self.config['max_headclip'] # <<<<<<<<<<<<<< @@ -18552,15 +18549,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 514, __pyx_L1_error) + __PYX_ERR(0, 515, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_max_headclip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 514, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_max_headclip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 514, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->max_headclip = __pyx_t_6; - /* "_rnaseq_utils.pyx":515 + /* "_rnaseq_utils.pyx":516 * self.sj_shift = self.config['sj_shift'] * self.max_headclip = self.config['max_headclip'] * self.remove_noncanonical = self.config['remove_noncanonical'] # <<<<<<<<<<<<<< @@ -18569,15 +18566,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 515, __pyx_L1_error) + __PYX_ERR(0, 516, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_remove_noncanonical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_remove_noncanonical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 515, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->remove_noncanonical = __pyx_t_5; - /* "_rnaseq_utils.pyx":516 + /* "_rnaseq_utils.pyx":517 * self.max_headclip = self.config['max_headclip'] * self.remove_noncanonical = self.config['remove_noncanonical'] * self.labels_are_trimmed = self.config['labels_are_trimmed'] # <<<<<<<<<<<<<< @@ -18586,15 +18583,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 516, __pyx_L1_error) + __PYX_ERR(0, 517, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_labels_are_trimmed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_labels_are_trimmed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 516, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 517, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->labels_are_trimmed = __pyx_t_5; - /* "_rnaseq_utils.pyx":517 + /* "_rnaseq_utils.pyx":518 * self.remove_noncanonical = self.config['remove_noncanonical'] * self.labels_are_trimmed = self.config['labels_are_trimmed'] * self.quality_filter = self.config['quality_filter'] # <<<<<<<<<<<<<< @@ -18603,15 +18600,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 517, __pyx_L1_error) + __PYX_ERR(0, 518, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_quality_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_quality_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 517, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->quality_filter = __pyx_t_5; - /* "_rnaseq_utils.pyx":518 + /* "_rnaseq_utils.pyx":519 * self.labels_are_trimmed = self.config['labels_are_trimmed'] * self.quality_filter = self.config['quality_filter'] * self.ignore_ends = self.config['ignore_ends'] # <<<<<<<<<<<<<< @@ -18620,15 +18617,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 518, __pyx_L1_error) + __PYX_ERR(0, 519, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_ignore_ends); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_ignore_ends); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 518, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->ignore_ends = __pyx_t_5; - /* "_rnaseq_utils.pyx":519 + /* "_rnaseq_utils.pyx":520 * self.quality_filter = self.config['quality_filter'] * self.ignore_ends = self.config['ignore_ends'] * self.secondary = self.config['secondary'] # <<<<<<<<<<<<<< @@ -18637,15 +18634,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 519, __pyx_L1_error) + __PYX_ERR(0, 520, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_secondary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_secondary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 519, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 520, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->secondary = __pyx_t_5; - /* "_rnaseq_utils.pyx":520 + /* "_rnaseq_utils.pyx":521 * self.ignore_ends = self.config['ignore_ends'] * self.secondary = self.config['secondary'] * self.gene_delim = self.config['gene_delim'] # <<<<<<<<<<<<<< @@ -18654,18 +18651,18 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 520, __pyx_L1_error) + __PYX_ERR(0, 521, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_gene_delim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_gene_delim); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 520, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 521, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->gene_delim); __Pyx_DECREF(__pyx_v_self->gene_delim); __pyx_v_self->gene_delim = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":521 + /* "_rnaseq_utils.pyx":522 * self.secondary = self.config['secondary'] * self.gene_delim = self.config['gene_delim'] * self.verbose = self.config.get('verbose', False) # <<<<<<<<<<<<<< @@ -18674,15 +18671,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 521, __pyx_L1_error) + __PYX_ERR(0, 522, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->config, __pyx_n_u_verbose, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->config, __pyx_n_u_verbose, Py_False); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 521, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 522, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->verbose = __pyx_t_5; - /* "_rnaseq_utils.pyx":522 + /* "_rnaseq_utils.pyx":523 * self.gene_delim = self.config['gene_delim'] * self.verbose = self.config.get('verbose', False) * if self.start_seq in ['None', 'False', '']: # <<<<<<<<<<<<<< @@ -18691,21 +18688,21 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ __Pyx_INCREF(__pyx_v_self->start_seq); __pyx_t_8 = __pyx_v_self->start_seq; - __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_None, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 522, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_None, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 523, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); if (!__pyx_t_10) { } else { __pyx_t_5 = __pyx_t_10; goto __pyx_L4_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_False, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 522, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_False, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 523, __pyx_L1_error) __pyx_t_9 = (__pyx_t_10 != 0); if (!__pyx_t_9) { } else { __pyx_t_5 = __pyx_t_9; goto __pyx_L4_bool_binop_done; } - __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_kp_u__7, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 522, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_kp_u__7, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 523, __pyx_L1_error) __pyx_t_10 = (__pyx_t_9 != 0); __pyx_t_5 = __pyx_t_10; __pyx_L4_bool_binop_done:; @@ -18713,16 +18710,16 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_t_10 = (__pyx_t_5 != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":523 + /* "_rnaseq_utils.pyx":524 * self.verbose = self.config.get('verbose', False) * if self.start_seq in ['None', 'False', '']: * self.start_array = fu.nuc_to_int('x') # <<<<<<<<<<<<<< * else: * self.start_array = fu.nuc_to_int(self.start_seq) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 523, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -18737,17 +18734,17 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_x) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_x); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 523, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->start_array); __Pyx_DECREF(((PyObject *)__pyx_v_self->start_array)); __pyx_v_self->start_array = ((arrayobject *)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":522 + /* "_rnaseq_utils.pyx":523 * self.gene_delim = self.config['gene_delim'] * self.verbose = self.config.get('verbose', False) * if self.start_seq in ['None', 'False', '']: # <<<<<<<<<<<<<< @@ -18757,7 +18754,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 goto __pyx_L3; } - /* "_rnaseq_utils.pyx":525 + /* "_rnaseq_utils.pyx":526 * self.start_array = fu.nuc_to_int('x') * else: * self.start_array = fu.nuc_to_int(self.start_seq) # <<<<<<<<<<<<<< @@ -18765,9 +18762,9 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 * if self.end_seq in ['None', 'False', '']: */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_fu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 525, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_fu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 525, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -18782,10 +18779,10 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->start_seq) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->start_seq); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 525, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 525, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->start_array); __Pyx_DECREF(((PyObject *)__pyx_v_self->start_array)); @@ -18794,7 +18791,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_L3:; - /* "_rnaseq_utils.pyx":527 + /* "_rnaseq_utils.pyx":528 * self.start_array = fu.nuc_to_int(self.start_seq) * * if self.end_seq in ['None', 'False', '']: # <<<<<<<<<<<<<< @@ -18803,21 +18800,21 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ __Pyx_INCREF(__pyx_v_self->end_seq); __pyx_t_8 = __pyx_v_self->end_seq; - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_None, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_None, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 528, __pyx_L1_error) __pyx_t_9 = (__pyx_t_5 != 0); if (!__pyx_t_9) { } else { __pyx_t_10 = __pyx_t_9; goto __pyx_L8_bool_binop_done; } - __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_False, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_n_u_False, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 528, __pyx_L1_error) __pyx_t_5 = (__pyx_t_9 != 0); if (!__pyx_t_5) { } else { __pyx_t_10 = __pyx_t_5; goto __pyx_L8_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_kp_u__7, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_kp_u__7, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 528, __pyx_L1_error) __pyx_t_9 = (__pyx_t_5 != 0); __pyx_t_10 = __pyx_t_9; __pyx_L8_bool_binop_done:; @@ -18825,16 +18822,16 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":528 + /* "_rnaseq_utils.pyx":529 * * if self.end_seq in ['None', 'False', '']: * self.end_array = fu.nuc_to_int('x') # <<<<<<<<<<<<<< * else: * self.end_array = fu.nuc_to_int(self.end_seq) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 528, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 528, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -18849,17 +18846,17 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_n_u_x) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_n_u_x); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 528, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 528, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->end_array); __Pyx_DECREF(((PyObject *)__pyx_v_self->end_array)); __pyx_v_self->end_array = ((arrayobject *)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":527 + /* "_rnaseq_utils.pyx":528 * self.start_array = fu.nuc_to_int(self.start_seq) * * if self.end_seq in ['None', 'False', '']: # <<<<<<<<<<<<<< @@ -18869,7 +18866,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 goto __pyx_L7; } - /* "_rnaseq_utils.pyx":530 + /* "_rnaseq_utils.pyx":531 * self.end_array = fu.nuc_to_int('x') * else: * self.end_array = fu.nuc_to_int(self.end_seq) # <<<<<<<<<<<<<< @@ -18877,9 +18874,9 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 * self.end_array = fu.nuc_to_int(self.end_seq) */ /*else*/ { - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_fu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 530, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_fu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -18894,10 +18891,10 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_self->end_seq) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->end_seq); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 530, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->end_array); __Pyx_DECREF(((PyObject *)__pyx_v_self->end_array)); @@ -18906,16 +18903,16 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_L7:; - /* "_rnaseq_utils.pyx":532 + /* "_rnaseq_utils.pyx":533 * self.end_array = fu.nuc_to_int(self.end_seq) * * self.end_array = fu.nuc_to_int(self.end_seq) # <<<<<<<<<<<<<< * self.chrom_lengths = chrom_lengths * self.reference_dict = {} */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -18930,24 +18927,24 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_self->end_seq) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_self->end_seq); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 532, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 532, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 533, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->end_array); __Pyx_DECREF(((PyObject *)__pyx_v_self->end_array)); __pyx_v_self->end_array = ((arrayobject *)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":533 + /* "_rnaseq_utils.pyx":534 * * self.end_array = fu.nuc_to_int(self.end_seq) * self.chrom_lengths = chrom_lengths # <<<<<<<<<<<<<< * self.reference_dict = {} * self.chrom_dict = {} */ - if (!(likely(PyList_CheckExact(__pyx_v_chrom_lengths))||((__pyx_v_chrom_lengths) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_chrom_lengths)->tp_name), 0))) __PYX_ERR(0, 533, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_chrom_lengths))||((__pyx_v_chrom_lengths) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_chrom_lengths)->tp_name), 0))) __PYX_ERR(0, 534, __pyx_L1_error) __pyx_t_1 = __pyx_v_chrom_lengths; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -18956,14 +18953,14 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->chrom_lengths = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":534 + /* "_rnaseq_utils.pyx":535 * self.end_array = fu.nuc_to_int(self.end_seq) * self.chrom_lengths = chrom_lengths * self.reference_dict = {} # <<<<<<<<<<<<<< * self.chrom_dict = {} * self.chrom_index = 0 */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->reference_dict); @@ -18971,14 +18968,14 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->reference_dict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":535 + /* "_rnaseq_utils.pyx":536 * self.chrom_lengths = chrom_lengths * self.reference_dict = {} * self.chrom_dict = {} # <<<<<<<<<<<<<< * self.chrom_index = 0 * self.chrom_array = [] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 535, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->chrom_dict); @@ -18986,7 +18983,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->chrom_dict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":536 + /* "_rnaseq_utils.pyx":537 * self.reference_dict = {} * self.chrom_dict = {} * self.chrom_index = 0 # <<<<<<<<<<<<<< @@ -18995,14 +18992,14 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ __pyx_v_self->chrom_index = 0; - /* "_rnaseq_utils.pyx":537 + /* "_rnaseq_utils.pyx":538 * self.chrom_dict = {} * self.chrom_index = 0 * self.chrom_array = [] # <<<<<<<<<<<<<< * if chrom_array is not None: * for c in chrom_array: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 537, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->chrom_array); @@ -19010,7 +19007,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->chrom_array = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":538 + /* "_rnaseq_utils.pyx":539 * self.chrom_index = 0 * self.chrom_array = [] * if chrom_array is not None: # <<<<<<<<<<<<<< @@ -19021,7 +19018,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":539 + /* "_rnaseq_utils.pyx":540 * self.chrom_array = [] * if chrom_array is not None: * for c in chrom_array: # <<<<<<<<<<<<<< @@ -19032,26 +19029,26 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_t_1 = __pyx_v_chrom_array; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_chrom_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_chrom_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 540, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 540, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 540, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 539, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -19061,7 +19058,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 539, __pyx_L1_error) + else __PYX_ERR(0, 540, __pyx_L1_error) } break; } @@ -19070,18 +19067,18 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":540 + /* "_rnaseq_utils.pyx":541 * if chrom_array is not None: * for c in chrom_array: * self.add_chrom(c) # <<<<<<<<<<<<<< * * if genome_fasta is not None: */ - __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_v_c, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_v_c, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":539 + /* "_rnaseq_utils.pyx":540 * self.chrom_array = [] * if chrom_array is not None: * for c in chrom_array: # <<<<<<<<<<<<<< @@ -19091,7 +19088,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":538 + /* "_rnaseq_utils.pyx":539 * self.chrom_index = 0 * self.chrom_array = [] * if chrom_array is not None: # <<<<<<<<<<<<<< @@ -19100,7 +19097,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ } - /* "_rnaseq_utils.pyx":542 + /* "_rnaseq_utils.pyx":543 * self.add_chrom(c) * * if genome_fasta is not None: # <<<<<<<<<<<<<< @@ -19111,16 +19108,16 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":543 + /* "_rnaseq_utils.pyx":544 * * if genome_fasta is not None: * self.genome, index = fu.import_genome(genome_fasta) # <<<<<<<<<<<<<< * index_lines = [l.split('\t') for l in index.rstrip().split('\n')] * self.chrom_array = [l[0] for l in index_lines] */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_fu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_fu); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_import_genome); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_import_genome); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -19135,7 +19132,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_genome_fasta) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_genome_fasta); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 543, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -19144,7 +19141,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 543, __pyx_L1_error) + __PYX_ERR(0, 544, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -19157,15 +19154,15 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 543, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -19173,7 +19170,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_3 = __pyx_t_13(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_4), 2) < 0) __PYX_ERR(0, 543, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_4), 2) < 0) __PYX_ERR(0, 544, __pyx_L1_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L16_unpacking_done; @@ -19181,10 +19178,10 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 543, __pyx_L1_error) + __PYX_ERR(0, 544, __pyx_L1_error) __pyx_L16_unpacking_done:; } - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 543, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 544, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->genome); __Pyx_DECREF(__pyx_v_self->genome); @@ -19193,7 +19190,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_index = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":544 + /* "_rnaseq_utils.pyx":545 * if genome_fasta is not None: * self.genome, index = fu.import_genome(genome_fasta) * index_lines = [l.split('\t') for l in index.rstrip().split('\n')] # <<<<<<<<<<<<<< @@ -19201,9 +19198,9 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 * self.chrom_lengths = [int(l[1]) for l in index_lines] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -19217,10 +19214,10 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_2 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L19_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -19235,16 +19232,16 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_kp_u__23) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__23); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L19_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_11 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_12 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 545, __pyx_L19_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -19252,17 +19249,17 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 545, __pyx_L19_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 545, __pyx_L19_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -19272,7 +19269,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 544, __pyx_L19_error) + else __PYX_ERR(0, 545, __pyx_L19_error) } break; } @@ -19280,7 +19277,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __Pyx_XDECREF_SET(__pyx_9genexpr18__pyx_v_l, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr18__pyx_v_l, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L19_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr18__pyx_v_l, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -19294,10 +19291,10 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_t_3 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_14, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u__13); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L19_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 544, __pyx_L19_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 545, __pyx_L19_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -19311,7 +19308,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_index_lines = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":545 + /* "_rnaseq_utils.pyx":546 * self.genome, index = fu.import_genome(genome_fasta) * index_lines = [l.split('\t') for l in index.rstrip().split('\n')] * self.chrom_array = [l[0] for l in index_lines] # <<<<<<<<<<<<<< @@ -19319,22 +19316,22 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 * self.chrom_index = len(self.chrom_array) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L25_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_index_lines; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0; for (;;) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 545, __pyx_L25_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 546, __pyx_L25_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L25_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_9genexpr19__pyx_v_l, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetItemInt(__pyx_9genexpr19__pyx_v_l, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L25_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_9genexpr19__pyx_v_l, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L25_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 545, __pyx_L25_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 546, __pyx_L25_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -19351,7 +19348,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->chrom_array = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":546 + /* "_rnaseq_utils.pyx":547 * index_lines = [l.split('\t') for l in index.rstrip().split('\n')] * self.chrom_array = [l[0] for l in index_lines] * self.chrom_lengths = [int(l[1]) for l in index_lines] # <<<<<<<<<<<<<< @@ -19359,25 +19356,25 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 * self.chrom_dict = dict(zip(self.chrom_array, range(self.chrom_index))) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L31_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __pyx_v_index_lines; __Pyx_INCREF(__pyx_t_4); __pyx_t_11 = 0; for (;;) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 546, __pyx_L31_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_11); __Pyx_INCREF(__pyx_t_3); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 547, __pyx_L31_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L31_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_9genexpr20__pyx_v_l, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetItemInt(__pyx_9genexpr20__pyx_v_l, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L31_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_9genexpr20__pyx_v_l, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L31_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L31_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 546, __pyx_L31_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 547, __pyx_L31_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -19394,7 +19391,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->chrom_lengths = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":547 + /* "_rnaseq_utils.pyx":548 * self.chrom_array = [l[0] for l in index_lines] * self.chrom_lengths = [int(l[1]) for l in index_lines] * self.chrom_index = len(self.chrom_array) # <<<<<<<<<<<<<< @@ -19405,25 +19402,25 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 547, __pyx_L1_error) + __PYX_ERR(0, 548, __pyx_L1_error) } - __pyx_t_11 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 547, __pyx_L1_error) + __pyx_t_11 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 548, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->chrom_index = __pyx_t_11; - /* "_rnaseq_utils.pyx":548 + /* "_rnaseq_utils.pyx":549 * self.chrom_lengths = [int(l[1]) for l in index_lines] * self.chrom_index = len(self.chrom_array) * self.chrom_dict = dict(zip(self.chrom_array, range(self.chrom_index))) # <<<<<<<<<<<<<< * self.has_genome = True * else: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->chrom_array); __Pyx_GIVEREF(__pyx_v_self->chrom_array); @@ -19431,10 +19428,10 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -19443,7 +19440,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->chrom_dict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":549 + /* "_rnaseq_utils.pyx":550 * self.chrom_index = len(self.chrom_array) * self.chrom_dict = dict(zip(self.chrom_array, range(self.chrom_index))) * self.has_genome = True # <<<<<<<<<<<<<< @@ -19452,7 +19449,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ __pyx_v_self->has_genome = 1; - /* "_rnaseq_utils.pyx":542 + /* "_rnaseq_utils.pyx":543 * self.add_chrom(c) * * if genome_fasta is not None: # <<<<<<<<<<<<<< @@ -19462,7 +19459,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 goto __pyx_L14; } - /* "_rnaseq_utils.pyx":551 + /* "_rnaseq_utils.pyx":552 * self.has_genome = True * else: * self.genome = {} # <<<<<<<<<<<<<< @@ -19470,7 +19467,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 * */ /*else*/ { - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->genome); @@ -19478,7 +19475,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->genome = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":552 + /* "_rnaseq_utils.pyx":553 * else: * self.genome = {} * self.has_genome = False # <<<<<<<<<<<<<< @@ -19489,14 +19486,14 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __pyx_L14:; - /* "_rnaseq_utils.pyx":554 + /* "_rnaseq_utils.pyx":555 * self.has_genome = False * * self.source_dict = {} # <<<<<<<<<<<<<< * self.source_index = 0 * self.source_array = [] */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 554, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->source_dict); @@ -19504,7 +19501,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->source_dict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":555 + /* "_rnaseq_utils.pyx":556 * * self.source_dict = {} * self.source_index = 0 # <<<<<<<<<<<<<< @@ -19513,14 +19510,14 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ __pyx_v_self->source_index = 0; - /* "_rnaseq_utils.pyx":556 + /* "_rnaseq_utils.pyx":557 * self.source_dict = {} * self.source_index = 0 * self.source_array = [] # <<<<<<<<<<<<<< * if source_array is not None: * for s in source_array: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 556, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->source_array); @@ -19528,7 +19525,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->source_array = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":557 + /* "_rnaseq_utils.pyx":558 * self.source_index = 0 * self.source_array = [] * if source_array is not None: # <<<<<<<<<<<<<< @@ -19539,7 +19536,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_t_10 = (__pyx_t_9 != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":558 + /* "_rnaseq_utils.pyx":559 * self.source_array = [] * if source_array is not None: * for s in source_array: # <<<<<<<<<<<<<< @@ -19550,26 +19547,26 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_t_1 = __pyx_v_source_array; __Pyx_INCREF(__pyx_t_1); __pyx_t_11 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_source_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_11 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_source_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 559, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 559, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 559, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -19579,7 +19576,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 558, __pyx_L1_error) + else __PYX_ERR(0, 559, __pyx_L1_error) } break; } @@ -19588,18 +19585,18 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":559 + /* "_rnaseq_utils.pyx":560 * if source_array is not None: * for s in source_array: * self.add_source(s) # <<<<<<<<<<<<<< * * if self.config.get('reference', None) is not None: */ - __pyx_t_4 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_source(__pyx_v_self, __pyx_v_s, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_source(__pyx_v_self, __pyx_v_s, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":558 + /* "_rnaseq_utils.pyx":559 * self.source_array = [] * if source_array is not None: * for s in source_array: # <<<<<<<<<<<<<< @@ -19609,7 +19606,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":557 + /* "_rnaseq_utils.pyx":558 * self.source_index = 0 * self.source_array = [] * if source_array is not None: # <<<<<<<<<<<<<< @@ -19618,7 +19615,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ } - /* "_rnaseq_utils.pyx":561 + /* "_rnaseq_utils.pyx":562 * self.add_source(s) * * if self.config.get('reference', None) is not None: # <<<<<<<<<<<<<< @@ -19627,16 +19624,16 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 561, __pyx_L1_error) + __PYX_ERR(0, 562, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->config, __pyx_n_u_reference, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->config, __pyx_n_u_reference, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_10 = (__pyx_t_1 != Py_None); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = (__pyx_t_10 != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":562 + /* "_rnaseq_utils.pyx":563 * * if self.config.get('reference', None) is not None: * self.reference_dict = self.import_annotation(self.config['reference'], 'reference') # <<<<<<<<<<<<<< @@ -19645,12 +19642,12 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 562, __pyx_L1_error) + __PYX_ERR(0, 563, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_reference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->config, __pyx_n_u_reference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 562, __pyx_L1_error) - __pyx_t_4 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->import_annotation(__pyx_v_self, ((PyObject*)__pyx_t_1), __pyx_n_u_reference, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 562, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 563, __pyx_L1_error) + __pyx_t_4 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->import_annotation(__pyx_v_self, ((PyObject*)__pyx_t_1), __pyx_n_u_reference, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_4); @@ -19659,7 +19656,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 __pyx_v_self->reference_dict = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":561 + /* "_rnaseq_utils.pyx":562 * self.add_source(s) * * if self.config.get('reference', None) is not None: # <<<<<<<<<<<<<< @@ -19668,7 +19665,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ } - /* "_rnaseq_utils.pyx":564 + /* "_rnaseq_utils.pyx":565 * self.reference_dict = self.import_annotation(self.config['reference'], 'reference') * * self.sj_set = self.make_sj_set(self.config.get('sj',None)) # <<<<<<<<<<<<<< @@ -19677,21 +19674,21 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 */ if (unlikely(__pyx_v_self->config == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 564, __pyx_L1_error) + __PYX_ERR(0, 565, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->config, __pyx_n_u_sj, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 564, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->config, __pyx_n_u_sj, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->make_sj_set(__pyx_v_self, __pyx_t_4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 564, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->make_sj_set(__pyx_v_self, __pyx_t_4, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 564, __pyx_L1_error) + if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->sj_set); __Pyx_DECREF(__pyx_v_self->sj_set); __pyx_v_self->sj_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":493 + /* "_rnaseq_utils.pyx":494 * cdef public set sj_set * * def __init__(self, chrom_array=None, source_array=None, chrom_lengths=None, genome_fasta=None, config=config_defaults): # <<<<<<<<<<<<<< @@ -19723,7 +19720,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset___init__(struct __pyx_obj_13 return __pyx_r; } -/* "_rnaseq_utils.pyx":566 +/* "_rnaseq_utils.pyx":567 * self.sj_set = self.make_sj_set(self.config.get('sj',None)) * * cpdef make_sj_set(self, sj_file): # <<<<<<<<<<<<<< @@ -19777,7 +19774,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_make_sj_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_make_sj_set); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_3make_sj_set)) { __Pyx_XDECREF(__pyx_r); @@ -19794,7 +19791,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_sj_file) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_sj_file); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -19815,19 +19812,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py #endif } - /* "_rnaseq_utils.pyx":573 + /* "_rnaseq_utils.pyx":574 * cdef int l, r * cdef list fields * sj_set = set() # <<<<<<<<<<<<<< * if sj_file is not None: * testline = open(sj_file,'r').readline() */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 573, __pyx_L1_error) + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sj_set = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":574 + /* "_rnaseq_utils.pyx":575 * cdef list fields * sj_set = set() * if sj_file is not None: # <<<<<<<<<<<<<< @@ -19838,14 +19835,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":575 + /* "_rnaseq_utils.pyx":576 * sj_set = set() * if sj_file is not None: * testline = open(sj_file,'r').readline() # <<<<<<<<<<<<<< * fields = testline.split('\t') * if len(fields) == 9 or sj_file.lower().endswith('.out.tab'): # STAR SJ.out.tab file */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_sj_file); __Pyx_GIVEREF(__pyx_v_sj_file); @@ -19853,10 +19850,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_r); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_readline); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_readline); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -19871,20 +19868,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_testline = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":576 + /* "_rnaseq_utils.pyx":577 * if sj_file is not None: * testline = open(sj_file,'r').readline() * fields = testline.split('\t') # <<<<<<<<<<<<<< * if len(fields) == 9 or sj_file.lower().endswith('.out.tab'): # STAR SJ.out.tab file * for line in open(sj_file,'r'): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_testline, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 576, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_testline, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -19898,14 +19895,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 576, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 576, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 577, __pyx_L1_error) __pyx_v_fields = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":577 + /* "_rnaseq_utils.pyx":578 * testline = open(sj_file,'r').readline() * fields = testline.split('\t') * if len(fields) == 9 or sj_file.lower().endswith('.out.tab'): # STAR SJ.out.tab file # <<<<<<<<<<<<<< @@ -19914,16 +19911,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 577, __pyx_L1_error) + __PYX_ERR(0, 578, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_fields); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_fields); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 578, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_7 == 9) != 0); if (!__pyx_t_5) { } else { __pyx_t_6 = __pyx_t_5; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sj_file, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sj_file, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -19937,10 +19934,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 577, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -19955,23 +19952,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u_out_tab) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_out_tab); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 577, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 578, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_5; __pyx_L5_bool_binop_done:; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":578 + /* "_rnaseq_utils.pyx":579 * fields = testline.split('\t') * if len(fields) == 9 or sj_file.lower().endswith('.out.tab'): # STAR SJ.out.tab file * for line in open(sj_file,'r'): # <<<<<<<<<<<<<< * fields = line.rstrip().split('\t') * if fields[3]=='1': # Forward strand */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sj_file); __Pyx_GIVEREF(__pyx_v_sj_file); @@ -19979,16 +19976,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_r); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 579, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -19996,17 +19993,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 579, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 579, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -20016,7 +20013,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 578, __pyx_L1_error) + else __PYX_ERR(0, 579, __pyx_L1_error) } break; } @@ -20025,14 +20022,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":579 + /* "_rnaseq_utils.pyx":580 * if len(fields) == 9 or sj_file.lower().endswith('.out.tab'): # STAR SJ.out.tab file * for line in open(sj_file,'r'): * fields = line.rstrip().split('\t') # <<<<<<<<<<<<<< * if fields[3]=='1': # Forward strand * sj_tuple = (fields[0], int(fields[1])-1, int(fields[2]), 1) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -20046,10 +20043,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_2 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 579, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -20064,14 +20061,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_2, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__13); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 579, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 580, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":580 + /* "_rnaseq_utils.pyx":581 * for line in open(sj_file,'r'): * fields = line.rstrip().split('\t') * if fields[3]=='1': # Forward strand # <<<<<<<<<<<<<< @@ -20080,15 +20077,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 580, __pyx_L1_error) + __PYX_ERR(0, 581, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_fields, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_fields, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_1, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 580, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u_1, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":581 + /* "_rnaseq_utils.pyx":582 * fields = line.rstrip().split('\t') * if fields[3]=='1': # Forward strand * sj_tuple = (fields[0], int(fields[1])-1, int(fields[2]), 1) # <<<<<<<<<<<<<< @@ -20097,32 +20094,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 581, __pyx_L1_error) + __PYX_ERR(0, 582, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 581, __pyx_L1_error) + __PYX_ERR(0, 582, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_fields, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_fields, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 581, __pyx_L1_error) + __PYX_ERR(0, 582, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 581, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); @@ -20139,7 +20136,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_XDECREF_SET(__pyx_v_sj_tuple, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":580 + /* "_rnaseq_utils.pyx":581 * for line in open(sj_file,'r'): * fields = line.rstrip().split('\t') * if fields[3]=='1': # Forward strand # <<<<<<<<<<<<<< @@ -20149,7 +20146,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py goto __pyx_L9; } - /* "_rnaseq_utils.pyx":582 + /* "_rnaseq_utils.pyx":583 * if fields[3]=='1': # Forward strand * sj_tuple = (fields[0], int(fields[1])-1, int(fields[2]), 1) * elif fields[3]=='2': # Reverse strand # <<<<<<<<<<<<<< @@ -20158,15 +20155,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 582, __pyx_L1_error) + __PYX_ERR(0, 583, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_2, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 582, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_2, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 583, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":583 + /* "_rnaseq_utils.pyx":584 * sj_tuple = (fields[0], int(fields[1])-1, int(fields[2]), 1) * elif fields[3]=='2': # Reverse strand * sj_tuple = (fields[0], int(fields[1])-1, int(fields[2]), -1) # <<<<<<<<<<<<<< @@ -20175,32 +20172,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 583, __pyx_L1_error) + __PYX_ERR(0, 584, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 583, __pyx_L1_error) + __PYX_ERR(0, 584, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyInt_SubtractObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_SubtractObjC(__pyx_t_4, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 583, __pyx_L1_error) + __PYX_ERR(0, 584, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_fields, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_fields, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 583, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -20217,7 +20214,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_XDECREF_SET(__pyx_v_sj_tuple, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":582 + /* "_rnaseq_utils.pyx":583 * if fields[3]=='1': # Forward strand * sj_tuple = (fields[0], int(fields[1])-1, int(fields[2]), 1) * elif fields[3]=='2': # Reverse strand # <<<<<<<<<<<<<< @@ -20227,17 +20224,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_L9:; - /* "_rnaseq_utils.pyx":585 + /* "_rnaseq_utils.pyx":586 * sj_tuple = (fields[0], int(fields[1])-1, int(fields[2]), -1) * * sj_set.add(sj_tuple) # <<<<<<<<<<<<<< - * elif len(fields) == 6 or sj_file.lower().endswith('.bed'): # intron BED6 file + * elif len(fields) == 6 and sj_file.lower().endswith('.bed'): # intron BED6 file * for line in open(sj_file,'r'): */ - if (unlikely(!__pyx_v_sj_tuple)) { __Pyx_RaiseUnboundLocalError("sj_tuple"); __PYX_ERR(0, 585, __pyx_L1_error) } - __pyx_t_10 = PySet_Add(__pyx_v_sj_set, __pyx_v_sj_tuple); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 585, __pyx_L1_error) + if (unlikely(!__pyx_v_sj_tuple)) { __Pyx_RaiseUnboundLocalError("sj_tuple"); __PYX_ERR(0, 586, __pyx_L1_error) } + __pyx_t_10 = PySet_Add(__pyx_v_sj_set, __pyx_v_sj_tuple); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 586, __pyx_L1_error) - /* "_rnaseq_utils.pyx":578 + /* "_rnaseq_utils.pyx":579 * fields = testline.split('\t') * if len(fields) == 9 or sj_file.lower().endswith('.out.tab'): # STAR SJ.out.tab file * for line in open(sj_file,'r'): # <<<<<<<<<<<<<< @@ -20247,7 +20244,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":577 + /* "_rnaseq_utils.pyx":578 * testline = open(sj_file,'r').readline() * fields = testline.split('\t') * if len(fields) == 9 or sj_file.lower().endswith('.out.tab'): # STAR SJ.out.tab file # <<<<<<<<<<<<<< @@ -20257,25 +20254,25 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py goto __pyx_L4; } - /* "_rnaseq_utils.pyx":586 + /* "_rnaseq_utils.pyx":587 * * sj_set.add(sj_tuple) - * elif len(fields) == 6 or sj_file.lower().endswith('.bed'): # intron BED6 file # <<<<<<<<<<<<<< + * elif len(fields) == 6 and sj_file.lower().endswith('.bed'): # intron BED6 file # <<<<<<<<<<<<<< * for line in open(sj_file,'r'): * fields = line.rstrip().split('\t') */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 586, __pyx_L1_error) + __PYX_ERR(0, 587, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_fields); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_fields); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 587, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_7 == 6) != 0); - if (!__pyx_t_5) { + if (__pyx_t_5) { } else { __pyx_t_6 = __pyx_t_5; goto __pyx_L10_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sj_file, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sj_file, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -20289,10 +20286,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 586, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_endswith); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -20307,23 +20304,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u_bed) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_bed); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 586, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = __pyx_t_5; __pyx_L10_bool_binop_done:; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":587 + /* "_rnaseq_utils.pyx":588 * sj_set.add(sj_tuple) - * elif len(fields) == 6 or sj_file.lower().endswith('.bed'): # intron BED6 file + * elif len(fields) == 6 and sj_file.lower().endswith('.bed'): # intron BED6 file * for line in open(sj_file,'r'): # <<<<<<<<<<<<<< * fields = line.rstrip().split('\t') * if fields[5]=='+': # Forward strand */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sj_file); __Pyx_GIVEREF(__pyx_v_sj_file); @@ -20331,16 +20328,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_n_u_r); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 588, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -20348,17 +20345,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 588, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 588, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 587, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -20368,7 +20365,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 587, __pyx_L1_error) + else __PYX_ERR(0, 588, __pyx_L1_error) } break; } @@ -20377,14 +20374,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":588 - * elif len(fields) == 6 or sj_file.lower().endswith('.bed'): # intron BED6 file + /* "_rnaseq_utils.pyx":589 + * elif len(fields) == 6 and sj_file.lower().endswith('.bed'): # intron BED6 file * for line in open(sj_file,'r'): * fields = line.rstrip().split('\t') # <<<<<<<<<<<<<< * if fields[5]=='+': # Forward strand * sj_tuple = (fields[0], int(fields[1]), int(fields[2]), 1) */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -20398,10 +20395,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 588, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 588, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -20416,14 +20413,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_4, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_u__13); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 588, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 588, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 589, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":589 + /* "_rnaseq_utils.pyx":590 * for line in open(sj_file,'r'): * fields = line.rstrip().split('\t') * if fields[5]=='+': # Forward strand # <<<<<<<<<<<<<< @@ -20432,15 +20429,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 589, __pyx_L1_error) + __PYX_ERR(0, 590, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_fields, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 589, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_fields, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 589, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":590 + /* "_rnaseq_utils.pyx":591 * fields = line.rstrip().split('\t') * if fields[5]=='+': # Forward strand * sj_tuple = (fields[0], int(fields[1]), int(fields[2]), 1) # <<<<<<<<<<<<<< @@ -20449,29 +20446,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 590, __pyx_L1_error) + __PYX_ERR(0, 591, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 590, __pyx_L1_error) + __PYX_ERR(0, 591, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 590, __pyx_L1_error) + __PYX_ERR(0, 591, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 590, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_3); @@ -20488,7 +20485,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_XDECREF_SET(__pyx_v_sj_tuple, ((PyObject*)__pyx_t_9)); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":589 + /* "_rnaseq_utils.pyx":590 * for line in open(sj_file,'r'): * fields = line.rstrip().split('\t') * if fields[5]=='+': # Forward strand # <<<<<<<<<<<<<< @@ -20498,7 +20495,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py goto __pyx_L14; } - /* "_rnaseq_utils.pyx":591 + /* "_rnaseq_utils.pyx":592 * if fields[5]=='+': # Forward strand * sj_tuple = (fields[0], int(fields[1]), int(fields[2]), 1) * elif fields[5]=='-': # Reverse strand # <<<<<<<<<<<<<< @@ -20507,15 +20504,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 591, __pyx_L1_error) + __PYX_ERR(0, 592, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 5, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 591, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":592 + /* "_rnaseq_utils.pyx":593 * sj_tuple = (fields[0], int(fields[1]), int(fields[2]), 1) * elif fields[5]=='-': # Reverse strand * sj_tuple = (fields[0], int(fields[1]), int(fields[2]), -1) # <<<<<<<<<<<<<< @@ -20524,29 +20521,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 592, __pyx_L1_error) + __PYX_ERR(0, 593, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_fields, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 592, __pyx_L1_error) + __PYX_ERR(0, 593, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 592, __pyx_L1_error) + __PYX_ERR(0, 593, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_fields, 2, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 592, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9); @@ -20563,7 +20560,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_XDECREF_SET(__pyx_v_sj_tuple, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":591 + /* "_rnaseq_utils.pyx":592 * if fields[5]=='+': # Forward strand * sj_tuple = (fields[0], int(fields[1]), int(fields[2]), 1) * elif fields[5]=='-': # Reverse strand # <<<<<<<<<<<<<< @@ -20573,19 +20570,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __pyx_L14:; - /* "_rnaseq_utils.pyx":594 + /* "_rnaseq_utils.pyx":595 * sj_tuple = (fields[0], int(fields[1]), int(fields[2]), -1) * * sj_set.add(sj_tuple) # <<<<<<<<<<<<<< * else: - * print("WARNING: --splice file not recognized. Provide SJ.out.tab or BED6.") + * print("ERROR: --splice file not recognized. Provide SJ.out.tab or BED6.") */ - if (unlikely(!__pyx_v_sj_tuple)) { __Pyx_RaiseUnboundLocalError("sj_tuple"); __PYX_ERR(0, 594, __pyx_L1_error) } - __pyx_t_10 = PySet_Add(__pyx_v_sj_set, __pyx_v_sj_tuple); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 594, __pyx_L1_error) + if (unlikely(!__pyx_v_sj_tuple)) { __Pyx_RaiseUnboundLocalError("sj_tuple"); __PYX_ERR(0, 595, __pyx_L1_error) } + __pyx_t_10 = PySet_Add(__pyx_v_sj_set, __pyx_v_sj_tuple); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 595, __pyx_L1_error) - /* "_rnaseq_utils.pyx":587 + /* "_rnaseq_utils.pyx":588 * sj_set.add(sj_tuple) - * elif len(fields) == 6 or sj_file.lower().endswith('.bed'): # intron BED6 file + * elif len(fields) == 6 and sj_file.lower().endswith('.bed'): # intron BED6 file * for line in open(sj_file,'r'): # <<<<<<<<<<<<<< * fields = line.rstrip().split('\t') * if fields[5]=='+': # Forward strand @@ -20593,42 +20590,71 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":586 + /* "_rnaseq_utils.pyx":587 * * sj_set.add(sj_tuple) - * elif len(fields) == 6 or sj_file.lower().endswith('.bed'): # intron BED6 file # <<<<<<<<<<<<<< + * elif len(fields) == 6 and sj_file.lower().endswith('.bed'): # intron BED6 file # <<<<<<<<<<<<<< * for line in open(sj_file,'r'): * fields = line.rstrip().split('\t') */ goto __pyx_L4; } - /* "_rnaseq_utils.pyx":596 + /* "_rnaseq_utils.pyx":597 * sj_set.add(sj_tuple) * else: - * print("WARNING: --splice file not recognized. Provide SJ.out.tab or BED6.") # <<<<<<<<<<<<<< + * print("ERROR: --splice file not recognized. Provide SJ.out.tab or BED6.") # <<<<<<<<<<<<<< * print("For BED12/GTF/GFF3, use --reference.") - * + * sys.exit(1) */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":597 + /* "_rnaseq_utils.pyx":598 * else: - * print("WARNING: --splice file not recognized. Provide SJ.out.tab or BED6.") + * print("ERROR: --splice file not recognized. Provide SJ.out.tab or BED6.") * print("For BED12/GTF/GFF3, use --reference.") # <<<<<<<<<<<<<< + * sys.exit(1) + * + */ + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_rnaseq_utils.pyx":599 + * print("ERROR: --splice file not recognized. Provide SJ.out.tab or BED6.") + * print("For BED12/GTF/GFF3, use --reference.") + * sys.exit(1) # <<<<<<<<<<<<<< * * for chrom in self.reference_dict.keys(): */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_sys); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_2)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_int_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_int_1); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; - /* "_rnaseq_utils.pyx":574 + /* "_rnaseq_utils.pyx":575 * cdef list fields * sj_set = set() * if sj_file is not None: # <<<<<<<<<<<<<< @@ -20637,8 +20663,8 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ } - /* "_rnaseq_utils.pyx":599 - * print("For BED12/GTF/GFF3, use --reference.") + /* "_rnaseq_utils.pyx":601 + * sys.exit(1) * * for chrom in self.reference_dict.keys(): # <<<<<<<<<<<<<< * for transcript in self.reference_dict[chrom]: @@ -20647,22 +20673,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __pyx_t_7 = 0; if (unlikely(__pyx_v_self->reference_dict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 599, __pyx_L1_error) + __PYX_ERR(0, 601, __pyx_L1_error) } - __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_self->reference_dict, 1, __pyx_n_s_keys, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->reference_dict, 1, __pyx_n_s_keys, (&__pyx_t_11), (&__pyx_t_12)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_1); - __pyx_t_1 = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_1 = __pyx_t_3; + __pyx_t_3 = 0; while (1) { - __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_11, &__pyx_t_7, &__pyx_t_2, NULL, NULL, __pyx_t_12); + __pyx_t_13 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_11, &__pyx_t_7, &__pyx_t_3, NULL, NULL, __pyx_t_12); if (unlikely(__pyx_t_13 == 0)) break; - if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_XDECREF_SET(__pyx_v_chrom, __pyx_t_2); - __pyx_t_2 = 0; + if (unlikely(__pyx_t_13 == -1)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_chrom, __pyx_t_3); + __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":600 + /* "_rnaseq_utils.pyx":602 * * for chrom in self.reference_dict.keys(): * for transcript in self.reference_dict[chrom]: # <<<<<<<<<<<<<< @@ -20671,110 +20697,110 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py */ if (unlikely(__pyx_v_self->reference_dict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 600, __pyx_L1_error) + __PYX_ERR(0, 602, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->reference_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_14 = 0; + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->reference_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_14 = 0; __pyx_t_8 = NULL; } else { - __pyx_t_14 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_14 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 602, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_8)) { - if (likely(PyList_CheckExact(__pyx_t_3))) { - if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_3)) break; + if (likely(PyList_CheckExact(__pyx_t_2))) { + if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 602, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_3)) break; + if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_14); __Pyx_INCREF(__pyx_t_2); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_3); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 602, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_2 = __pyx_t_8(__pyx_t_3); - if (unlikely(!__pyx_t_2)) { + __pyx_t_3 = __pyx_t_8(__pyx_t_2); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 600, __pyx_L1_error) + else __PYX_ERR(0, 602, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_3); } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_transcript, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_2)); - __pyx_t_2 = 0; + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_transcript, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_3)); + __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":601 + /* "_rnaseq_utils.pyx":603 * for chrom in self.reference_dict.keys(): * for transcript in self.reference_dict[chrom]: * for l,r in transcript.junctions(): # <<<<<<<<<<<<<< * sj_tuple = (chrom, l, r, transcript.strand) * sj_set.add(sj_tuple) */ - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_transcript->__pyx_vtab)->junctions(__pyx_v_transcript, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { - __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_15 = 0; + __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_transcript->__pyx_vtab)->junctions(__pyx_v_transcript, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_15 = 0; __pyx_t_16 = NULL; } else { - __pyx_t_15 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_15 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 603, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (likely(!__pyx_t_16)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 603, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_2); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_15); __Pyx_INCREF(__pyx_t_3); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 603, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_2 = __pyx_t_16(__pyx_t_4); - if (unlikely(!__pyx_t_2)) { + __pyx_t_3 = __pyx_t_16(__pyx_t_4); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 601, __pyx_L1_error) + else __PYX_ERR(0, 603, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_3); } - if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { - PyObject* sequence = __pyx_t_2; + if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { + PyObject* sequence = __pyx_t_3; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 601, __pyx_L1_error) + __PYX_ERR(0, 603, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -20787,23 +20813,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_17); #else - __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); #endif - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_18 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_18 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_19 = Py_TYPE(__pyx_t_18)->tp_iternext; index = 0; __pyx_t_9 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_9)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_17 = __pyx_t_19(__pyx_t_18); if (unlikely(!__pyx_t_17)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_17); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 2) < 0) __PYX_ERR(0, 601, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 2) < 0) __PYX_ERR(0, 603, __pyx_L1_error) __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L22_unpacking_done; @@ -20811,56 +20837,56 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 601, __pyx_L1_error) + __PYX_ERR(0, 603, __pyx_L1_error) __pyx_L22_unpacking_done:; } - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_20 = __Pyx_PyInt_As_int(__pyx_t_17); if (unlikely((__pyx_t_20 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; __pyx_v_l = __pyx_t_13; __pyx_v_r = __pyx_t_20; - /* "_rnaseq_utils.pyx":602 + /* "_rnaseq_utils.pyx":604 * for transcript in self.reference_dict[chrom]: * for l,r in transcript.junctions(): * sj_tuple = (chrom, l, r, transcript.strand) # <<<<<<<<<<<<<< * sj_set.add(sj_tuple) * */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 602, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_17 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_transcript->strand); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 602, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_transcript->strand); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 602, __pyx_L1_error) + __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_18, 2, __pyx_t_17); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_t_9); - __pyx_t_2 = 0; + __pyx_t_3 = 0; __pyx_t_17 = 0; __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_sj_tuple, ((PyObject*)__pyx_t_18)); __pyx_t_18 = 0; - /* "_rnaseq_utils.pyx":603 + /* "_rnaseq_utils.pyx":605 * for l,r in transcript.junctions(): * sj_tuple = (chrom, l, r, transcript.strand) * sj_set.add(sj_tuple) # <<<<<<<<<<<<<< * * return sj_set */ - __pyx_t_10 = PySet_Add(__pyx_v_sj_set, __pyx_v_sj_tuple); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_10 = PySet_Add(__pyx_v_sj_set, __pyx_v_sj_tuple); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 605, __pyx_L1_error) - /* "_rnaseq_utils.pyx":601 + /* "_rnaseq_utils.pyx":603 * for chrom in self.reference_dict.keys(): * for transcript in self.reference_dict[chrom]: * for l,r in transcript.junctions(): # <<<<<<<<<<<<<< @@ -20870,7 +20896,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":600 + /* "_rnaseq_utils.pyx":602 * * for chrom in self.reference_dict.keys(): * for transcript in self.reference_dict[chrom]: # <<<<<<<<<<<<<< @@ -20878,11 +20904,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py * sj_tuple = (chrom, l, r, transcript.strand) */ } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":605 + /* "_rnaseq_utils.pyx":607 * sj_set.add(sj_tuple) * * return sj_set # <<<<<<<<<<<<<< @@ -20894,7 +20920,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(struct __py __pyx_r = __pyx_v_sj_set; goto __pyx_L0; - /* "_rnaseq_utils.pyx":566 + /* "_rnaseq_utils.pyx":567 * self.sj_set = self.make_sj_set(self.config.get('sj',None)) * * cpdef make_sj_set(self, sj_file): # <<<<<<<<<<<<<< @@ -20949,7 +20975,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_2make_sj_set(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("make_sj_set", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(__pyx_v_self, __pyx_v_sj_file, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set(__pyx_v_self, __pyx_v_sj_file, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -20966,7 +20992,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_2make_sj_set(struct __ return __pyx_r; } -/* "_rnaseq_utils.pyx":607 +/* "_rnaseq_utils.pyx":609 * return sj_set * * cpdef add_source(self, source_string): # <<<<<<<<<<<<<< @@ -20998,7 +21024,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(struct __pyx if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_5add_source)) { __Pyx_XDECREF(__pyx_r); @@ -21015,7 +21041,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(struct __pyx } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_source_string) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_source_string); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -21036,7 +21062,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(struct __pyx #endif } - /* "_rnaseq_utils.pyx":608 + /* "_rnaseq_utils.pyx":610 * * cpdef add_source(self, source_string): * if source_string not in self.source_dict: # <<<<<<<<<<<<<< @@ -21045,13 +21071,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(struct __pyx */ if (unlikely(__pyx_v_self->source_dict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 608, __pyx_L1_error) + __PYX_ERR(0, 610, __pyx_L1_error) } - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_source_string, __pyx_v_self->source_dict, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 608, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_source_string, __pyx_v_self->source_dict, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 610, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":609 + /* "_rnaseq_utils.pyx":611 * cpdef add_source(self, source_string): * if source_string not in self.source_dict: * self.source_array.append(source_string) # <<<<<<<<<<<<<< @@ -21060,27 +21086,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(struct __pyx */ if (unlikely(__pyx_v_self->source_array == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 609, __pyx_L1_error) + __PYX_ERR(0, 611, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->source_array, __pyx_v_source_string); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 609, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->source_array, __pyx_v_source_string); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 611, __pyx_L1_error) - /* "_rnaseq_utils.pyx":610 + /* "_rnaseq_utils.pyx":612 * if source_string not in self.source_dict: * self.source_array.append(source_string) * self.source_dict[source_string] = self.source_index # <<<<<<<<<<<<<< * self.source_index += 1 * */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 610, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->source_dict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 610, __pyx_L1_error) + __PYX_ERR(0, 612, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->source_dict, __pyx_v_source_string, __pyx_t_1) < 0)) __PYX_ERR(0, 610, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->source_dict, __pyx_v_source_string, __pyx_t_1) < 0)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":611 + /* "_rnaseq_utils.pyx":613 * self.source_array.append(source_string) * self.source_dict[source_string] = self.source_index * self.source_index += 1 # <<<<<<<<<<<<<< @@ -21089,7 +21115,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(struct __pyx */ __pyx_v_self->source_index = (__pyx_v_self->source_index + 1); - /* "_rnaseq_utils.pyx":608 + /* "_rnaseq_utils.pyx":610 * * cpdef add_source(self, source_string): * if source_string not in self.source_dict: # <<<<<<<<<<<<<< @@ -21098,7 +21124,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(struct __pyx */ } - /* "_rnaseq_utils.pyx":607 + /* "_rnaseq_utils.pyx":609 * return sj_set * * cpdef add_source(self, source_string): # <<<<<<<<<<<<<< @@ -21144,7 +21170,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_4add_source(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_source", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(__pyx_v_self, __pyx_v_source_string, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_source(__pyx_v_self, __pyx_v_source_string, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21161,7 +21187,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_4add_source(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":613 +/* "_rnaseq_utils.pyx":615 * self.source_index += 1 * * cpdef add_chrom(self, chrom_string): # <<<<<<<<<<<<<< @@ -21193,7 +21219,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(struct __pyx_ if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_7add_chrom)) { __Pyx_XDECREF(__pyx_r); @@ -21210,7 +21236,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(struct __pyx_ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_chrom_string) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_chrom_string); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 613, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -21231,7 +21257,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(struct __pyx_ #endif } - /* "_rnaseq_utils.pyx":614 + /* "_rnaseq_utils.pyx":616 * * cpdef add_chrom(self, chrom_string): * if chrom_string not in self.chrom_dict: # <<<<<<<<<<<<<< @@ -21240,13 +21266,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(struct __pyx_ */ if (unlikely(__pyx_v_self->chrom_dict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 614, __pyx_L1_error) + __PYX_ERR(0, 616, __pyx_L1_error) } - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_chrom_string, __pyx_v_self->chrom_dict, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 614, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_v_chrom_string, __pyx_v_self->chrom_dict, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 616, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":615 + /* "_rnaseq_utils.pyx":617 * cpdef add_chrom(self, chrom_string): * if chrom_string not in self.chrom_dict: * self.chrom_array.append(chrom_string) # <<<<<<<<<<<<<< @@ -21255,27 +21281,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(struct __pyx_ */ if (unlikely(__pyx_v_self->chrom_array == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 615, __pyx_L1_error) + __PYX_ERR(0, 617, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->chrom_array, __pyx_v_chrom_string); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->chrom_array, __pyx_v_chrom_string); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 617, __pyx_L1_error) - /* "_rnaseq_utils.pyx":616 + /* "_rnaseq_utils.pyx":618 * if chrom_string not in self.chrom_dict: * self.chrom_array.append(chrom_string) * self.chrom_dict[chrom_string] = self.chrom_index # <<<<<<<<<<<<<< * self.chrom_index += 1 * */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->chrom_dict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 616, __pyx_L1_error) + __PYX_ERR(0, 618, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->chrom_dict, __pyx_v_chrom_string, __pyx_t_1) < 0)) __PYX_ERR(0, 616, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->chrom_dict, __pyx_v_chrom_string, __pyx_t_1) < 0)) __PYX_ERR(0, 618, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":617 + /* "_rnaseq_utils.pyx":619 * self.chrom_array.append(chrom_string) * self.chrom_dict[chrom_string] = self.chrom_index * self.chrom_index += 1 # <<<<<<<<<<<<<< @@ -21284,7 +21310,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(struct __pyx_ */ __pyx_v_self->chrom_index = (__pyx_v_self->chrom_index + 1); - /* "_rnaseq_utils.pyx":614 + /* "_rnaseq_utils.pyx":616 * * cpdef add_chrom(self, chrom_string): * if chrom_string not in self.chrom_dict: # <<<<<<<<<<<<<< @@ -21293,7 +21319,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(struct __pyx_ */ } - /* "_rnaseq_utils.pyx":613 + /* "_rnaseq_utils.pyx":615 * self.source_index += 1 * * cpdef add_chrom(self, chrom_string): # <<<<<<<<<<<<<< @@ -21339,7 +21365,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_6add_chrom(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_chrom", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(__pyx_v_self, __pyx_v_chrom_string, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 613, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_chrom(__pyx_v_self, __pyx_v_chrom_string, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21356,7 +21382,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_6add_chrom(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":619 +/* "_rnaseq_utils.pyx":621 * self.chrom_index += 1 * * cpdef add_read_from_BED(self, bed_line, source_string=None, s_tag=False, e_tag=False, capped=False, gaps_are_junctions=False): # <<<<<<<<<<<<<< @@ -21417,7 +21443,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_read_from_BED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_read_from_BED); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_9add_read_from_BED)) { __Pyx_XDECREF(__pyx_r); @@ -21437,7 +21463,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[7] = {__pyx_t_4, __pyx_v_bed_line, __pyx_v_source_string, __pyx_v_s_tag, __pyx_v_e_tag, __pyx_v_capped, __pyx_v_gaps_are_junctions}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 6+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 6+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -21445,13 +21471,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[7] = {__pyx_t_4, __pyx_v_bed_line, __pyx_v_source_string, __pyx_v_s_tag, __pyx_v_e_tag, __pyx_v_capped, __pyx_v_gaps_are_junctions}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 6+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 6+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(6+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(6+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -21474,7 +21500,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc __Pyx_INCREF(__pyx_v_gaps_are_junctions); __Pyx_GIVEREF(__pyx_v_gaps_are_junctions); PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_5, __pyx_v_gaps_are_junctions); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -21497,7 +21523,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc #endif } - /* "_rnaseq_utils.pyx":621 + /* "_rnaseq_utils.pyx":623 * cpdef add_read_from_BED(self, bed_line, source_string=None, s_tag=False, e_tag=False, capped=False, gaps_are_junctions=False): * cdef RNAseqMapping new_read * input_data = parse_BED_line(bed_line, self.chrom_dict, self.source_dict, source_string, s_tag, e_tag, capped, gaps_are_junctions) # <<<<<<<<<<<<<< @@ -21514,73 +21540,73 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc __pyx_t_7.e_tag = __pyx_v_e_tag; __pyx_t_7.capped = __pyx_v_capped; __pyx_t_7.gaps_are_junctions = __pyx_v_gaps_are_junctions; - __pyx_t_3 = __pyx_f_13_rnaseq_utils_parse_BED_line(__pyx_v_bed_line, __pyx_t_1, __pyx_t_2, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 621, __pyx_L1_error) + __pyx_t_3 = __pyx_f_13_rnaseq_utils_parse_BED_line(__pyx_v_bed_line, __pyx_t_1, __pyx_t_2, &__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_input_data = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":622 + /* "_rnaseq_utils.pyx":624 * cdef RNAseqMapping new_read * input_data = parse_BED_line(bed_line, self.chrom_dict, self.source_dict, source_string, s_tag, e_tag, capped, gaps_are_junctions) * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict # <<<<<<<<<<<<<< * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_8 = (((PyObject *)Py_TYPE(__pyx_t_3)) == ((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":623 + /* "_rnaseq_utils.pyx":625 * input_data = parse_BED_line(bed_line, self.chrom_dict, self.source_dict, source_string, s_tag, e_tag, capped, gaps_are_junctions) * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict * chrom_string = input_data.chrom # <<<<<<<<<<<<<< * input_data = input_data._replace(chrom=self.chrom_index) * self.add_chrom(chrom_string) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_chrom_string = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":624 + /* "_rnaseq_utils.pyx":626 * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) # <<<<<<<<<<<<<< * self.add_chrom(chrom_string) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chrom, __pyx_t_1) < 0) __PYX_ERR(0, 624, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chrom, __pyx_t_1) < 0) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_input_data, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":625 + /* "_rnaseq_utils.pyx":627 * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) * self.add_chrom(chrom_string) # <<<<<<<<<<<<<< * * if type(input_data.source) is str: # Source wasn't in source_dict */ - __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_v_chrom_string, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_v_chrom_string, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":622 + /* "_rnaseq_utils.pyx":624 * cdef RNAseqMapping new_read * input_data = parse_BED_line(bed_line, self.chrom_dict, self.source_dict, source_string, s_tag, e_tag, capped, gaps_are_junctions) * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict # <<<<<<<<<<<<<< @@ -21589,66 +21615,66 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc */ } - /* "_rnaseq_utils.pyx":627 + /* "_rnaseq_utils.pyx":629 * self.add_chrom(chrom_string) * * if type(input_data.source) is str: # Source wasn't in source_dict # <<<<<<<<<<<<<< * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = (((PyObject *)Py_TYPE(__pyx_t_1)) == ((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":628 + /* "_rnaseq_utils.pyx":630 * * if type(input_data.source) is str: # Source wasn't in source_dict * source_string = input_data.source # <<<<<<<<<<<<<< * input_data = input_data._replace(source=self.source_index) * self.add_source(source_string) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 628, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 630, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_source_string, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":629 + /* "_rnaseq_utils.pyx":631 * if type(input_data.source) is str: # Source wasn't in source_dict * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) # <<<<<<<<<<<<<< * self.add_source(source_string) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_t_3) < 0) __PYX_ERR(0, 629, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_t_3) < 0) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_input_data, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":630 + /* "_rnaseq_utils.pyx":632 * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) * self.add_source(source_string) # <<<<<<<<<<<<<< * * new_read = RNAseqMapping(input_data) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_source(__pyx_v_self, __pyx_v_source_string, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_source(__pyx_v_self, __pyx_v_source_string, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":627 + /* "_rnaseq_utils.pyx":629 * self.add_chrom(chrom_string) * * if type(input_data.source) is str: # Source wasn't in source_dict # <<<<<<<<<<<<<< @@ -21657,19 +21683,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc */ } - /* "_rnaseq_utils.pyx":632 + /* "_rnaseq_utils.pyx":634 * self.add_source(source_string) * * new_read = RNAseqMapping(input_data) # <<<<<<<<<<<<<< * self.read_list.append(new_read) * */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_v_input_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 632, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_v_input_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_new_read = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":633 + /* "_rnaseq_utils.pyx":635 * * new_read = RNAseqMapping(input_data) * self.read_list.append(new_read) # <<<<<<<<<<<<<< @@ -21678,11 +21704,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BED(struc */ if (unlikely(__pyx_v_self->read_list == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 633, __pyx_L1_error) + __PYX_ERR(0, 635, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->read_list, ((PyObject *)__pyx_v_new_read)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 633, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_self->read_list, ((PyObject *)__pyx_v_new_read)); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 635, __pyx_L1_error) - /* "_rnaseq_utils.pyx":619 + /* "_rnaseq_utils.pyx":621 * self.chrom_index += 1 * * cpdef add_read_from_BED(self, bed_line, source_string=None, s_tag=False, e_tag=False, capped=False, gaps_are_junctions=False): # <<<<<<<<<<<<<< @@ -21790,7 +21816,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_9add_read_from_BED(PyO } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_read_from_BED") < 0)) __PYX_ERR(0, 619, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_read_from_BED") < 0)) __PYX_ERR(0, 621, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -21818,7 +21844,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_9add_read_from_BED(PyO } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_read_from_BED", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 619, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_read_from_BED", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 621, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqDataset.add_read_from_BED", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21847,7 +21873,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_8add_read_from_BED(str __pyx_t_2.e_tag = __pyx_v_e_tag; __pyx_t_2.capped = __pyx_v_capped; __pyx_t_2.gaps_are_junctions = __pyx_v_gaps_are_junctions; - __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqDataset->add_read_from_BED(__pyx_v_self, __pyx_v_bed_line, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 619, __pyx_L1_error) + __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqDataset->add_read_from_BED(__pyx_v_self, __pyx_v_bed_line, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21864,7 +21890,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_8add_read_from_BED(str return __pyx_r; } -/* "_rnaseq_utils.pyx":635 +/* "_rnaseq_utils.pyx":637 * self.read_list.append(new_read) * * cpdef add_read(self, input_data): # <<<<<<<<<<<<<< @@ -21900,7 +21926,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_11add_read)) { __Pyx_XDECREF(__pyx_r); @@ -21917,7 +21943,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read(struct __pyx_o } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_input_data) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_input_data); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -21938,66 +21964,66 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read(struct __pyx_o #endif } - /* "_rnaseq_utils.pyx":637 + /* "_rnaseq_utils.pyx":639 * cpdef add_read(self, input_data): * cdef RNAseqMapping new_read * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict # <<<<<<<<<<<<<< * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_t_1)) == ((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":638 + /* "_rnaseq_utils.pyx":640 * cdef RNAseqMapping new_read * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict * chrom_string = input_data.chrom # <<<<<<<<<<<<<< * input_data = input_data._replace(chrom=self.chrom_index) * self.add_chrom(chrom_string) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_chrom_string = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":639 + /* "_rnaseq_utils.pyx":641 * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) # <<<<<<<<<<<<<< * self.add_chrom(chrom_string) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chrom, __pyx_t_3) < 0) __PYX_ERR(0, 639, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chrom, __pyx_t_3) < 0) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 639, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_input_data, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":640 + /* "_rnaseq_utils.pyx":642 * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) * self.add_chrom(chrom_string) # <<<<<<<<<<<<<< * * if type(input_data.source) is str: # Source wasn't in source_dict */ - __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_v_chrom_string, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 640, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_v_chrom_string, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":637 + /* "_rnaseq_utils.pyx":639 * cpdef add_read(self, input_data): * cdef RNAseqMapping new_read * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict # <<<<<<<<<<<<<< @@ -22006,66 +22032,66 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":642 + /* "_rnaseq_utils.pyx":644 * self.add_chrom(chrom_string) * * if type(input_data.source) is str: # Source wasn't in source_dict # <<<<<<<<<<<<<< * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 642, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_t_3)) == ((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":643 + /* "_rnaseq_utils.pyx":645 * * if type(input_data.source) is str: # Source wasn't in source_dict * source_string = input_data.source # <<<<<<<<<<<<<< * input_data = input_data._replace(source=self.source_index) * self.add_source(source_string) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 643, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_source_string = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":644 + /* "_rnaseq_utils.pyx":646 * if type(input_data.source) is str: # Source wasn't in source_dict * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) # <<<<<<<<<<<<<< * self.add_source(source_string) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_t_1) < 0) __PYX_ERR(0, 644, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_t_1) < 0) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 644, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 646, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_input_data, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":645 + /* "_rnaseq_utils.pyx":647 * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) * self.add_source(source_string) # <<<<<<<<<<<<<< * * new_read = RNAseqMapping(input_data) */ - __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_source(__pyx_v_self, __pyx_v_source_string, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_source(__pyx_v_self, __pyx_v_source_string, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":642 + /* "_rnaseq_utils.pyx":644 * self.add_chrom(chrom_string) * * if type(input_data.source) is str: # Source wasn't in source_dict # <<<<<<<<<<<<<< @@ -22074,19 +22100,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":647 + /* "_rnaseq_utils.pyx":649 * self.add_source(source_string) * * new_read = RNAseqMapping(input_data) # <<<<<<<<<<<<<< * self.read_list.append(new_read) * */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_v_input_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 647, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_v_input_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_read = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":648 + /* "_rnaseq_utils.pyx":650 * * new_read = RNAseqMapping(input_data) * self.read_list.append(new_read) # <<<<<<<<<<<<<< @@ -22095,11 +22121,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read(struct __pyx_o */ if (unlikely(__pyx_v_self->read_list == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 648, __pyx_L1_error) + __PYX_ERR(0, 650, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->read_list, ((PyObject *)__pyx_v_new_read)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_self->read_list, ((PyObject *)__pyx_v_new_read)); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 650, __pyx_L1_error) - /* "_rnaseq_utils.pyx":635 + /* "_rnaseq_utils.pyx":637 * self.read_list.append(new_read) * * cpdef add_read(self, input_data): # <<<<<<<<<<<<<< @@ -22149,7 +22175,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_10add_read(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_read", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read(__pyx_v_self, __pyx_v_input_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read(__pyx_v_self, __pyx_v_input_data, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22166,7 +22192,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_10add_read(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":650 +/* "_rnaseq_utils.pyx":652 * self.read_list.append(new_read) * * cpdef add_read_from_ELR(self, elr_line): # <<<<<<<<<<<<<< @@ -22197,7 +22223,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_ELR(struc if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_read_from_ELR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_read_from_ELR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_13add_read_from_ELR)) { __Pyx_XDECREF(__pyx_r); @@ -22214,7 +22240,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_ELR(struc } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_elr_line) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_elr_line); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -22235,19 +22261,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_ELR(struc #endif } - /* "_rnaseq_utils.pyx":652 + /* "_rnaseq_utils.pyx":654 * cpdef add_read_from_ELR(self, elr_line): * cdef RNAseqMapping new_read * new_read = elr_to_readobject(elr_line) # <<<<<<<<<<<<<< * self.read_list.append(new_read) * */ - __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_elr_to_readobject(__pyx_v_elr_line, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_elr_to_readobject(__pyx_v_elr_line, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_read = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":653 + /* "_rnaseq_utils.pyx":655 * cdef RNAseqMapping new_read * new_read = elr_to_readobject(elr_line) * self.read_list.append(new_read) # <<<<<<<<<<<<<< @@ -22256,11 +22282,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_ELR(struc */ if (unlikely(__pyx_v_self->read_list == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "append"); - __PYX_ERR(0, 653, __pyx_L1_error) + __PYX_ERR(0, 655, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->read_list, ((PyObject *)__pyx_v_new_read)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 653, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_self->read_list, ((PyObject *)__pyx_v_new_read)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 655, __pyx_L1_error) - /* "_rnaseq_utils.pyx":650 + /* "_rnaseq_utils.pyx":652 * self.read_list.append(new_read) * * cpdef add_read_from_ELR(self, elr_line): # <<<<<<<<<<<<<< @@ -22307,7 +22333,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_12add_read_from_ELR(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_read_from_ELR", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_ELR(__pyx_v_self, __pyx_v_elr_line, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_ELR(__pyx_v_self, __pyx_v_elr_line, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22324,7 +22350,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_12add_read_from_ELR(st return __pyx_r; } -/* "_rnaseq_utils.pyx":655 +/* "_rnaseq_utils.pyx":657 * self.read_list.append(new_read) * * cpdef add_read_from_BAM(self, bam_lines): # <<<<<<<<<<<<<< @@ -22361,7 +22387,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_read_from_BAM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_read_from_BAM); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_15add_read_from_BAM)) { __Pyx_XDECREF(__pyx_r); @@ -22378,7 +22404,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_bam_lines) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_bam_lines); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -22399,7 +22425,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc #endif } - /* "_rnaseq_utils.pyx":659 + /* "_rnaseq_utils.pyx":661 * cdef RNAseqMapping read * cdef BAMobject BAM * if type(bam_lines) is not list: # <<<<<<<<<<<<<< @@ -22410,14 +22436,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":660 + /* "_rnaseq_utils.pyx":662 * cdef BAMobject BAM * if type(bam_lines) is not list: * bam_lines = [bam_lines] # <<<<<<<<<<<<<< * * BAM = BAMobject(dataset=self, input_lines=bam_lines) */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_bam_lines); __Pyx_GIVEREF(__pyx_v_bam_lines); @@ -22425,7 +22451,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc __Pyx_DECREF_SET(__pyx_v_bam_lines, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":659 + /* "_rnaseq_utils.pyx":661 * cdef RNAseqMapping read * cdef BAMobject BAM * if type(bam_lines) is not list: # <<<<<<<<<<<<<< @@ -22434,36 +22460,36 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc */ } - /* "_rnaseq_utils.pyx":662 + /* "_rnaseq_utils.pyx":664 * bam_lines = [bam_lines] * * BAM = BAMobject(dataset=self, input_lines=bam_lines) # <<<<<<<<<<<<<< * new_read_list = BAM.generate_read() * if len(new_read_list) > 0: */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dataset, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 662, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_input_lines, __pyx_v_bam_lines) < 0) __PYX_ERR(0, 662, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_BAMobject), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dataset, ((PyObject *)__pyx_v_self)) < 0) __PYX_ERR(0, 664, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_input_lines, __pyx_v_bam_lines) < 0) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_BAMobject), __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_BAM = ((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":663 + /* "_rnaseq_utils.pyx":665 * * BAM = BAMobject(dataset=self, input_lines=bam_lines) * new_read_list = BAM.generate_read() # <<<<<<<<<<<<<< * if len(new_read_list) > 0: * read = new_read_list[0] */ - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_BAM->__pyx_vtab)->generate_read(__pyx_v_BAM, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_BAM->__pyx_vtab)->generate_read(__pyx_v_BAM, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_new_read_list = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":664 + /* "_rnaseq_utils.pyx":666 * BAM = BAMobject(dataset=self, input_lines=bam_lines) * new_read_list = BAM.generate_read() * if len(new_read_list) > 0: # <<<<<<<<<<<<<< @@ -22472,13 +22498,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc */ if (unlikely(__pyx_v_new_read_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 664, __pyx_L1_error) + __PYX_ERR(0, 666, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_new_read_list); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_new_read_list); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 666, __pyx_L1_error) __pyx_t_6 = ((__pyx_t_7 > 0) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":665 + /* "_rnaseq_utils.pyx":667 * new_read_list = BAM.generate_read() * if len(new_read_list) > 0: * read = new_read_list[0] # <<<<<<<<<<<<<< @@ -22487,15 +22513,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc */ if (unlikely(__pyx_v_new_read_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 665, __pyx_L1_error) + __PYX_ERR(0, 667, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_new_read_list, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 665, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_new_read_list, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 665, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 667, __pyx_L1_error) __pyx_v_read = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":666 + /* "_rnaseq_utils.pyx":668 * if len(new_read_list) > 0: * read = new_read_list[0] * if read.s_tag: # <<<<<<<<<<<<<< @@ -22505,7 +22531,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc __pyx_t_6 = (__pyx_v_read->s_tag != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":667 + /* "_rnaseq_utils.pyx":669 * read = new_read_list[0] * if read.s_tag: * self.label_tally['S'][read.s_len] += 1 # <<<<<<<<<<<<<< @@ -22514,21 +22540,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc */ if (unlikely(__pyx_v_self->label_tally == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 667, __pyx_L1_error) + __PYX_ERR(0, 669, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->label_tally, __pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->label_tally, __pyx_n_u_S); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_v_read->s_len; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_8, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 667, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_8, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":666 + /* "_rnaseq_utils.pyx":668 * if len(new_read_list) > 0: * read = new_read_list[0] * if read.s_tag: # <<<<<<<<<<<<<< @@ -22538,7 +22564,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc goto __pyx_L5; } - /* "_rnaseq_utils.pyx":668 + /* "_rnaseq_utils.pyx":670 * if read.s_tag: * self.label_tally['S'][read.s_len] += 1 * elif read.s_len > 0: # <<<<<<<<<<<<<< @@ -22548,7 +22574,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc __pyx_t_6 = ((__pyx_v_read->s_len > 0) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":669 + /* "_rnaseq_utils.pyx":671 * self.label_tally['S'][read.s_len] += 1 * elif read.s_len > 0: * self.label_tally['s'][read.s_len] += 1 # <<<<<<<<<<<<<< @@ -22557,21 +22583,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc */ if (unlikely(__pyx_v_self->label_tally == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 669, __pyx_L1_error) + __PYX_ERR(0, 671, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->label_tally, __pyx_n_u_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->label_tally, __pyx_n_u_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_v_read->s_len; - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 669, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_8, __pyx_t_1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 669, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_8, __pyx_t_1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 671, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":668 + /* "_rnaseq_utils.pyx":670 * if read.s_tag: * self.label_tally['S'][read.s_len] += 1 * elif read.s_len > 0: # <<<<<<<<<<<<<< @@ -22581,7 +22607,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc } __pyx_L5:; - /* "_rnaseq_utils.pyx":671 + /* "_rnaseq_utils.pyx":673 * self.label_tally['s'][read.s_len] += 1 * * if read.e_tag: # <<<<<<<<<<<<<< @@ -22591,7 +22617,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc __pyx_t_6 = (__pyx_v_read->e_tag != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":672 + /* "_rnaseq_utils.pyx":674 * * if read.e_tag: * self.label_tally['E'][read.e_len] += 1 # <<<<<<<<<<<<<< @@ -22600,21 +22626,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc */ if (unlikely(__pyx_v_self->label_tally == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 672, __pyx_L1_error) + __PYX_ERR(0, 674, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->label_tally, __pyx_n_u_E); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->label_tally, __pyx_n_u_E); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_v_read->e_len; - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 672, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_8, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 672, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_8, __pyx_t_3, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 674, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":671 + /* "_rnaseq_utils.pyx":673 * self.label_tally['s'][read.s_len] += 1 * * if read.e_tag: # <<<<<<<<<<<<<< @@ -22624,7 +22650,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc goto __pyx_L6; } - /* "_rnaseq_utils.pyx":673 + /* "_rnaseq_utils.pyx":675 * if read.e_tag: * self.label_tally['E'][read.e_len] += 1 * elif read.e_len > 0: # <<<<<<<<<<<<<< @@ -22634,7 +22660,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc __pyx_t_6 = ((__pyx_v_read->e_len > 0) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":674 + /* "_rnaseq_utils.pyx":676 * self.label_tally['E'][read.e_len] += 1 * elif read.e_len > 0: * self.label_tally['e'][read.e_len] += 1 # <<<<<<<<<<<<<< @@ -22643,21 +22669,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc */ if (unlikely(__pyx_v_self->label_tally == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 674, __pyx_L1_error) + __PYX_ERR(0, 676, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->label_tally, __pyx_n_u_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->label_tally, __pyx_n_u_e); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_8 = __pyx_v_read->e_len; - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_8, __pyx_t_1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 674, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_t_2, __pyx_t_8, __pyx_t_1, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":673 + /* "_rnaseq_utils.pyx":675 * if read.e_tag: * self.label_tally['E'][read.e_len] += 1 * elif read.e_len > 0: # <<<<<<<<<<<<<< @@ -22667,7 +22693,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc } __pyx_L6:; - /* "_rnaseq_utils.pyx":664 + /* "_rnaseq_utils.pyx":666 * BAM = BAMobject(dataset=self, input_lines=bam_lines) * new_read_list = BAM.generate_read() * if len(new_read_list) > 0: # <<<<<<<<<<<<<< @@ -22676,14 +22702,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc */ } - /* "_rnaseq_utils.pyx":676 + /* "_rnaseq_utils.pyx":678 * self.label_tally['e'][read.e_len] += 1 * * self.read_list += new_read_list # <<<<<<<<<<<<<< * * cpdef pop_read(self, read_format='elr', as_string=True): */ - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->read_list, __pyx_v_new_read_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_self->read_list, __pyx_v_new_read_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->read_list); @@ -22691,7 +22717,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(struc __pyx_v_self->read_list = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":655 + /* "_rnaseq_utils.pyx":657 * self.read_list.append(new_read) * * cpdef add_read_from_BAM(self, bam_lines): # <<<<<<<<<<<<<< @@ -22741,7 +22767,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_14add_read_from_BAM(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_read_from_BAM", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(__pyx_v_self, __pyx_v_bam_lines, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_add_read_from_BAM(__pyx_v_self, __pyx_v_bam_lines, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22758,7 +22784,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_14add_read_from_BAM(st return __pyx_r; } -/* "_rnaseq_utils.pyx":678 +/* "_rnaseq_utils.pyx":680 * self.read_list += new_read_list * * cpdef pop_read(self, read_format='elr', as_string=True): # <<<<<<<<<<<<<< @@ -22800,7 +22826,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_17pop_read)) { __Pyx_XDECREF(__pyx_r); @@ -22820,7 +22846,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_read_format, __pyx_v_as_string}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -22828,13 +22854,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_read_format, __pyx_v_as_string}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -22845,7 +22871,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o __Pyx_INCREF(__pyx_v_as_string); __Pyx_GIVEREF(__pyx_v_as_string); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_as_string); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -22868,14 +22894,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o #endif } - /* "_rnaseq_utils.pyx":681 + /* "_rnaseq_utils.pyx":683 * """Remove the last read added to the stack and write it in 'format'. * """ * if read_format.lower() == 'elr': # <<<<<<<<<<<<<< * return(self.read_list.pop().write_as_elr(as_string)) * elif read_format.lower() == 'bed': */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read_format, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read_format, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -22889,14 +22915,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_elr, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_elr, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 683, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":682 + /* "_rnaseq_utils.pyx":684 * """ * if read_format.lower() == 'elr': * return(self.read_list.pop().write_as_elr(as_string)) # <<<<<<<<<<<<<< @@ -22906,11 +22932,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->read_list == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(0, 682, __pyx_L1_error) + __PYX_ERR(0, 684, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_self->read_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 682, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_self->read_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write_as_elr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 682, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write_as_elr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -22925,14 +22951,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_as_string) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_as_string); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":681 + /* "_rnaseq_utils.pyx":683 * """Remove the last read added to the stack and write it in 'format'. * """ * if read_format.lower() == 'elr': # <<<<<<<<<<<<<< @@ -22941,14 +22967,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":683 + /* "_rnaseq_utils.pyx":685 * if read_format.lower() == 'elr': * return(self.read_list.pop().write_as_elr(as_string)) * elif read_format.lower() == 'bed': # <<<<<<<<<<<<<< * return(self.read_list.pop().write_as_bed(self.chrom_array, self.source_array, as_string)) * elif read_format.lower() == 'gtf': */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_read_format, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_read_format, __pyx_n_s_lower); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -22962,14 +22988,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_bed_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 683, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_bed_2, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 685, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":684 + /* "_rnaseq_utils.pyx":686 * return(self.read_list.pop().write_as_elr(as_string)) * elif read_format.lower() == 'bed': * return(self.read_list.pop().write_as_bed(self.chrom_array, self.source_array, as_string)) # <<<<<<<<<<<<<< @@ -22979,11 +23005,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->read_list == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(0, 684, __pyx_L1_error) + __PYX_ERR(0, 686, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyList_Pop(__pyx_v_self->read_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyList_Pop(__pyx_v_self->read_list); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write_as_bed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_write_as_bed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -23001,7 +23027,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->chrom_array, __pyx_v_self->source_array, __pyx_v_as_string}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -23009,13 +23035,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_self->chrom_array, __pyx_v_self->source_array, __pyx_v_as_string}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -23029,7 +23055,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o __Pyx_INCREF(__pyx_v_as_string); __Pyx_GIVEREF(__pyx_v_as_string); PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_as_string); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -23038,7 +23064,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":683 + /* "_rnaseq_utils.pyx":685 * if read_format.lower() == 'elr': * return(self.read_list.pop().write_as_elr(as_string)) * elif read_format.lower() == 'bed': # <<<<<<<<<<<<<< @@ -23047,14 +23073,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":685 + /* "_rnaseq_utils.pyx":687 * elif read_format.lower() == 'bed': * return(self.read_list.pop().write_as_bed(self.chrom_array, self.source_array, as_string)) * elif read_format.lower() == 'gtf': # <<<<<<<<<<<<<< * return(self.read_list.pop().write_as_gtf(self.chrom_array, 'bed')) * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read_format, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read_format, __pyx_n_s_lower); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -23068,14 +23094,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o } __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_gtf, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 685, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_gtf, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":686 + /* "_rnaseq_utils.pyx":688 * return(self.read_list.pop().write_as_bed(self.chrom_array, self.source_array, as_string)) * elif read_format.lower() == 'gtf': * return(self.read_list.pop().write_as_gtf(self.chrom_array, 'bed')) # <<<<<<<<<<<<<< @@ -23085,11 +23111,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->read_list == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "pop"); - __PYX_ERR(0, 686, __pyx_L1_error) + __PYX_ERR(0, 688, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_self->read_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v_self->read_list); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write_as_gtf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_write_as_gtf); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -23107,7 +23133,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self->chrom_array, __pyx_n_u_bed_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -23115,13 +23141,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_self->chrom_array, __pyx_n_u_bed_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -23132,7 +23158,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o __Pyx_INCREF(__pyx_n_u_bed_2); __Pyx_GIVEREF(__pyx_n_u_bed_2); PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_n_u_bed_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -23141,7 +23167,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":685 + /* "_rnaseq_utils.pyx":687 * elif read_format.lower() == 'bed': * return(self.read_list.pop().write_as_bed(self.chrom_array, self.source_array, as_string)) * elif read_format.lower() == 'gtf': # <<<<<<<<<<<<<< @@ -23150,7 +23176,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_pop_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":678 + /* "_rnaseq_utils.pyx":680 * self.read_list += new_read_list * * cpdef pop_read(self, read_format='elr', as_string=True): # <<<<<<<<<<<<<< @@ -23218,7 +23244,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_17pop_read(PyObject *_ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pop_read") < 0)) __PYX_ERR(0, 678, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pop_read") < 0)) __PYX_ERR(0, 680, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -23235,7 +23261,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_17pop_read(PyObject *_ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("pop_read", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 678, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("pop_read", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 680, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqDataset.pop_read", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -23261,7 +23287,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_16pop_read(struct __py __pyx_t_2.__pyx_n = 2; __pyx_t_2.read_format = __pyx_v_read_format; __pyx_t_2.as_string = __pyx_v_as_string; - __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqDataset->pop_read(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_1 = __pyx_vtabptr_13_rnaseq_utils_RNAseqDataset->pop_read(__pyx_v_self, 1, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 680, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23278,7 +23304,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_16pop_read(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":688 +/* "_rnaseq_utils.pyx":690 * return(self.read_list.pop().write_as_gtf(self.chrom_array, 'bed')) * * cpdef dump_header(self): # <<<<<<<<<<<<<< @@ -23315,7 +23341,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_dump_header); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_19dump_header)) { __Pyx_XDECREF(__pyx_r); @@ -23332,7 +23358,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; @@ -23353,19 +23379,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py #endif } - /* "_rnaseq_utils.pyx":690 + /* "_rnaseq_utils.pyx":692 * cpdef dump_header(self): * """Returns an array of strings that describe chrom_dict and source_dict of the Dataset.""" * header_list = [] # <<<<<<<<<<<<<< * for i,c in enumerate(self.chrom_array): * header_list += ['#C {} {}'.format(i, c)] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_header_list = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":691 + /* "_rnaseq_utils.pyx":693 * """Returns an array of strings that describe chrom_dict and source_dict of the Dataset.""" * header_list = [] * for i,c in enumerate(self.chrom_array): # <<<<<<<<<<<<<< @@ -23378,29 +23404,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 693, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 691, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 693, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":692 + /* "_rnaseq_utils.pyx":694 * header_list = [] * for i,c in enumerate(self.chrom_array): * header_list += ['#C {} {}'.format(i, c)] # <<<<<<<<<<<<<< * * for i,s in enumerate(self.source_array): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_C_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_C_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = NULL; __pyx_t_7 = 0; @@ -23417,7 +23443,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_i, __pyx_v_c}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -23425,13 +23451,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_i, __pyx_v_c}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -23442,23 +23468,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py __Pyx_INCREF(__pyx_v_c); __Pyx_GIVEREF(__pyx_v_c); PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_c); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_header_list, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_header_list, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_header_list, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":691 + /* "_rnaseq_utils.pyx":693 * """Returns an array of strings that describe chrom_dict and source_dict of the Dataset.""" * header_list = [] * for i,c in enumerate(self.chrom_array): # <<<<<<<<<<<<<< @@ -23469,7 +23495,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":694 + /* "_rnaseq_utils.pyx":696 * header_list += ['#C {} {}'.format(i, c)] * * for i,s in enumerate(self.source_array): # <<<<<<<<<<<<<< @@ -23482,29 +23508,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py for (;;) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 694, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 696, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_3); __pyx_t_3 = 0; __Pyx_INCREF(__pyx_t_1); __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":695 + /* "_rnaseq_utils.pyx":697 * * for i,s in enumerate(self.source_array): * header_list += ['#S {} {}'.format(i, s)] # <<<<<<<<<<<<<< * * return header_list */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_S_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_S_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = NULL; __pyx_t_7 = 0; @@ -23521,7 +23547,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_i, __pyx_v_s}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else @@ -23529,13 +23555,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_i, __pyx_v_s}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_3); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_8) { __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL; @@ -23546,23 +23572,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py __Pyx_INCREF(__pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_s); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_header_list, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 695, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_header_list, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_header_list, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":694 + /* "_rnaseq_utils.pyx":696 * header_list += ['#C {} {}'.format(i, c)] * * for i,s in enumerate(self.source_array): # <<<<<<<<<<<<<< @@ -23573,7 +23599,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":697 + /* "_rnaseq_utils.pyx":699 * header_list += ['#S {} {}'.format(i, s)] * * return header_list # <<<<<<<<<<<<<< @@ -23585,7 +23611,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(struct __py __pyx_r = __pyx_v_header_list; goto __pyx_L0; - /* "_rnaseq_utils.pyx":688 + /* "_rnaseq_utils.pyx":690 * return(self.read_list.pop().write_as_gtf(self.chrom_array, 'bed')) * * cpdef dump_header(self): # <<<<<<<<<<<<<< @@ -23636,7 +23662,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_18dump_header(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("dump_header", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_dump_header(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23653,7 +23679,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_18dump_header(struct _ return __pyx_r; } -/* "_rnaseq_utils.pyx":699 +/* "_rnaseq_utils.pyx":701 * return header_list * * cpdef dict import_annotation(self, str filename, str name): # <<<<<<<<<<<<<< @@ -23718,7 +23744,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_import_annotation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_import_annotation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_21import_annotation)) { __Pyx_XDECREF(__pyx_r); @@ -23738,7 +23764,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_filename, __pyx_v_name}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -23746,13 +23772,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_filename, __pyx_v_name}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -23763,12 +23789,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_name); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 699, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 701, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -23787,7 +23813,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc #endif } - /* "_rnaseq_utils.pyx":712 + /* "_rnaseq_utils.pyx":714 * float total_coverage, total_s, total_e, coverage, s, e * * if self.verbose: # <<<<<<<<<<<<<< @@ -23797,14 +23823,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_7 = (__pyx_v_self->verbose != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":713 + /* "_rnaseq_utils.pyx":715 * * if self.verbose: * print('Importing {}...'.format(filename)) # <<<<<<<<<<<<<< * * total_coverage = 0 */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Importing, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Importing, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -23818,15 +23844,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_v_filename) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_filename); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 713, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 715, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":712 + /* "_rnaseq_utils.pyx":714 * float total_coverage, total_s, total_e, coverage, s, e * * if self.verbose: # <<<<<<<<<<<<<< @@ -23835,7 +23861,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ } - /* "_rnaseq_utils.pyx":715 + /* "_rnaseq_utils.pyx":717 * print('Importing {}...'.format(filename)) * * total_coverage = 0 # <<<<<<<<<<<<<< @@ -23844,7 +23870,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_coverage = 0.0; - /* "_rnaseq_utils.pyx":716 + /* "_rnaseq_utils.pyx":718 * * total_coverage = 0 * total_s = 0 # <<<<<<<<<<<<<< @@ -23853,7 +23879,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_s = 0.0; - /* "_rnaseq_utils.pyx":717 + /* "_rnaseq_utils.pyx":719 * total_coverage = 0 * total_s = 0 * total_e = 0 # <<<<<<<<<<<<<< @@ -23862,7 +23888,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_e = 0.0; - /* "_rnaseq_utils.pyx":718 + /* "_rnaseq_utils.pyx":720 * total_s = 0 * total_e = 0 * object_dict = {k:[] for k in self.chrom_array} # <<<<<<<<<<<<<< @@ -23870,26 +23896,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc * file_extension = filename.split('.')[-1].upper() */ { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 718, __pyx_L6_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_self->chrom_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 718, __pyx_L6_error) + __PYX_ERR(0, 720, __pyx_L6_error) } __pyx_t_1 = __pyx_v_self->chrom_array; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 718, __pyx_L6_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 720, __pyx_L6_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L6_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 720, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_9genexpr21__pyx_v_k, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 718, __pyx_L6_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 720, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr21__pyx_v_k, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 718, __pyx_L6_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr21__pyx_v_k, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 720, __pyx_L6_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -23903,19 +23929,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_v_object_dict = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":719 + /* "_rnaseq_utils.pyx":721 * total_e = 0 * object_dict = {k:[] for k in self.chrom_array} * config_dict = {} # <<<<<<<<<<<<<< * file_extension = filename.split('.')[-1].upper() * if file_extension not in ['GTF','GFF3','GFF','BED','ELR']: */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_config_dict = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":720 + /* "_rnaseq_utils.pyx":722 * object_dict = {k:[] for k in self.chrom_array} * config_dict = {} * file_extension = filename.split('.')[-1].upper() # <<<<<<<<<<<<<< @@ -23924,14 +23950,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ if (unlikely(__pyx_v_filename == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split"); - __PYX_ERR(0, 720, __pyx_L1_error) + __PYX_ERR(0, 722, __pyx_L1_error) } - __pyx_t_1 = PyUnicode_Split(__pyx_v_filename, __pyx_kp_u__9, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_1 = PyUnicode_Split(__pyx_v_filename, __pyx_kp_u__9, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_t_1, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 720, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -23946,14 +23972,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 720, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 720, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 722, __pyx_L1_error) __pyx_v_file_extension = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":721 + /* "_rnaseq_utils.pyx":723 * config_dict = {} * file_extension = filename.split('.')[-1].upper() * if file_extension not in ['GTF','GFF3','GFF','BED','ELR']: # <<<<<<<<<<<<<< @@ -23962,35 +23988,35 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __Pyx_INCREF(__pyx_v_file_extension); __pyx_t_9 = __pyx_v_file_extension; - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GTF, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GTF, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { } else { __pyx_t_7 = __pyx_t_11; goto __pyx_L11_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF3, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF3, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) __pyx_t_10 = (__pyx_t_11 != 0); if (__pyx_t_10) { } else { __pyx_t_7 = __pyx_t_10; goto __pyx_L11_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { } else { __pyx_t_7 = __pyx_t_11; goto __pyx_L11_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_BED, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_BED, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) __pyx_t_10 = (__pyx_t_11 != 0); if (__pyx_t_10) { } else { __pyx_t_7 = __pyx_t_10; goto __pyx_L11_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_ELR, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_ELR, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); __pyx_t_7 = __pyx_t_11; __pyx_L11_bool_binop_done:; @@ -23998,7 +24024,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_11 = (__pyx_t_7 != 0); if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":722 + /* "_rnaseq_utils.pyx":724 * file_extension = filename.split('.')[-1].upper() * if file_extension not in ['GTF','GFF3','GFF','BED','ELR']: * return object_dict # <<<<<<<<<<<<<< @@ -24010,7 +24036,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_r = __pyx_v_object_dict; goto __pyx_L0; - /* "_rnaseq_utils.pyx":721 + /* "_rnaseq_utils.pyx":723 * config_dict = {} * file_extension = filename.split('.')[-1].upper() * if file_extension not in ['GTF','GFF3','GFF','BED','ELR']: # <<<<<<<<<<<<<< @@ -24019,7 +24045,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ } - /* "_rnaseq_utils.pyx":723 + /* "_rnaseq_utils.pyx":725 * if file_extension not in ['GTF','GFF3','GFF','BED','ELR']: * return object_dict * elif file_extension in ['GFF3','GFF']: # <<<<<<<<<<<<<< @@ -24028,14 +24054,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __Pyx_INCREF(__pyx_v_file_extension); __pyx_t_9 = __pyx_v_file_extension; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 725, __pyx_L1_error) __pyx_t_10 = (__pyx_t_7 != 0); if (!__pyx_t_10) { } else { __pyx_t_11 = __pyx_t_10; goto __pyx_L16_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 725, __pyx_L1_error) __pyx_t_7 = (__pyx_t_10 != 0); __pyx_t_11 = __pyx_t_7; __pyx_L16_bool_binop_done:; @@ -24043,7 +24069,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_7 = (__pyx_t_11 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":724 + /* "_rnaseq_utils.pyx":726 * return object_dict * elif file_extension in ['GFF3','GFF']: * format = 'GFF' # <<<<<<<<<<<<<< @@ -24053,20 +24079,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_n_u_GFF); __pyx_v_format = __pyx_n_u_GFF; - /* "_rnaseq_utils.pyx":725 + /* "_rnaseq_utils.pyx":727 * elif file_extension in ['GFF3','GFF']: * format = 'GFF' * config_dict = self.gff_config # <<<<<<<<<<<<<< * elif file_extension == 'GTF': * format = 'GTF' */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gff_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gff_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 725, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 727, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_config_dict, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":723 + /* "_rnaseq_utils.pyx":725 * if file_extension not in ['GTF','GFF3','GFF','BED','ELR']: * return object_dict * elif file_extension in ['GFF3','GFF']: # <<<<<<<<<<<<<< @@ -24076,18 +24102,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L10; } - /* "_rnaseq_utils.pyx":726 + /* "_rnaseq_utils.pyx":728 * format = 'GFF' * config_dict = self.gff_config * elif file_extension == 'GTF': # <<<<<<<<<<<<<< * format = 'GTF' * config_dict = self.gtf_config */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_file_extension, __pyx_n_u_GTF, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 726, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_file_extension, __pyx_n_u_GTF, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 728, __pyx_L1_error) __pyx_t_11 = (__pyx_t_7 != 0); if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":727 + /* "_rnaseq_utils.pyx":729 * config_dict = self.gff_config * elif file_extension == 'GTF': * format = 'GTF' # <<<<<<<<<<<<<< @@ -24097,20 +24123,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_n_u_GTF); __pyx_v_format = __pyx_n_u_GTF; - /* "_rnaseq_utils.pyx":728 + /* "_rnaseq_utils.pyx":730 * elif file_extension == 'GTF': * format = 'GTF' * config_dict = self.gtf_config # <<<<<<<<<<<<<< * elif file_extension == 'BED': * format = 'BED' */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gtf_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_gtf_config); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 728, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 730, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_config_dict, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":726 + /* "_rnaseq_utils.pyx":728 * format = 'GFF' * config_dict = self.gff_config * elif file_extension == 'GTF': # <<<<<<<<<<<<<< @@ -24120,18 +24146,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L10; } - /* "_rnaseq_utils.pyx":729 + /* "_rnaseq_utils.pyx":731 * format = 'GTF' * config_dict = self.gtf_config * elif file_extension == 'BED': # <<<<<<<<<<<<<< * format = 'BED' * elif file_extension == 'ELR': */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_file_extension, __pyx_n_u_BED, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_file_extension, __pyx_n_u_BED, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 731, __pyx_L1_error) __pyx_t_7 = (__pyx_t_11 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":730 + /* "_rnaseq_utils.pyx":732 * config_dict = self.gtf_config * elif file_extension == 'BED': * format = 'BED' # <<<<<<<<<<<<<< @@ -24141,7 +24167,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_n_u_BED); __pyx_v_format = __pyx_n_u_BED; - /* "_rnaseq_utils.pyx":729 + /* "_rnaseq_utils.pyx":731 * format = 'GTF' * config_dict = self.gtf_config * elif file_extension == 'BED': # <<<<<<<<<<<<<< @@ -24151,18 +24177,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L10; } - /* "_rnaseq_utils.pyx":731 + /* "_rnaseq_utils.pyx":733 * elif file_extension == 'BED': * format = 'BED' * elif file_extension == 'ELR': # <<<<<<<<<<<<<< * format = 'ELR' * */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_file_extension, __pyx_n_u_ELR, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_file_extension, __pyx_n_u_ELR, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 733, __pyx_L1_error) __pyx_t_11 = (__pyx_t_7 != 0); if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":732 + /* "_rnaseq_utils.pyx":734 * format = 'BED' * elif file_extension == 'ELR': * format = 'ELR' # <<<<<<<<<<<<<< @@ -24172,7 +24198,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_n_u_ELR); __pyx_v_format = __pyx_n_u_ELR; - /* "_rnaseq_utils.pyx":731 + /* "_rnaseq_utils.pyx":733 * elif file_extension == 'BED': * format = 'BED' * elif file_extension == 'ELR': # <<<<<<<<<<<<<< @@ -24182,14 +24208,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __pyx_L10:; - /* "_rnaseq_utils.pyx":734 + /* "_rnaseq_utils.pyx":736 * format = 'ELR' * * file = open(filename,'r') # <<<<<<<<<<<<<< * if format in ['GFF','GTF']: # Parse a GFF/GTF file * current_parent = AnnotationObject('', format, config_dict) # An empty annotation object */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_filename); __Pyx_GIVEREF(__pyx_v_filename); @@ -24197,30 +24223,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_n_u_r); __Pyx_GIVEREF(__pyx_n_u_r); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_r); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 734, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_open, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_file = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":735 + /* "_rnaseq_utils.pyx":737 * * file = open(filename,'r') * if format in ['GFF','GTF']: # Parse a GFF/GTF file # <<<<<<<<<<<<<< * current_parent = AnnotationObject('', format, config_dict) # An empty annotation object * current_object = AnnotationObject('', format, config_dict) # An empty annotation object */ - if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 735, __pyx_L1_error) } + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 737, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_format); __pyx_t_9 = __pyx_v_format; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GFF, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 737, __pyx_L1_error) __pyx_t_10 = (__pyx_t_7 != 0); if (!__pyx_t_10) { } else { __pyx_t_11 = __pyx_t_10; goto __pyx_L19_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GTF, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_GTF, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 737, __pyx_L1_error) __pyx_t_7 = (__pyx_t_10 != 0); __pyx_t_11 = __pyx_t_7; __pyx_L19_bool_binop_done:; @@ -24228,15 +24254,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_7 = (__pyx_t_11 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":736 + /* "_rnaseq_utils.pyx":738 * file = open(filename,'r') * if format in ['GFF','GTF']: # Parse a GFF/GTF file * current_parent = AnnotationObject('', format, config_dict) # An empty annotation object # <<<<<<<<<<<<<< * current_object = AnnotationObject('', format, config_dict) # An empty annotation object * last_child = current_object */ - if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 736, __pyx_L1_error) } - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error) + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 738, __pyx_L1_error) } + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_kp_u__7); __Pyx_GIVEREF(__pyx_kp_u__7); @@ -24247,21 +24273,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_v_config_dict); __Pyx_GIVEREF(__pyx_v_config_dict); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_config_dict); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_AnnotationObject), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_AnnotationObject), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_current_parent = ((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":737 + /* "_rnaseq_utils.pyx":739 * if format in ['GFF','GTF']: # Parse a GFF/GTF file * current_parent = AnnotationObject('', format, config_dict) # An empty annotation object * current_object = AnnotationObject('', format, config_dict) # An empty annotation object # <<<<<<<<<<<<<< * last_child = current_object * children = [] */ - if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 737, __pyx_L1_error) } - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 737, __pyx_L1_error) + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 739, __pyx_L1_error) } + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_kp_u__7); __Pyx_GIVEREF(__pyx_kp_u__7); @@ -24272,13 +24298,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_v_config_dict); __Pyx_GIVEREF(__pyx_v_config_dict); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_config_dict); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_AnnotationObject), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 737, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_AnnotationObject), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_current_object = ((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":738 + /* "_rnaseq_utils.pyx":740 * current_parent = AnnotationObject('', format, config_dict) # An empty annotation object * current_object = AnnotationObject('', format, config_dict) # An empty annotation object * last_child = current_object # <<<<<<<<<<<<<< @@ -24288,19 +24314,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(((PyObject *)__pyx_v_current_object)); __pyx_v_last_child = __pyx_v_current_object; - /* "_rnaseq_utils.pyx":739 + /* "_rnaseq_utils.pyx":741 * current_object = AnnotationObject('', format, config_dict) # An empty annotation object * last_child = current_object * children = [] # <<<<<<<<<<<<<< * for line in file: * if line[0] == '#':continue */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 739, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_children = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":740 + /* "_rnaseq_utils.pyx":742 * last_child = current_object * children = [] * for line in file: # <<<<<<<<<<<<<< @@ -24311,26 +24337,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_1 = __pyx_v_file; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 742, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 742, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 742, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -24340,7 +24366,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 740, __pyx_L1_error) + else __PYX_ERR(0, 742, __pyx_L1_error) } break; } @@ -24349,30 +24375,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":741 + /* "_rnaseq_utils.pyx":743 * children = [] * for line in file: * if line[0] == '#':continue # <<<<<<<<<<<<<< * current_object = AnnotationObject(line, format, config_dict) * if current_object.keep: */ - __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__26, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u__26, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 743, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_7) { goto __pyx_L21_continue; } - /* "_rnaseq_utils.pyx":742 + /* "_rnaseq_utils.pyx":744 * for line in file: * if line[0] == '#':continue * current_object = AnnotationObject(line, format, config_dict) # <<<<<<<<<<<<<< * if current_object.keep: * if current_object.parent: # Add the old object to object_dict and start a new one */ - if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 742, __pyx_L1_error) } - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 742, __pyx_L1_error) + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 744, __pyx_L1_error) } + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_line); __Pyx_GIVEREF(__pyx_v_line); @@ -24383,13 +24409,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(__pyx_v_config_dict); __Pyx_GIVEREF(__pyx_v_config_dict); PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_config_dict); - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_AnnotationObject), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_AnnotationObject), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 744, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_current_object, ((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":743 + /* "_rnaseq_utils.pyx":745 * if line[0] == '#':continue * current_object = AnnotationObject(line, format, config_dict) * if current_object.keep: # <<<<<<<<<<<<<< @@ -24399,7 +24425,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_7 = (__pyx_v_current_object->keep != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":744 + /* "_rnaseq_utils.pyx":746 * current_object = AnnotationObject(line, format, config_dict) * if current_object.keep: * if current_object.parent: # Add the old object to object_dict and start a new one # <<<<<<<<<<<<<< @@ -24409,7 +24435,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_7 = (__pyx_v_current_object->parent != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":745 + /* "_rnaseq_utils.pyx":747 * if current_object.keep: * if current_object.parent: # Add the old object to object_dict and start a new one * if current_parent.parent: # Ignore the first empty annotation object # <<<<<<<<<<<<<< @@ -24419,14 +24445,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_7 = (__pyx_v_current_parent->parent != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":746 + /* "_rnaseq_utils.pyx":748 * if current_object.parent: # Add the old object to object_dict and start a new one * if current_parent.parent: # Ignore the first empty annotation object * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) # <<<<<<<<<<<<<< * total_coverage += coverage * total_s += s */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_reference, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_reference, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 748, __pyx_L1_error) __pyx_t_13 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_mapping_object(__pyx_v_self, __pyx_v_current_parent, __pyx_v_children, __pyx_v_name, ((int)__pyx_t_7), __pyx_v_object_dict, 0); __pyx_t_14 = __pyx_t_13.f0; __pyx_t_15 = __pyx_t_13.f1; @@ -24435,7 +24461,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_v_s = __pyx_t_15; __pyx_v_e = __pyx_t_16; - /* "_rnaseq_utils.pyx":747 + /* "_rnaseq_utils.pyx":749 * if current_parent.parent: # Ignore the first empty annotation object * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) * total_coverage += coverage # <<<<<<<<<<<<<< @@ -24444,7 +24470,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_coverage = (__pyx_v_total_coverage + __pyx_v_coverage); - /* "_rnaseq_utils.pyx":748 + /* "_rnaseq_utils.pyx":750 * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) * total_coverage += coverage * total_s += s # <<<<<<<<<<<<<< @@ -24453,7 +24479,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_s = (__pyx_v_total_s + __pyx_v_s); - /* "_rnaseq_utils.pyx":749 + /* "_rnaseq_utils.pyx":751 * total_coverage += coverage * total_s += s * total_e += e # <<<<<<<<<<<<<< @@ -24462,7 +24488,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_e = (__pyx_v_total_e + __pyx_v_e); - /* "_rnaseq_utils.pyx":745 + /* "_rnaseq_utils.pyx":747 * if current_object.keep: * if current_object.parent: # Add the old object to object_dict and start a new one * if current_parent.parent: # Ignore the first empty annotation object # <<<<<<<<<<<<<< @@ -24471,7 +24497,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ } - /* "_rnaseq_utils.pyx":751 + /* "_rnaseq_utils.pyx":753 * total_e += e * * current_parent = current_object # <<<<<<<<<<<<<< @@ -24481,19 +24507,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_INCREF(((PyObject *)__pyx_v_current_object)); __Pyx_DECREF_SET(__pyx_v_current_parent, __pyx_v_current_object); - /* "_rnaseq_utils.pyx":752 + /* "_rnaseq_utils.pyx":754 * * current_parent = current_object * children = [] # <<<<<<<<<<<<<< * else: * if current_object.transcript_id and current_object.transcript_id == last_child.transcript_id or len(children) == 0: */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 752, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_children, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":744 + /* "_rnaseq_utils.pyx":746 * current_object = AnnotationObject(line, format, config_dict) * if current_object.keep: * if current_object.parent: # Add the old object to object_dict and start a new one # <<<<<<<<<<<<<< @@ -24503,7 +24529,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L25; } - /* "_rnaseq_utils.pyx":754 + /* "_rnaseq_utils.pyx":756 * children = [] * else: * if current_object.transcript_id and current_object.transcript_id == last_child.transcript_id or len(children) == 0: # <<<<<<<<<<<<<< @@ -24516,7 +24542,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L29_next_or; } else { } - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_current_object->transcript_id, __pyx_v_last_child->transcript_id, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 754, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_current_object->transcript_id, __pyx_v_last_child->transcript_id, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 756, __pyx_L1_error) __pyx_t_10 = (__pyx_t_11 != 0); if (!__pyx_t_10) { } else { @@ -24524,22 +24550,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L28_bool_binop_done; } __pyx_L29_next_or:; - __pyx_t_17 = PyList_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 754, __pyx_L1_error) + __pyx_t_17 = PyList_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_17 == ((Py_ssize_t)-1))) __PYX_ERR(0, 756, __pyx_L1_error) __pyx_t_10 = ((__pyx_t_17 == 0) != 0); __pyx_t_7 = __pyx_t_10; __pyx_L28_bool_binop_done:; if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":755 + /* "_rnaseq_utils.pyx":757 * else: * if current_object.transcript_id and current_object.transcript_id == last_child.transcript_id or len(children) == 0: * children.append(current_object) # <<<<<<<<<<<<<< * else: # New transcript from same parent * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) */ - __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_children, ((PyObject *)__pyx_v_current_object)); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 755, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_children, ((PyObject *)__pyx_v_current_object)); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 757, __pyx_L1_error) - /* "_rnaseq_utils.pyx":754 + /* "_rnaseq_utils.pyx":756 * children = [] * else: * if current_object.transcript_id and current_object.transcript_id == last_child.transcript_id or len(children) == 0: # <<<<<<<<<<<<<< @@ -24549,7 +24575,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L27; } - /* "_rnaseq_utils.pyx":757 + /* "_rnaseq_utils.pyx":759 * children.append(current_object) * else: # New transcript from same parent * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) # <<<<<<<<<<<<<< @@ -24557,7 +24583,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc * total_s += s */ /*else*/ { - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_reference, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_reference, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 759, __pyx_L1_error) __pyx_t_13 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_mapping_object(__pyx_v_self, __pyx_v_current_parent, __pyx_v_children, __pyx_v_name, ((int)__pyx_t_7), __pyx_v_object_dict, 0); __pyx_t_16 = __pyx_t_13.f0; __pyx_t_15 = __pyx_t_13.f1; @@ -24566,7 +24592,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_v_s = __pyx_t_15; __pyx_v_e = __pyx_t_14; - /* "_rnaseq_utils.pyx":758 + /* "_rnaseq_utils.pyx":760 * else: # New transcript from same parent * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) * total_coverage += coverage # <<<<<<<<<<<<<< @@ -24575,7 +24601,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_coverage = (__pyx_v_total_coverage + __pyx_v_coverage); - /* "_rnaseq_utils.pyx":759 + /* "_rnaseq_utils.pyx":761 * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) * total_coverage += coverage * total_s += s # <<<<<<<<<<<<<< @@ -24584,7 +24610,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_s = (__pyx_v_total_s + __pyx_v_s); - /* "_rnaseq_utils.pyx":760 + /* "_rnaseq_utils.pyx":762 * total_coverage += coverage * total_s += s * total_e += e # <<<<<<<<<<<<<< @@ -24593,14 +24619,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_e = (__pyx_v_total_e + __pyx_v_e); - /* "_rnaseq_utils.pyx":761 + /* "_rnaseq_utils.pyx":763 * total_s += s * total_e += e * children = [current_object] # <<<<<<<<<<<<<< * * last_child = current_object */ - __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 761, __pyx_L1_error) + __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 763, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)__pyx_v_current_object)); __Pyx_GIVEREF(((PyObject *)__pyx_v_current_object)); @@ -24610,7 +24636,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __pyx_L27:; - /* "_rnaseq_utils.pyx":763 + /* "_rnaseq_utils.pyx":765 * children = [current_object] * * last_child = current_object # <<<<<<<<<<<<<< @@ -24622,7 +24648,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __pyx_L25:; - /* "_rnaseq_utils.pyx":743 + /* "_rnaseq_utils.pyx":745 * if line[0] == '#':continue * current_object = AnnotationObject(line, format, config_dict) * if current_object.keep: # <<<<<<<<<<<<<< @@ -24631,7 +24657,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ } - /* "_rnaseq_utils.pyx":740 + /* "_rnaseq_utils.pyx":742 * last_child = current_object * children = [] * for line in file: # <<<<<<<<<<<<<< @@ -24642,14 +24668,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":765 + /* "_rnaseq_utils.pyx":767 * last_child = current_object * * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) # <<<<<<<<<<<<<< * total_coverage += coverage * total_s += s */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_reference, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 765, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_name, __pyx_n_u_reference, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 767, __pyx_L1_error) __pyx_t_13 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_mapping_object(__pyx_v_self, __pyx_v_current_parent, __pyx_v_children, __pyx_v_name, ((int)__pyx_t_7), __pyx_v_object_dict, 0); __pyx_t_14 = __pyx_t_13.f0; __pyx_t_15 = __pyx_t_13.f1; @@ -24658,7 +24684,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_v_s = __pyx_t_15; __pyx_v_e = __pyx_t_16; - /* "_rnaseq_utils.pyx":766 + /* "_rnaseq_utils.pyx":768 * * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) * total_coverage += coverage # <<<<<<<<<<<<<< @@ -24667,7 +24693,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_coverage = (__pyx_v_total_coverage + __pyx_v_coverage); - /* "_rnaseq_utils.pyx":767 + /* "_rnaseq_utils.pyx":769 * coverage, s, e = self.add_mapping_object(current_parent, children, name, int(name=='reference'), object_dict) * total_coverage += coverage * total_s += s # <<<<<<<<<<<<<< @@ -24676,7 +24702,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_s = (__pyx_v_total_s + __pyx_v_s); - /* "_rnaseq_utils.pyx":768 + /* "_rnaseq_utils.pyx":770 * total_coverage += coverage * total_s += s * total_e += e # <<<<<<<<<<<<<< @@ -24685,7 +24711,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_e = (__pyx_v_total_e + __pyx_v_e); - /* "_rnaseq_utils.pyx":735 + /* "_rnaseq_utils.pyx":737 * * file = open(filename,'r') * if format in ['GFF','GTF']: # Parse a GFF/GTF file # <<<<<<<<<<<<<< @@ -24695,19 +24721,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L18; } - /* "_rnaseq_utils.pyx":769 + /* "_rnaseq_utils.pyx":771 * total_s += s * total_e += e * elif format == 'BED': # <<<<<<<<<<<<<< * for line in file: * if line[0] == '#':continue */ - if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 769, __pyx_L1_error) } - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_BED, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 769, __pyx_L1_error) + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 771, __pyx_L1_error) } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_BED, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 771, __pyx_L1_error) __pyx_t_10 = (__pyx_t_7 != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":770 + /* "_rnaseq_utils.pyx":772 * total_e += e * elif format == 'BED': * for line in file: # <<<<<<<<<<<<<< @@ -24718,26 +24744,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_1 = __pyx_v_file; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 772, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 772, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 772, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -24747,7 +24773,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 770, __pyx_L1_error) + else __PYX_ERR(0, 772, __pyx_L1_error) } break; } @@ -24756,35 +24782,35 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":771 + /* "_rnaseq_utils.pyx":773 * elif format == 'BED': * for line in file: * if line[0] == '#':continue # <<<<<<<<<<<<<< * item = self.parse_bed_line(line, name) * item.attributes['source'] = name */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 773, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__26, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 771, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__26, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 773, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_10) { goto __pyx_L31_continue; } - /* "_rnaseq_utils.pyx":772 + /* "_rnaseq_utils.pyx":774 * for line in file: * if line[0] == '#':continue * item = self.parse_bed_line(line, name) # <<<<<<<<<<<<<< * item.attributes['source'] = name * total_coverage += item.weight */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_line))||((__pyx_v_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_line)->tp_name), 0))) __PYX_ERR(0, 772, __pyx_L1_error) - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->parse_bed_line(__pyx_v_self, ((PyObject*)__pyx_v_line), __pyx_v_name)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 772, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_line))||((__pyx_v_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_line)->tp_name), 0))) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->parse_bed_line(__pyx_v_self, ((PyObject*)__pyx_v_line), __pyx_v_name)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 774, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XDECREF_SET(__pyx_v_item, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":773 + /* "_rnaseq_utils.pyx":775 * if line[0] == '#':continue * item = self.parse_bed_line(line, name) * item.attributes['source'] = name # <<<<<<<<<<<<<< @@ -24793,11 +24819,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 773, __pyx_L1_error) + __PYX_ERR(0, 775, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_source, __pyx_v_name) < 0)) __PYX_ERR(0, 773, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_source, __pyx_v_name) < 0)) __PYX_ERR(0, 775, __pyx_L1_error) - /* "_rnaseq_utils.pyx":774 + /* "_rnaseq_utils.pyx":776 * item = self.parse_bed_line(line, name) * item.attributes['source'] = name * total_coverage += item.weight # <<<<<<<<<<<<<< @@ -24806,7 +24832,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_coverage = (__pyx_v_total_coverage + __pyx_v_item->weight); - /* "_rnaseq_utils.pyx":775 + /* "_rnaseq_utils.pyx":777 * item.attributes['source'] = name * total_coverage += item.weight * chrom = self.chrom_array[item.chrom] # <<<<<<<<<<<<<< @@ -24815,46 +24841,46 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ if (unlikely(__pyx_v_self->chrom_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 775, __pyx_L1_error) + __PYX_ERR(0, 777, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->chrom_array, __pyx_v_item->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_self->chrom_array, __pyx_v_item->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 775, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 777, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_chrom, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":776 + /* "_rnaseq_utils.pyx":778 * total_coverage += item.weight * chrom = self.chrom_array[item.chrom] * if chrom not in object_dict.keys(): object_dict[chrom] = [] # <<<<<<<<<<<<<< * object_dict[chrom].append(item) * elif format == 'ELR': */ - __pyx_t_3 = __Pyx_PyDict_Keys(__pyx_v_object_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_Keys(__pyx_v_object_dict); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = (__pyx_t_10 != 0); if (__pyx_t_7) { - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 776, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (unlikely(PyDict_SetItem(__pyx_v_object_dict, __pyx_v_chrom, __pyx_t_3) < 0)) __PYX_ERR(0, 776, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_object_dict, __pyx_v_chrom, __pyx_t_3) < 0)) __PYX_ERR(0, 778, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } - /* "_rnaseq_utils.pyx":777 + /* "_rnaseq_utils.pyx":779 * chrom = self.chrom_array[item.chrom] * if chrom not in object_dict.keys(): object_dict[chrom] = [] * object_dict[chrom].append(item) # <<<<<<<<<<<<<< * elif format == 'ELR': * counter = 0 */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 777, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_3, ((PyObject *)__pyx_v_item)); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 777, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_3, ((PyObject *)__pyx_v_item)); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 779, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":770 + /* "_rnaseq_utils.pyx":772 * total_e += e * elif format == 'BED': * for line in file: # <<<<<<<<<<<<<< @@ -24865,7 +24891,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":769 + /* "_rnaseq_utils.pyx":771 * total_s += s * total_e += e * elif format == 'BED': # <<<<<<<<<<<<<< @@ -24875,19 +24901,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc goto __pyx_L18; } - /* "_rnaseq_utils.pyx":778 + /* "_rnaseq_utils.pyx":780 * if chrom not in object_dict.keys(): object_dict[chrom] = [] * object_dict[chrom].append(item) * elif format == 'ELR': # <<<<<<<<<<<<<< * counter = 0 * for line in file: */ - if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 778, __pyx_L1_error) } - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_ELR, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 778, __pyx_L1_error) + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 780, __pyx_L1_error) } + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_format, __pyx_n_u_ELR, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 780, __pyx_L1_error) __pyx_t_10 = (__pyx_t_7 != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":779 + /* "_rnaseq_utils.pyx":781 * object_dict[chrom].append(item) * elif format == 'ELR': * counter = 0 # <<<<<<<<<<<<<< @@ -24896,7 +24922,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_counter = 0; - /* "_rnaseq_utils.pyx":780 + /* "_rnaseq_utils.pyx":782 * elif format == 'ELR': * counter = 0 * for line in file: # <<<<<<<<<<<<<< @@ -24907,26 +24933,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_1 = __pyx_v_file; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_file); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 782, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_12)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 782, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 782, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 780, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -24936,7 +24962,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 780, __pyx_L1_error) + else __PYX_ERR(0, 782, __pyx_L1_error) } break; } @@ -24945,39 +24971,39 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":781 + /* "_rnaseq_utils.pyx":783 * counter = 0 * for line in file: * if line[0] == '#':continue # <<<<<<<<<<<<<< * item = self.parse_elr_line(line, name, counter) * item.attributes['source'] = name */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__26, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__26, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 783, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_10) { goto __pyx_L35_continue; } - /* "_rnaseq_utils.pyx":782 + /* "_rnaseq_utils.pyx":784 * for line in file: * if line[0] == '#':continue * item = self.parse_elr_line(line, name, counter) # <<<<<<<<<<<<<< * item.attributes['source'] = name * total_coverage += item.weight */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_line))||((__pyx_v_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_line)->tp_name), 0))) __PYX_ERR(0, 782, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 782, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_line))||((__pyx_v_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_line)->tp_name), 0))) __PYX_ERR(0, 784, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_counter); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 782, __pyx_L1_error) - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->parse_elr_line(__pyx_v_self, ((PyObject*)__pyx_v_line), __pyx_v_name, ((PyObject*)__pyx_t_3))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 784, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->parse_elr_line(__pyx_v_self, ((PyObject*)__pyx_v_line), __pyx_v_name, ((PyObject*)__pyx_t_3))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 784, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_item, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":783 + /* "_rnaseq_utils.pyx":785 * if line[0] == '#':continue * item = self.parse_elr_line(line, name, counter) * item.attributes['source'] = name # <<<<<<<<<<<<<< @@ -24986,11 +25012,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 783, __pyx_L1_error) + __PYX_ERR(0, 785, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_source, __pyx_v_name) < 0)) __PYX_ERR(0, 783, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_source, __pyx_v_name) < 0)) __PYX_ERR(0, 785, __pyx_L1_error) - /* "_rnaseq_utils.pyx":784 + /* "_rnaseq_utils.pyx":786 * item = self.parse_elr_line(line, name, counter) * item.attributes['source'] = name * total_coverage += item.weight # <<<<<<<<<<<<<< @@ -24999,7 +25025,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_coverage = (__pyx_v_total_coverage + __pyx_v_item->weight); - /* "_rnaseq_utils.pyx":785 + /* "_rnaseq_utils.pyx":787 * item.attributes['source'] = name * total_coverage += item.weight * chrom = self.chrom_array[item.chrom] # <<<<<<<<<<<<<< @@ -25008,46 +25034,46 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ if (unlikely(__pyx_v_self->chrom_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 785, __pyx_L1_error) + __PYX_ERR(0, 787, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->chrom_array, __pyx_v_item->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 785, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->chrom_array, __pyx_v_item->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 785, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 787, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_chrom, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":786 + /* "_rnaseq_utils.pyx":788 * total_coverage += item.weight * chrom = self.chrom_array[item.chrom] * if chrom not in object_dict.keys(): object_dict[chrom] = [] # <<<<<<<<<<<<<< * object_dict[chrom].append(item) * counter += 1 */ - __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_object_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_object_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 786, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_7 = (__pyx_t_10 != 0); if (__pyx_t_7) { - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 786, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(PyDict_SetItem(__pyx_v_object_dict, __pyx_v_chrom, __pyx_t_2) < 0)) __PYX_ERR(0, 786, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_object_dict, __pyx_v_chrom, __pyx_t_2) < 0)) __PYX_ERR(0, 788, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "_rnaseq_utils.pyx":787 + /* "_rnaseq_utils.pyx":789 * chrom = self.chrom_array[item.chrom] * if chrom not in object_dict.keys(): object_dict[chrom] = [] * object_dict[chrom].append(item) # <<<<<<<<<<<<<< * counter += 1 * */ - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_2, ((PyObject *)__pyx_v_item)); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyObject_Append(__pyx_t_2, ((PyObject *)__pyx_v_item)); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 789, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":788 + /* "_rnaseq_utils.pyx":790 * if chrom not in object_dict.keys(): object_dict[chrom] = [] * object_dict[chrom].append(item) * counter += 1 # <<<<<<<<<<<<<< @@ -25056,7 +25082,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_counter = (__pyx_v_counter + 1); - /* "_rnaseq_utils.pyx":780 + /* "_rnaseq_utils.pyx":782 * elif format == 'ELR': * counter = 0 * for line in file: # <<<<<<<<<<<<<< @@ -25067,7 +25093,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":778 + /* "_rnaseq_utils.pyx":780 * if chrom not in object_dict.keys(): object_dict[chrom] = [] * object_dict[chrom].append(item) * elif format == 'ELR': # <<<<<<<<<<<<<< @@ -25077,14 +25103,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __pyx_L18:; - /* "_rnaseq_utils.pyx":790 + /* "_rnaseq_utils.pyx":792 * counter += 1 * * file.close() # <<<<<<<<<<<<<< * if total_s == 0: * total_s = total_coverage */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 790, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_file, __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -25098,12 +25124,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 790, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":791 + /* "_rnaseq_utils.pyx":793 * * file.close() * if total_s == 0: # <<<<<<<<<<<<<< @@ -25113,7 +25139,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_7 = ((__pyx_v_total_s == 0.0) != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":792 + /* "_rnaseq_utils.pyx":794 * file.close() * if total_s == 0: * total_s = total_coverage # <<<<<<<<<<<<<< @@ -25122,7 +25148,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_s = __pyx_v_total_coverage; - /* "_rnaseq_utils.pyx":791 + /* "_rnaseq_utils.pyx":793 * * file.close() * if total_s == 0: # <<<<<<<<<<<<<< @@ -25131,7 +25157,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ } - /* "_rnaseq_utils.pyx":794 + /* "_rnaseq_utils.pyx":796 * total_s = total_coverage * * if total_e == 0: # <<<<<<<<<<<<<< @@ -25141,7 +25167,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_7 = ((__pyx_v_total_e == 0.0) != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":795 + /* "_rnaseq_utils.pyx":797 * * if total_e == 0: * total_e = total_coverage # <<<<<<<<<<<<<< @@ -25150,7 +25176,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ __pyx_v_total_e = __pyx_v_total_coverage; - /* "_rnaseq_utils.pyx":794 + /* "_rnaseq_utils.pyx":796 * total_s = total_coverage * * if total_e == 0: # <<<<<<<<<<<<<< @@ -25159,7 +25185,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ } - /* "_rnaseq_utils.pyx":797 + /* "_rnaseq_utils.pyx":799 * total_e = total_coverage * * for chrom in object_dict.keys(): # <<<<<<<<<<<<<< @@ -25167,7 +25193,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc * for item in object_dict[chrom]: */ __pyx_t_8 = 0; - __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_object_dict, 1, __pyx_n_s_keys, (&__pyx_t_17), (&__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error) + __pyx_t_2 = __Pyx_dict_iterator(__pyx_v_object_dict, 1, __pyx_n_s_keys, (&__pyx_t_17), (&__pyx_t_5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = __pyx_t_2; @@ -25175,22 +25201,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc while (1) { __pyx_t_19 = __Pyx_dict_iter_next(__pyx_t_1, __pyx_t_17, &__pyx_t_8, &__pyx_t_2, NULL, NULL, __pyx_t_5); if (unlikely(__pyx_t_19 == 0)) break; - if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 797, __pyx_L1_error) + if (unlikely(__pyx_t_19 == -1)) __PYX_ERR(0, 799, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 797, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 799, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_chrom, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":798 + /* "_rnaseq_utils.pyx":800 * * for chrom in object_dict.keys(): * object_dict[chrom].sort() # <<<<<<<<<<<<<< * for item in object_dict[chrom]: * item.attributes['TPM'] = round(item.weight/total_coverage*1000000,2) if total_coverage>0 else 0 */ - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sort); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sort); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -25205,27 +25231,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 798, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 800, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":799 + /* "_rnaseq_utils.pyx":801 * for chrom in object_dict.keys(): * object_dict[chrom].sort() * for item in object_dict[chrom]: # <<<<<<<<<<<<<< * item.attributes['TPM'] = round(item.weight/total_coverage*1000000,2) if total_coverage>0 else 0 * if format in ['ELR','BED']: */ - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_20 = 0; __pyx_t_12 = NULL; } else { - __pyx_t_20 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_20 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 801, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -25233,17 +25259,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_20 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_20); __Pyx_INCREF(__pyx_t_2); __pyx_t_20++; if (unlikely(0 < 0)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_20); __Pyx_INCREF(__pyx_t_2); __pyx_t_20++; if (unlikely(0 < 0)) __PYX_ERR(0, 801, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_20 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_20); __Pyx_INCREF(__pyx_t_2); __pyx_t_20++; if (unlikely(0 < 0)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_20); __Pyx_INCREF(__pyx_t_2); __pyx_t_20++; if (unlikely(0 < 0)) __PYX_ERR(0, 801, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_20); __pyx_t_20++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -25253,17 +25279,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 799, __pyx_L1_error) + else __PYX_ERR(0, 801, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_2); } - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 799, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 801, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_item, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":800 + /* "_rnaseq_utils.pyx":802 * object_dict[chrom].sort() * for item in object_dict[chrom]: * item.attributes['TPM'] = round(item.weight/total_coverage*1000000,2) if total_coverage>0 else 0 # <<<<<<<<<<<<<< @@ -25273,11 +25299,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc if (((__pyx_v_total_coverage > 0.0) != 0)) { if (unlikely(__pyx_v_total_coverage == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 800, __pyx_L1_error) + __PYX_ERR(0, 802, __pyx_L1_error) } - __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_item->weight / __pyx_v_total_coverage) * 1000000.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(((__pyx_v_item->weight / __pyx_v_total_coverage) * 1000000.0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -25285,7 +25311,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __Pyx_GIVEREF(__pyx_int_2); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_int_2); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_3; @@ -25296,29 +25322,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 800, __pyx_L1_error) + __PYX_ERR(0, 802, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_TPM, __pyx_t_2) < 0)) __PYX_ERR(0, 800, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_TPM, __pyx_t_2) < 0)) __PYX_ERR(0, 802, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":801 + /* "_rnaseq_utils.pyx":803 * for item in object_dict[chrom]: * item.attributes['TPM'] = round(item.weight/total_coverage*1000000,2) if total_coverage>0 else 0 * if format in ['ELR','BED']: # <<<<<<<<<<<<<< * item.attributes['S.reads'] = item.attributes['TPM'] if item.s_tag else 0 * item.attributes['S.capped'] = item.attributes['TPM'] if item.capped else 0 */ - if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 801, __pyx_L1_error) } + if (unlikely(!__pyx_v_format)) { __Pyx_RaiseUnboundLocalError("format"); __PYX_ERR(0, 803, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_format); __pyx_t_9 = __pyx_v_format; - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_ELR, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_ELR, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 803, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (!__pyx_t_11) { } else { __pyx_t_7 = __pyx_t_11; goto __pyx_L46_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_BED, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_n_u_BED, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 803, __pyx_L1_error) __pyx_t_10 = (__pyx_t_11 != 0); __pyx_t_7 = __pyx_t_10; __pyx_L46_bool_binop_done:; @@ -25326,7 +25352,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_t_10 = (__pyx_t_7 != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":802 + /* "_rnaseq_utils.pyx":804 * item.attributes['TPM'] = round(item.weight/total_coverage*1000000,2) if total_coverage>0 else 0 * if format in ['ELR','BED']: * item.attributes['S.reads'] = item.attributes['TPM'] if item.s_tag else 0 # <<<<<<<<<<<<<< @@ -25336,9 +25362,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc if ((__pyx_v_item->s_tag != 0)) { if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 802, __pyx_L1_error) + __PYX_ERR(0, 804, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_item->attributes, __pyx_n_u_TPM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 802, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_item->attributes, __pyx_n_u_TPM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; @@ -25348,12 +25374,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 802, __pyx_L1_error) + __PYX_ERR(0, 804, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_kp_u_S_reads, __pyx_t_2) < 0)) __PYX_ERR(0, 802, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_kp_u_S_reads, __pyx_t_2) < 0)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":803 + /* "_rnaseq_utils.pyx":805 * if format in ['ELR','BED']: * item.attributes['S.reads'] = item.attributes['TPM'] if item.s_tag else 0 * item.attributes['S.capped'] = item.attributes['TPM'] if item.capped else 0 # <<<<<<<<<<<<<< @@ -25363,9 +25389,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc if ((__pyx_v_item->capped != 0)) { if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 803, __pyx_L1_error) + __PYX_ERR(0, 805, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_item->attributes, __pyx_n_u_TPM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 803, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_item->attributes, __pyx_n_u_TPM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; @@ -25375,12 +25401,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 803, __pyx_L1_error) + __PYX_ERR(0, 805, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_kp_u_S_capped, __pyx_t_2) < 0)) __PYX_ERR(0, 803, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_kp_u_S_capped, __pyx_t_2) < 0)) __PYX_ERR(0, 805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":804 + /* "_rnaseq_utils.pyx":806 * item.attributes['S.reads'] = item.attributes['TPM'] if item.s_tag else 0 * item.attributes['S.capped'] = item.attributes['TPM'] if item.capped else 0 * item.attributes['E.reads'] = item.attributes['TPM'] if item.e_tag else 0 # <<<<<<<<<<<<<< @@ -25390,9 +25416,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc if ((__pyx_v_item->e_tag != 0)) { if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 804, __pyx_L1_error) + __PYX_ERR(0, 806, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_item->attributes, __pyx_n_u_TPM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 804, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_item->attributes, __pyx_n_u_TPM); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 806, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; @@ -25402,12 +25428,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 804, __pyx_L1_error) + __PYX_ERR(0, 806, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_kp_u_E_reads, __pyx_t_2) < 0)) __PYX_ERR(0, 804, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_kp_u_E_reads, __pyx_t_2) < 0)) __PYX_ERR(0, 806, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":801 + /* "_rnaseq_utils.pyx":803 * for item in object_dict[chrom]: * item.attributes['TPM'] = round(item.weight/total_coverage*1000000,2) if total_coverage>0 else 0 * if format in ['ELR','BED']: # <<<<<<<<<<<<<< @@ -25416,7 +25442,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc */ } - /* "_rnaseq_utils.pyx":799 + /* "_rnaseq_utils.pyx":801 * for chrom in object_dict.keys(): * object_dict[chrom].sort() * for item in object_dict[chrom]: # <<<<<<<<<<<<<< @@ -25428,7 +25454,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":806 + /* "_rnaseq_utils.pyx":808 * item.attributes['E.reads'] = item.attributes['TPM'] if item.e_tag else 0 * * return object_dict # <<<<<<<<<<<<<< @@ -25440,7 +25466,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(struc __pyx_r = __pyx_v_object_dict; goto __pyx_L0; - /* "_rnaseq_utils.pyx":699 + /* "_rnaseq_utils.pyx":701 * return header_list * * cpdef dict import_annotation(self, str filename, str name): # <<<<<<<<<<<<<< @@ -25512,11 +25538,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_21import_annotation(Py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("import_annotation", 1, 2, 2, 1); __PYX_ERR(0, 699, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("import_annotation", 1, 2, 2, 1); __PYX_ERR(0, 701, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "import_annotation") < 0)) __PYX_ERR(0, 699, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "import_annotation") < 0)) __PYX_ERR(0, 701, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -25529,14 +25555,14 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_21import_annotation(Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("import_annotation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 699, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("import_annotation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 701, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqDataset.import_annotation", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 699, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 699, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_filename), (&PyUnicode_Type), 1, "filename", 1))) __PYX_ERR(0, 701, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 701, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqDataset_20import_annotation(((struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self), __pyx_v_filename, __pyx_v_name); /* function exit code */ @@ -25557,7 +25583,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_20import_annotation(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("import_annotation", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(__pyx_v_self, __pyx_v_filename, __pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 699, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_13RNAseqDataset_import_annotation(__pyx_v_self, __pyx_v_filename, __pyx_v_name, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -25574,7 +25600,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_20import_annotation(st return __pyx_r; } -/* "_rnaseq_utils.pyx":808 +/* "_rnaseq_utils.pyx":810 * return object_dict * * cpdef (float, float, float) add_mapping_object(self, AnnotationObject parent, list children, str name, int source, dict object_dict): # <<<<<<<<<<<<<< @@ -25620,10 +25646,10 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_mapping_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_mapping_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_23add_mapping_object)) { - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -25641,7 +25667,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[6] = {__pyx_t_5, ((PyObject *)__pyx_v_parent), __pyx_v_children, __pyx_v_name, __pyx_t_3, __pyx_v_object_dict}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -25650,14 +25676,14 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[6] = {__pyx_t_5, ((PyObject *)__pyx_v_parent), __pyx_v_children, __pyx_v_name, __pyx_t_3, __pyx_v_object_dict}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 5+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(5+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -25677,12 +25703,12 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq __Pyx_GIVEREF(__pyx_v_object_dict); PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_6, __pyx_v_object_dict); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __pyx_convert__from_py___pyx_ctuple_float__and_float__and_float(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_8 = __pyx_convert__from_py___pyx_ctuple_float__and_float__and_float(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_8; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -25701,7 +25727,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq #endif } - /* "_rnaseq_utils.pyx":813 + /* "_rnaseq_utils.pyx":815 * cdef AnnotationObject child * cdef str transcript_id, chrom * if len(children) == 0:return (0., 0., 0.) # <<<<<<<<<<<<<< @@ -25710,9 +25736,9 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_children == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 813, __pyx_L1_error) + __PYX_ERR(0, 815, __pyx_L1_error) } - __pyx_t_9 = PyList_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 813, __pyx_L1_error) + __pyx_t_9 = PyList_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 815, __pyx_L1_error) __pyx_t_10 = ((__pyx_t_9 == 0) != 0); if (__pyx_t_10) { __pyx_t_8.f0 = 0.; @@ -25722,7 +25748,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq goto __pyx_L0; } - /* "_rnaseq_utils.pyx":814 + /* "_rnaseq_utils.pyx":816 * cdef str transcript_id, chrom * if len(children) == 0:return (0., 0., 0.) * transcript_id = children[0].transcript_id # <<<<<<<<<<<<<< @@ -25731,18 +25757,18 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_children == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 814, __pyx_L1_error) + __PYX_ERR(0, 816, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_children, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_children, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_transcript_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_transcript_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 814, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 816, __pyx_L1_error) __pyx_v_transcript_id = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":815 + /* "_rnaseq_utils.pyx":817 * if len(children) == 0:return (0., 0., 0.) * transcript_id = children[0].transcript_id * if not transcript_id: # <<<<<<<<<<<<<< @@ -25753,7 +25779,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq __pyx_t_11 = ((!__pyx_t_10) != 0); if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":816 + /* "_rnaseq_utils.pyx":818 * transcript_id = children[0].transcript_id * if not transcript_id: * return (0., 0., 0.) # <<<<<<<<<<<<<< @@ -25766,7 +25792,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq __pyx_r = __pyx_t_8; goto __pyx_L0; - /* "_rnaseq_utils.pyx":815 + /* "_rnaseq_utils.pyx":817 * if len(children) == 0:return (0., 0., 0.) * transcript_id = children[0].transcript_id * if not transcript_id: # <<<<<<<<<<<<<< @@ -25775,7 +25801,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ } - /* "_rnaseq_utils.pyx":818 + /* "_rnaseq_utils.pyx":820 * return (0., 0., 0.) * * for child in children: # <<<<<<<<<<<<<< @@ -25784,22 +25810,22 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_children == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 818, __pyx_L1_error) + __PYX_ERR(0, 820, __pyx_L1_error) } __pyx_t_2 = __pyx_v_children; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0; for (;;) { if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 820, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_AnnotationObject))))) __PYX_ERR(0, 818, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_AnnotationObject))))) __PYX_ERR(0, 820, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child, ((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":819 + /* "_rnaseq_utils.pyx":821 * * for child in children: * if len(child.gene_id)>0 and child.gene_id != parent.gene_id:return (0., 0., 0.) # <<<<<<<<<<<<<< @@ -25810,9 +25836,9 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 819, __pyx_L1_error) + __PYX_ERR(0, 821, __pyx_L1_error) } - __pyx_t_12 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = ((__pyx_t_12 > 0) != 0); if (__pyx_t_10) { @@ -25820,7 +25846,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq __pyx_t_11 = __pyx_t_10; goto __pyx_L8_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_child->gene_id, __pyx_v_parent->gene_id, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_child->gene_id, __pyx_v_parent->gene_id, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 821, __pyx_L1_error) __pyx_t_13 = (__pyx_t_10 != 0); __pyx_t_11 = __pyx_t_13; __pyx_L8_bool_binop_done:; @@ -25833,14 +25859,14 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq goto __pyx_L0; } - /* "_rnaseq_utils.pyx":820 + /* "_rnaseq_utils.pyx":822 * for child in children: * if len(child.gene_id)>0 and child.gene_id != parent.gene_id:return (0., 0., 0.) * if child.transcript_id != transcript_id:return (0., 0., 0.) # <<<<<<<<<<<<<< * * item = self.anno_to_mapping_object(parent, children, source) */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_child->transcript_id, __pyx_v_transcript_id, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_child->transcript_id, __pyx_v_transcript_id, Py_NE)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 822, __pyx_L1_error) __pyx_t_13 = (__pyx_t_11 != 0); if (__pyx_t_13) { __pyx_t_8.f0 = 0.; @@ -25851,7 +25877,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq goto __pyx_L0; } - /* "_rnaseq_utils.pyx":818 + /* "_rnaseq_utils.pyx":820 * return (0., 0., 0.) * * for child in children: # <<<<<<<<<<<<<< @@ -25861,19 +25887,19 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":822 + /* "_rnaseq_utils.pyx":824 * if child.transcript_id != transcript_id:return (0., 0., 0.) * * item = self.anno_to_mapping_object(parent, children, source) # <<<<<<<<<<<<<< * item.attributes['source'] = name * item.attributes['transcript_id'] = transcript_id */ - __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->anno_to_mapping_object(__pyx_v_self, __pyx_v_parent, __pyx_v_children, __pyx_v_source, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_2 = ((PyObject *)((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->anno_to_mapping_object(__pyx_v_self, __pyx_v_parent, __pyx_v_children, __pyx_v_source, 0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 824, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_item = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":823 + /* "_rnaseq_utils.pyx":825 * * item = self.anno_to_mapping_object(parent, children, source) * item.attributes['source'] = name # <<<<<<<<<<<<<< @@ -25882,11 +25908,11 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 823, __pyx_L1_error) + __PYX_ERR(0, 825, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_source, __pyx_v_name) < 0)) __PYX_ERR(0, 823, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_source, __pyx_v_name) < 0)) __PYX_ERR(0, 825, __pyx_L1_error) - /* "_rnaseq_utils.pyx":824 + /* "_rnaseq_utils.pyx":826 * item = self.anno_to_mapping_object(parent, children, source) * item.attributes['source'] = name * item.attributes['transcript_id'] = transcript_id # <<<<<<<<<<<<<< @@ -25895,11 +25921,11 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 824, __pyx_L1_error) + __PYX_ERR(0, 826, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_transcript_id, __pyx_v_transcript_id) < 0)) __PYX_ERR(0, 824, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_item->attributes, __pyx_n_u_transcript_id, __pyx_v_transcript_id) < 0)) __PYX_ERR(0, 826, __pyx_L1_error) - /* "_rnaseq_utils.pyx":825 + /* "_rnaseq_utils.pyx":827 * item.attributes['source'] = name * item.attributes['transcript_id'] = transcript_id * chrom = self.chrom_array[item.chrom] # <<<<<<<<<<<<<< @@ -25908,15 +25934,15 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_self->chrom_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 825, __pyx_L1_error) + __PYX_ERR(0, 827, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->chrom_array, __pyx_v_item->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->chrom_array, __pyx_v_item->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 825, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 827, __pyx_L1_error) __pyx_v_chrom = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":826 + /* "_rnaseq_utils.pyx":828 * item.attributes['transcript_id'] = transcript_id * chrom = self.chrom_array[item.chrom] * if chrom not in object_dict.keys(): object_dict[chrom] = [] # <<<<<<<<<<<<<< @@ -25925,25 +25951,25 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_object_dict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 826, __pyx_L1_error) + __PYX_ERR(0, 828, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_object_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_object_dict); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_11 = (__pyx_t_13 != 0); if (__pyx_t_11) { - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_object_dict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 826, __pyx_L1_error) + __PYX_ERR(0, 828, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_object_dict, __pyx_v_chrom, __pyx_t_2) < 0)) __PYX_ERR(0, 826, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_object_dict, __pyx_v_chrom, __pyx_t_2) < 0)) __PYX_ERR(0, 828, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } - /* "_rnaseq_utils.pyx":827 + /* "_rnaseq_utils.pyx":829 * chrom = self.chrom_array[item.chrom] * if chrom not in object_dict.keys(): object_dict[chrom] = [] * object_dict[chrom].append(item) # <<<<<<<<<<<<<< @@ -25952,14 +25978,14 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_object_dict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 827, __pyx_L1_error) + __PYX_ERR(0, 829, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_object_dict, __pyx_v_chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_14 = __Pyx_PyObject_Append(__pyx_t_2, ((PyObject *)__pyx_v_item)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Append(__pyx_t_2, ((PyObject *)__pyx_v_item)); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 829, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":828 + /* "_rnaseq_utils.pyx":830 * if chrom not in object_dict.keys(): object_dict[chrom] = [] * object_dict[chrom].append(item) * return (item.weight, float(item.attributes.get('S.reads', 0))+float(item.attributes.get('S.capped', 0)), float(item.attributes.get('E.reads', 0))) # <<<<<<<<<<<<<< @@ -25968,27 +25994,27 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq */ if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 828, __pyx_L1_error) + __PYX_ERR(0, 830, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_item->attributes, __pyx_kp_u_S_reads, __pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_item->attributes, __pyx_kp_u_S_reads, __pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_15 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_15 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_15 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 828, __pyx_L1_error) + __PYX_ERR(0, 830, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_item->attributes, __pyx_kp_u_S_capped, __pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_item->attributes, __pyx_kp_u_S_capped, __pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_16 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_16 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_16 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_item->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 828, __pyx_L1_error) + __PYX_ERR(0, 830, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_item->attributes, __pyx_kp_u_E_reads, __pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItemDefault(__pyx_v_item->attributes, __pyx_kp_u_E_reads, __pyx_int_0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_17 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_17 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_17 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8.f0 = __pyx_v_item->weight; __pyx_t_8.f1 = (__pyx_t_15 + __pyx_t_16); @@ -25996,7 +26022,7 @@ static __pyx_ctuple_float__and_float__and_float __pyx_f_13_rnaseq_utils_13RNAseq __pyx_r = __pyx_t_8; goto __pyx_L0; - /* "_rnaseq_utils.pyx":808 + /* "_rnaseq_utils.pyx":810 * return object_dict * * cpdef (float, float, float) add_mapping_object(self, AnnotationObject parent, list children, str name, int source, dict object_dict): # <<<<<<<<<<<<<< @@ -26067,29 +26093,29 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_23add_mapping_object(P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_children)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, 1); __PYX_ERR(0, 808, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, 1); __PYX_ERR(0, 810, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, 2); __PYX_ERR(0, 808, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, 2); __PYX_ERR(0, 810, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, 3); __PYX_ERR(0, 808, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, 3); __PYX_ERR(0, 810, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_object_dict)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, 4); __PYX_ERR(0, 808, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, 4); __PYX_ERR(0, 810, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_mapping_object") < 0)) __PYX_ERR(0, 808, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add_mapping_object") < 0)) __PYX_ERR(0, 810, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -26103,21 +26129,21 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_23add_mapping_object(P __pyx_v_parent = ((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)values[0]); __pyx_v_children = ((PyObject*)values[1]); __pyx_v_name = ((PyObject*)values[2]); - __pyx_v_source = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 808, __pyx_L3_error) + __pyx_v_source = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 810, __pyx_L3_error) __pyx_v_object_dict = ((PyObject*)values[4]); } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 808, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("add_mapping_object", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 810, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqDataset.add_mapping_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_13_rnaseq_utils_AnnotationObject, 1, "parent", 0))) __PYX_ERR(0, 808, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_children), (&PyList_Type), 1, "children", 1))) __PYX_ERR(0, 808, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 808, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_object_dict), (&PyDict_Type), 1, "object_dict", 1))) __PYX_ERR(0, 808, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_13_rnaseq_utils_AnnotationObject, 1, "parent", 0))) __PYX_ERR(0, 810, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_children), (&PyList_Type), 1, "children", 1))) __PYX_ERR(0, 810, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 810, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_object_dict), (&PyDict_Type), 1, "object_dict", 1))) __PYX_ERR(0, 810, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqDataset_22add_mapping_object(((struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self), __pyx_v_parent, __pyx_v_children, __pyx_v_name, __pyx_v_source, __pyx_v_object_dict); /* function exit code */ @@ -26138,7 +26164,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_22add_mapping_object(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("add_mapping_object", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_float__and_float__and_float(__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_mapping_object(__pyx_v_self, __pyx_v_parent, __pyx_v_children, __pyx_v_name, __pyx_v_source, __pyx_v_object_dict, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 808, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_float__and_float__and_float(__pyx_f_13_rnaseq_utils_13RNAseqDataset_add_mapping_object(__pyx_v_self, __pyx_v_parent, __pyx_v_children, __pyx_v_name, __pyx_v_source, __pyx_v_object_dict, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -26155,7 +26181,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_22add_mapping_object(s return __pyx_r; } -/* "_rnaseq_utils.pyx":830 +/* "_rnaseq_utils.pyx":832 * return (item.weight, float(item.attributes.get('S.reads', 0))+float(item.attributes.get('S.capped', 0)), float(item.attributes.get('E.reads', 0))) * * cpdef RNAseqMapping anno_to_mapping_object(self, AnnotationObject parent, list children, int source): # <<<<<<<<<<<<<< @@ -26201,11 +26227,11 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_anno_to_mapping_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_anno_to_mapping_object); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_13RNAseqDataset_25anno_to_mapping_object)) { __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; @@ -26223,7 +26249,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_parent), __pyx_v_children, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -26232,14 +26258,14 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_parent), __pyx_v_children, __pyx_t_3}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -26253,12 +26279,12 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 830, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 832, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -26277,14 +26303,14 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 #endif } - /* "_rnaseq_utils.pyx":838 + /* "_rnaseq_utils.pyx":840 * cdef int chrom, strand * * children = self.merge_children(children) # <<<<<<<<<<<<<< * strand = parent.strand * if parent.chrom not in self.chrom_dict.keys(): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_merge_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_merge_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -26298,14 +26324,14 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v_children) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_children); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 838, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 840, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_children, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":839 + /* "_rnaseq_utils.pyx":841 * * children = self.merge_children(children) * strand = parent.strand # <<<<<<<<<<<<<< @@ -26315,7 +26341,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __pyx_t_6 = __pyx_v_parent->strand; __pyx_v_strand = __pyx_t_6; - /* "_rnaseq_utils.pyx":840 + /* "_rnaseq_utils.pyx":842 * children = self.merge_children(children) * strand = parent.strand * if parent.chrom not in self.chrom_dict.keys(): # <<<<<<<<<<<<<< @@ -26324,16 +26350,16 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_self->chrom_dict == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 840, __pyx_L1_error) + __PYX_ERR(0, 842, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_self->chrom_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_self->chrom_dict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_parent->chrom, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_parent->chrom, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 842, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_9 = (__pyx_t_8 != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":841 + /* "_rnaseq_utils.pyx":843 * strand = parent.strand * if parent.chrom not in self.chrom_dict.keys(): * self.add_chrom(parent.chrom) # <<<<<<<<<<<<<< @@ -26342,12 +26368,12 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ __pyx_t_1 = __pyx_v_parent->chrom; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":840 + /* "_rnaseq_utils.pyx":842 * children = self.merge_children(children) * strand = parent.strand * if parent.chrom not in self.chrom_dict.keys(): # <<<<<<<<<<<<<< @@ -26356,7 +26382,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ } - /* "_rnaseq_utils.pyx":843 + /* "_rnaseq_utils.pyx":845 * self.add_chrom(parent.chrom) * * chrom = self.chrom_dict[parent.chrom] # <<<<<<<<<<<<<< @@ -26365,27 +26391,27 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_self->chrom_dict == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 843, __pyx_L1_error) + __PYX_ERR(0, 845, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_dict, __pyx_v_parent->chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_dict, __pyx_v_parent->chrom); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 843, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_chrom = __pyx_t_6; - /* "_rnaseq_utils.pyx":844 + /* "_rnaseq_utils.pyx":846 * * chrom = self.chrom_dict[parent.chrom] * ranges = [] # <<<<<<<<<<<<<< * children.sort() * splice = [True]*(len(children)-1) */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 844, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_ranges = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":845 + /* "_rnaseq_utils.pyx":847 * chrom = self.chrom_dict[parent.chrom] * ranges = [] * children.sort() # <<<<<<<<<<<<<< @@ -26394,11 +26420,11 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_children == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sort"); - __PYX_ERR(0, 845, __pyx_L1_error) + __PYX_ERR(0, 847, __pyx_L1_error) } - __pyx_t_10 = PyList_Sort(__pyx_v_children); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 845, __pyx_L1_error) + __pyx_t_10 = PyList_Sort(__pyx_v_children); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 847, __pyx_L1_error) - /* "_rnaseq_utils.pyx":846 + /* "_rnaseq_utils.pyx":848 * ranges = [] * children.sort() * splice = [True]*(len(children)-1) # <<<<<<<<<<<<<< @@ -26407,10 +26433,10 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_children == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 846, __pyx_L1_error) + __PYX_ERR(0, 848, __pyx_L1_error) } - __pyx_t_11 = PyList_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 846, __pyx_L1_error) - __pyx_t_2 = PyList_New(1 * (((__pyx_t_11 - 1)<0) ? 0:(__pyx_t_11 - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_11 = PyList_GET_SIZE(__pyx_v_children); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_2 = PyList_New(1 * (((__pyx_t_11 - 1)<0) ? 0:(__pyx_t_11 - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (__pyx_t_11 - 1); __pyx_temp++) { @@ -26422,7 +26448,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __pyx_v_splice = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":847 + /* "_rnaseq_utils.pyx":849 * children.sort() * splice = [True]*(len(children)-1) * for child in children: # <<<<<<<<<<<<<< @@ -26431,42 +26457,42 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_children == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 847, __pyx_L1_error) + __PYX_ERR(0, 849, __pyx_L1_error) } __pyx_t_2 = __pyx_v_children; __Pyx_INCREF(__pyx_t_2); __pyx_t_11 = 0; for (;;) { if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_11); __Pyx_INCREF(__pyx_t_1); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 849, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_AnnotationObject))))) __PYX_ERR(0, 847, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_AnnotationObject))))) __PYX_ERR(0, 849, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child, ((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":848 + /* "_rnaseq_utils.pyx":850 * splice = [True]*(len(children)-1) * for child in children: * ranges += [child.span] # <<<<<<<<<<<<<< * * input_data = ELdata(chrom, source, strand, ranges, splice, True, True, False, 1, False) */ - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_child->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_child->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_ranges, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_ranges, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_ranges, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":847 + /* "_rnaseq_utils.pyx":849 * children.sort() * splice = [True]*(len(children)-1) * for child in children: # <<<<<<<<<<<<<< @@ -26476,20 +26502,20 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":850 + /* "_rnaseq_utils.pyx":852 * ranges += [child.span] * * input_data = ELdata(chrom, source, strand, ranges, splice, True, True, False, 1, False) # <<<<<<<<<<<<<< * mapping_object = RNAseqMapping(input_data, copy.copy(parent.attributes)) * mapping_object.attributes['transcript_id'] = child.transcript_id */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ELdata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ELdata); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_chrom); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_chrom); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -26506,7 +26532,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[11] = {__pyx_t_5, __pyx_t_4, __pyx_t_7, __pyx_t_3, __pyx_v_ranges, __pyx_v_splice, Py_True, Py_True, Py_False, __pyx_int_1, Py_False}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 10+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 10+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -26517,7 +26543,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) { PyObject *__pyx_temp[11] = {__pyx_t_5, __pyx_t_4, __pyx_t_7, __pyx_t_3, __pyx_v_ranges, __pyx_v_splice, Py_True, Py_True, Py_False, __pyx_int_1, Py_False}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 10+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_6, 10+__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -26526,7 +26552,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } else #endif { - __pyx_t_12 = PyTuple_New(10+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(10+__pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -26561,7 +26587,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __pyx_t_4 = 0; __pyx_t_7 = 0; __pyx_t_3 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } @@ -26569,16 +26595,16 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __pyx_v_input_data = __pyx_t_2; __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":851 + /* "_rnaseq_utils.pyx":853 * * input_data = ELdata(chrom, source, strand, ranges, splice, True, True, False, 1, False) * mapping_object = RNAseqMapping(input_data, copy.copy(parent.attributes)) # <<<<<<<<<<<<<< * mapping_object.attributes['transcript_id'] = child.transcript_id * if 'cov' in mapping_object.attributes.keys(): */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 851, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_copy); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -26593,10 +26619,10 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_12, __pyx_t_1, __pyx_v_parent->attributes) : __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_parent->attributes); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_v_input_data); __Pyx_GIVEREF(__pyx_v_input_data); @@ -26604,30 +26630,30 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 851, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_mapping_object = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":852 + /* "_rnaseq_utils.pyx":854 * input_data = ELdata(chrom, source, strand, ranges, splice, True, True, False, 1, False) * mapping_object = RNAseqMapping(input_data, copy.copy(parent.attributes)) * mapping_object.attributes['transcript_id'] = child.transcript_id # <<<<<<<<<<<<<< * if 'cov' in mapping_object.attributes.keys(): * mapping_object.weight = float(mapping_object.attributes['cov']) */ - if (unlikely(!__pyx_v_child)) { __Pyx_RaiseUnboundLocalError("child"); __PYX_ERR(0, 852, __pyx_L1_error) } + if (unlikely(!__pyx_v_child)) { __Pyx_RaiseUnboundLocalError("child"); __PYX_ERR(0, 854, __pyx_L1_error) } __pyx_t_2 = __pyx_v_child->transcript_id; __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_v_mapping_object->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 852, __pyx_L1_error) + __PYX_ERR(0, 854, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_mapping_object->attributes, __pyx_n_u_transcript_id, __pyx_t_2) < 0)) __PYX_ERR(0, 852, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_mapping_object->attributes, __pyx_n_u_transcript_id, __pyx_t_2) < 0)) __PYX_ERR(0, 854, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":853 + /* "_rnaseq_utils.pyx":855 * mapping_object = RNAseqMapping(input_data, copy.copy(parent.attributes)) * mapping_object.attributes['transcript_id'] = child.transcript_id * if 'cov' in mapping_object.attributes.keys(): # <<<<<<<<<<<<<< @@ -26636,16 +26662,16 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_mapping_object->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 853, __pyx_L1_error) + __PYX_ERR(0, 855, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_mapping_object->attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_Keys(__pyx_v_mapping_object->attributes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_cov, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 853, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_n_u_cov, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_8 = (__pyx_t_9 != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":854 + /* "_rnaseq_utils.pyx":856 * mapping_object.attributes['transcript_id'] = child.transcript_id * if 'cov' in mapping_object.attributes.keys(): * mapping_object.weight = float(mapping_object.attributes['cov']) # <<<<<<<<<<<<<< @@ -26654,15 +26680,15 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_mapping_object->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 854, __pyx_L1_error) + __PYX_ERR(0, 856, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_mapping_object->attributes, __pyx_n_u_cov); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_mapping_object->attributes, __pyx_n_u_cov); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_13 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_AsDouble(__pyx_t_2); if (unlikely(__pyx_t_13 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 856, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_mapping_object->weight = __pyx_t_13; - /* "_rnaseq_utils.pyx":853 + /* "_rnaseq_utils.pyx":855 * mapping_object = RNAseqMapping(input_data, copy.copy(parent.attributes)) * mapping_object.attributes['transcript_id'] = child.transcript_id * if 'cov' in mapping_object.attributes.keys(): # <<<<<<<<<<<<<< @@ -26671,7 +26697,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ } - /* "_rnaseq_utils.pyx":856 + /* "_rnaseq_utils.pyx":858 * mapping_object.weight = float(mapping_object.attributes['cov']) * * return mapping_object # <<<<<<<<<<<<<< @@ -26683,7 +26709,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __pyx_r = __pyx_v_mapping_object; goto __pyx_L0; - /* "_rnaseq_utils.pyx":830 + /* "_rnaseq_utils.pyx":832 * return (item.weight, float(item.attributes.get('S.reads', 0))+float(item.attributes.get('S.capped', 0)), float(item.attributes.get('E.reads', 0))) * * cpdef RNAseqMapping anno_to_mapping_object(self, AnnotationObject parent, list children, int source): # <<<<<<<<<<<<<< @@ -26752,17 +26778,17 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_25anno_to_mapping_obje case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_children)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("anno_to_mapping_object", 1, 3, 3, 1); __PYX_ERR(0, 830, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("anno_to_mapping_object", 1, 3, 3, 1); __PYX_ERR(0, 832, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("anno_to_mapping_object", 1, 3, 3, 2); __PYX_ERR(0, 830, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("anno_to_mapping_object", 1, 3, 3, 2); __PYX_ERR(0, 832, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "anno_to_mapping_object") < 0)) __PYX_ERR(0, 830, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "anno_to_mapping_object") < 0)) __PYX_ERR(0, 832, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -26773,18 +26799,18 @@ static PyObject *__pyx_pw_13_rnaseq_utils_13RNAseqDataset_25anno_to_mapping_obje } __pyx_v_parent = ((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)values[0]); __pyx_v_children = ((PyObject*)values[1]); - __pyx_v_source = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 830, __pyx_L3_error) + __pyx_v_source = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_source == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("anno_to_mapping_object", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 830, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("anno_to_mapping_object", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 832, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.RNAseqDataset.anno_to_mapping_object", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_13_rnaseq_utils_AnnotationObject, 1, "parent", 0))) __PYX_ERR(0, 830, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_children), (&PyList_Type), 1, "children", 1))) __PYX_ERR(0, 830, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_parent), __pyx_ptype_13_rnaseq_utils_AnnotationObject, 1, "parent", 0))) __PYX_ERR(0, 832, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_children), (&PyList_Type), 1, "children", 1))) __PYX_ERR(0, 832, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13RNAseqDataset_24anno_to_mapping_object(((struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self), __pyx_v_parent, __pyx_v_children, __pyx_v_source); /* function exit code */ @@ -26805,7 +26831,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_24anno_to_mapping_obje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("anno_to_mapping_object", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_13RNAseqDataset_anno_to_mapping_object(__pyx_v_self, __pyx_v_parent, __pyx_v_children, __pyx_v_source, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_13RNAseqDataset_anno_to_mapping_object(__pyx_v_self, __pyx_v_parent, __pyx_v_children, __pyx_v_source, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -26822,7 +26848,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_24anno_to_mapping_obje return __pyx_r; } -/* "_rnaseq_utils.pyx":858 +/* "_rnaseq_utils.pyx":860 * return mapping_object * * cdef RNAseqMapping parse_bed_line(self, str line, str source_string): # <<<<<<<<<<<<<< @@ -26849,7 +26875,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __Pyx_RefNannySetupContext("parse_bed_line", 0); __Pyx_INCREF(__pyx_v_source_string); - /* "_rnaseq_utils.pyx":861 + /* "_rnaseq_utils.pyx":863 * cdef RNAseqMapping new_read * cdef list bed_elements * input_data = parse_BED_line(line, self.chrom_dict, self.source_dict, source_string, s_tag=True, e_tag=True, capped=True, gaps_are_junctions=True, keep_readname=True) # <<<<<<<<<<<<<< @@ -26867,73 +26893,73 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __pyx_t_4.capped = Py_True; __pyx_t_4.gaps_are_junctions = Py_True; __pyx_t_4.keep_readname = Py_True; - __pyx_t_3 = __pyx_f_13_rnaseq_utils_parse_BED_line(__pyx_v_line, __pyx_t_1, __pyx_t_2, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 861, __pyx_L1_error) + __pyx_t_3 = __pyx_f_13_rnaseq_utils_parse_BED_line(__pyx_v_line, __pyx_t_1, __pyx_t_2, &__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_input_data = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":862 + /* "_rnaseq_utils.pyx":864 * cdef list bed_elements * input_data = parse_BED_line(line, self.chrom_dict, self.source_dict, source_string, s_tag=True, e_tag=True, capped=True, gaps_are_junctions=True, keep_readname=True) * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict # <<<<<<<<<<<<<< * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_5 = (((PyObject *)Py_TYPE(__pyx_t_3)) == ((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":863 + /* "_rnaseq_utils.pyx":865 * input_data = parse_BED_line(line, self.chrom_dict, self.source_dict, source_string, s_tag=True, e_tag=True, capped=True, gaps_are_junctions=True, keep_readname=True) * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict * chrom_string = input_data.chrom # <<<<<<<<<<<<<< * input_data = input_data._replace(chrom=self.chrom_index) * self.add_chrom(chrom_string) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_chrom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_chrom_string = __pyx_t_3; __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":864 + /* "_rnaseq_utils.pyx":866 * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) # <<<<<<<<<<<<<< * self.add_chrom(chrom_string) * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chrom, __pyx_t_1) < 0) __PYX_ERR(0, 864, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_chrom, __pyx_t_1) < 0) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 864, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_input_data, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":865 + /* "_rnaseq_utils.pyx":867 * chrom_string = input_data.chrom * input_data = input_data._replace(chrom=self.chrom_index) * self.add_chrom(chrom_string) # <<<<<<<<<<<<<< * * if type(input_data.source) is str: # Source wasn't in source_dict */ - __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_v_chrom_string, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_chrom(__pyx_v_self, __pyx_v_chrom_string, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":862 + /* "_rnaseq_utils.pyx":864 * cdef list bed_elements * input_data = parse_BED_line(line, self.chrom_dict, self.source_dict, source_string, s_tag=True, e_tag=True, capped=True, gaps_are_junctions=True, keep_readname=True) * if type(input_data.chrom) is str: # Chromosome wasn't in chrom_dict # <<<<<<<<<<<<<< @@ -26942,67 +26968,67 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ } - /* "_rnaseq_utils.pyx":867 + /* "_rnaseq_utils.pyx":869 * self.add_chrom(chrom_string) * * if type(input_data.source) is str: # Source wasn't in source_dict # <<<<<<<<<<<<<< * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_6 = (((PyObject *)Py_TYPE(__pyx_t_1)) == ((PyObject *)(&PyUnicode_Type))); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":868 + /* "_rnaseq_utils.pyx":870 * * if type(input_data.source) is str: # Source wasn't in source_dict * source_string = input_data.source # <<<<<<<<<<<<<< * input_data = input_data._replace(source=self.source_index) * self.add_source(source_string) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_source); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 868, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 870, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_source_string, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":869 + /* "_rnaseq_utils.pyx":871 * if type(input_data.source) is str: # Source wasn't in source_dict * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) # <<<<<<<<<<<<<< * self.add_source(source_string) * */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_input_data, __pyx_n_s_replace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_t_3) < 0) __PYX_ERR(0, 869, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_source, __pyx_t_3) < 0) __PYX_ERR(0, 871, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 869, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_input_data, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":870 + /* "_rnaseq_utils.pyx":872 * source_string = input_data.source * input_data = input_data._replace(source=self.source_index) * self.add_source(source_string) # <<<<<<<<<<<<<< * * new_read = RNAseqMapping(input_data) */ - __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_source(__pyx_v_self, __pyx_v_source_string, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 870, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self->__pyx_vtab)->add_source(__pyx_v_self, __pyx_v_source_string, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":867 + /* "_rnaseq_utils.pyx":869 * self.add_chrom(chrom_string) * * if type(input_data.source) is str: # Source wasn't in source_dict # <<<<<<<<<<<<<< @@ -27011,28 +27037,28 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ } - /* "_rnaseq_utils.pyx":872 + /* "_rnaseq_utils.pyx":874 * self.add_source(source_string) * * new_read = RNAseqMapping(input_data) # <<<<<<<<<<<<<< * bed_elements = line.rstrip().split('\t') * new_read.attributes['gene_id'] = '.'.join(bed_elements[3].split(self.gene_delim)[:-1]) */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_v_input_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_v_input_data); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_new_read = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":873 + /* "_rnaseq_utils.pyx":875 * * new_read = RNAseqMapping(input_data) * bed_elements = line.rstrip().split('\t') # <<<<<<<<<<<<<< * new_read.attributes['gene_id'] = '.'.join(bed_elements[3].split(self.gene_delim)[:-1]) * new_read.attributes['transcript_id'] = bed_elements[3] */ - __pyx_t_2 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_2 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -27047,14 +27073,14 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } __pyx_t_3 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_2, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_kp_u__13); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 873, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 875, __pyx_L1_error) __pyx_v_bed_elements = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":874 + /* "_rnaseq_utils.pyx":876 * new_read = RNAseqMapping(input_data) * bed_elements = line.rstrip().split('\t') * new_read.attributes['gene_id'] = '.'.join(bed_elements[3].split(self.gene_delim)[:-1]) # <<<<<<<<<<<<<< @@ -27063,11 +27089,11 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_bed_elements == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 874, __pyx_L1_error) + __PYX_ERR(0, 876, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_bed_elements, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_bed_elements, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -27082,23 +27108,23 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_v_self->gene_delim) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self->gene_delim); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, -1L, NULL, NULL, &__pyx_slice__27, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_3, 0, -1L, NULL, NULL, &__pyx_slice__27, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__9, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_t_3 = PyUnicode_Join(__pyx_kp_u__9, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_new_read->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 874, __pyx_L1_error) + __PYX_ERR(0, 876, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_gene_id, __pyx_t_3) < 0)) __PYX_ERR(0, 874, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_gene_id, __pyx_t_3) < 0)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":875 + /* "_rnaseq_utils.pyx":877 * bed_elements = line.rstrip().split('\t') * new_read.attributes['gene_id'] = '.'.join(bed_elements[3].split(self.gene_delim)[:-1]) * new_read.attributes['transcript_id'] = bed_elements[3] # <<<<<<<<<<<<<< @@ -27107,18 +27133,18 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_bed_elements == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 875, __pyx_L1_error) + __PYX_ERR(0, 877, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_bed_elements, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_bed_elements, 3, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_new_read->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 875, __pyx_L1_error) + __PYX_ERR(0, 877, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_transcript_id, __pyx_t_3) < 0)) __PYX_ERR(0, 875, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_transcript_id, __pyx_t_3) < 0)) __PYX_ERR(0, 877, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":876 + /* "_rnaseq_utils.pyx":878 * new_read.attributes['gene_id'] = '.'.join(bed_elements[3].split(self.gene_delim)[:-1]) * new_read.attributes['transcript_id'] = bed_elements[3] * new_read.attributes['S.reads'] = new_read.weight if new_read.s_tag else 0 # <<<<<<<<<<<<<< @@ -27126,7 +27152,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 * new_read.attributes['E.reads'] = new_read.weight if new_read.e_tag else 0 */ if ((__pyx_v_new_read->s_tag != 0)) { - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_new_read->weight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_new_read->weight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; @@ -27136,12 +27162,12 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } if (unlikely(__pyx_v_new_read->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 876, __pyx_L1_error) + __PYX_ERR(0, 878, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_kp_u_S_reads, __pyx_t_3) < 0)) __PYX_ERR(0, 876, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_kp_u_S_reads, __pyx_t_3) < 0)) __PYX_ERR(0, 878, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":877 + /* "_rnaseq_utils.pyx":879 * new_read.attributes['transcript_id'] = bed_elements[3] * new_read.attributes['S.reads'] = new_read.weight if new_read.s_tag else 0 * new_read.attributes['S.capped'] = new_read.weight if new_read.capped else 0 # <<<<<<<<<<<<<< @@ -27149,7 +27175,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 * new_read.attributes['cov'] = new_read.weight */ if ((__pyx_v_new_read->capped != 0)) { - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_new_read->weight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_new_read->weight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 879, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; @@ -27159,12 +27185,12 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } if (unlikely(__pyx_v_new_read->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 877, __pyx_L1_error) + __PYX_ERR(0, 879, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_kp_u_S_capped, __pyx_t_3) < 0)) __PYX_ERR(0, 877, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_kp_u_S_capped, __pyx_t_3) < 0)) __PYX_ERR(0, 879, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":878 + /* "_rnaseq_utils.pyx":880 * new_read.attributes['S.reads'] = new_read.weight if new_read.s_tag else 0 * new_read.attributes['S.capped'] = new_read.weight if new_read.capped else 0 * new_read.attributes['E.reads'] = new_read.weight if new_read.e_tag else 0 # <<<<<<<<<<<<<< @@ -27172,7 +27198,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 * return new_read */ if ((__pyx_v_new_read->e_tag != 0)) { - __pyx_t_2 = PyFloat_FromDouble(__pyx_v_new_read->weight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_2 = PyFloat_FromDouble(__pyx_v_new_read->weight); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __pyx_t_2 = 0; @@ -27182,28 +27208,28 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 } if (unlikely(__pyx_v_new_read->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 878, __pyx_L1_error) + __PYX_ERR(0, 880, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_kp_u_E_reads, __pyx_t_3) < 0)) __PYX_ERR(0, 878, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_kp_u_E_reads, __pyx_t_3) < 0)) __PYX_ERR(0, 880, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":879 + /* "_rnaseq_utils.pyx":881 * new_read.attributes['S.capped'] = new_read.weight if new_read.capped else 0 * new_read.attributes['E.reads'] = new_read.weight if new_read.e_tag else 0 * new_read.attributes['cov'] = new_read.weight # <<<<<<<<<<<<<< * return new_read * */ - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_new_read->weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_new_read->weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_new_read->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 879, __pyx_L1_error) + __PYX_ERR(0, 881, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_cov, __pyx_t_3) < 0)) __PYX_ERR(0, 879, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_cov, __pyx_t_3) < 0)) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":880 + /* "_rnaseq_utils.pyx":882 * new_read.attributes['E.reads'] = new_read.weight if new_read.e_tag else 0 * new_read.attributes['cov'] = new_read.weight * return new_read # <<<<<<<<<<<<<< @@ -27215,7 +27241,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __pyx_r = __pyx_v_new_read; goto __pyx_L0; - /* "_rnaseq_utils.pyx":858 + /* "_rnaseq_utils.pyx":860 * return mapping_object * * cdef RNAseqMapping parse_bed_line(self, str line, str source_string): # <<<<<<<<<<<<<< @@ -27241,7 +27267,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 return __pyx_r; } -/* "_rnaseq_utils.pyx":882 +/* "_rnaseq_utils.pyx":884 * return new_read * * cdef RNAseqMapping parse_elr_line(self, str line, str name, str counter): # <<<<<<<<<<<<<< @@ -27263,19 +27289,19 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_elr_line", 0); - /* "_rnaseq_utils.pyx":884 + /* "_rnaseq_utils.pyx":886 * cdef RNAseqMapping parse_elr_line(self, str line, str name, str counter): * cdef RNAseqMapping new_read * new_read = elr_to_readobject(line) # <<<<<<<<<<<<<< * new_read.attributes['gene_id'] = name * new_read.attributes['transcript_id'] = '{}.{}'.format(name, counter) */ - __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_elr_to_readobject(__pyx_v_line, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_elr_to_readobject(__pyx_v_line, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_new_read = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":885 + /* "_rnaseq_utils.pyx":887 * cdef RNAseqMapping new_read * new_read = elr_to_readobject(line) * new_read.attributes['gene_id'] = name # <<<<<<<<<<<<<< @@ -27284,18 +27310,18 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 */ if (unlikely(__pyx_v_new_read->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 885, __pyx_L1_error) + __PYX_ERR(0, 887, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_gene_id, __pyx_v_name) < 0)) __PYX_ERR(0, 885, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_gene_id, __pyx_v_name) < 0)) __PYX_ERR(0, 887, __pyx_L1_error) - /* "_rnaseq_utils.pyx":886 + /* "_rnaseq_utils.pyx":888 * new_read = elr_to_readobject(line) * new_read.attributes['gene_id'] = name * new_read.attributes['transcript_id'] = '{}.{}'.format(name, counter) # <<<<<<<<<<<<<< * return new_read * */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__28, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__28, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -27312,7 +27338,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_counter}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -27320,13 +27346,13 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_name, __pyx_v_counter}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -27337,19 +27363,19 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __Pyx_INCREF(__pyx_v_counter); __Pyx_GIVEREF(__pyx_v_counter); PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_counter); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_new_read->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 886, __pyx_L1_error) + __PYX_ERR(0, 888, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_transcript_id, __pyx_t_1) < 0)) __PYX_ERR(0, 886, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_new_read->attributes, __pyx_n_u_transcript_id, __pyx_t_1) < 0)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":887 + /* "_rnaseq_utils.pyx":889 * new_read.attributes['gene_id'] = name * new_read.attributes['transcript_id'] = '{}.{}'.format(name, counter) * return new_read # <<<<<<<<<<<<<< @@ -27361,7 +27387,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 __pyx_r = __pyx_v_new_read; goto __pyx_L0; - /* "_rnaseq_utils.pyx":882 + /* "_rnaseq_utils.pyx":884 * return new_read * * cdef RNAseqMapping parse_elr_line(self, str line, str name, str counter): # <<<<<<<<<<<<<< @@ -27384,7 +27410,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_1 return __pyx_r; } -/* "_rnaseq_utils.pyx":482 +/* "_rnaseq_utils.pyx":483 * * cdef class RNAseqDataset(): * cdef public list read_list, chrom_array, source_array, chrom_lengths # <<<<<<<<<<<<<< @@ -27442,7 +27468,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_9read_list_2__set__(struct _ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 482, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 483, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -27542,7 +27568,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_11chrom_array_2__set__(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 482, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 483, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -27642,7 +27668,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_12source_array_2__set__(stru const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 482, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 483, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -27742,7 +27768,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_13chrom_lengths_2__set__(str const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 482, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 483, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -27792,7 +27818,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_13chrom_lengths_4__del__(str return __pyx_r; } -/* "_rnaseq_utils.pyx":483 +/* "_rnaseq_utils.pyx":484 * cdef class RNAseqDataset(): * cdef public list read_list, chrom_array, source_array, chrom_lengths * cdef public int chrom_index, source_index, sj_shift, max_headclip # <<<<<<<<<<<<<< @@ -27822,7 +27848,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_11chrom_index___get__( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->chrom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27860,7 +27886,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_11chrom_index_2__set__(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) __pyx_v_self->chrom_index = __pyx_t_1; /* function exit code */ @@ -27896,7 +27922,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_12source_index___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->source_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27934,7 +27960,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_12source_index_2__set__(stru const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) __pyx_v_self->source_index = __pyx_t_1; /* function exit code */ @@ -27970,7 +27996,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_8sj_shift___get__(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->sj_shift); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->sj_shift); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28008,7 +28034,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_8sj_shift_2__set__(struct __ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) __pyx_v_self->sj_shift = __pyx_t_1; /* function exit code */ @@ -28044,7 +28070,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_12max_headclip___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_headclip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_headclip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28082,7 +28108,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_12max_headclip_2__set__(stru const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 483, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 484, __pyx_L1_error) __pyx_v_self->max_headclip = __pyx_t_1; /* function exit code */ @@ -28096,7 +28122,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_12max_headclip_2__set__(stru return __pyx_r; } -/* "_rnaseq_utils.pyx":484 +/* "_rnaseq_utils.pyx":485 * cdef public list read_list, chrom_array, source_array, chrom_lengths * cdef public int chrom_index, source_index, sj_shift, max_headclip * cdef public dict chrom_dict, source_dict, reference_dict # <<<<<<<<<<<<<< @@ -28154,7 +28180,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_10chrom_dict_2__set__(struct const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 484, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 485, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -28254,7 +28280,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_11source_dict_2__set__(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 484, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 485, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -28354,7 +28380,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_14reference_dict_2__set__(st const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 484, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 485, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -28404,7 +28430,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_14reference_dict_4__del__(st return __pyx_r; } -/* "_rnaseq_utils.pyx":485 +/* "_rnaseq_utils.pyx":486 * cdef public int chrom_index, source_index, sj_shift, max_headclip * cdef public dict chrom_dict, source_dict, reference_dict * cdef readonly dict config, genome, label_tally # <<<<<<<<<<<<<< @@ -28499,7 +28525,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_11label_tally___get__( return __pyx_r; } -/* "_rnaseq_utils.pyx":486 +/* "_rnaseq_utils.pyx":487 * cdef public dict chrom_dict, source_dict, reference_dict * cdef readonly dict config, genome, label_tally * cdef readonly bint s_tag, e_tag, capped, stranded, reverse, ignore_ends, remove_noncanonical, labels_are_trimmed, quality_filter, verbose, secondary, has_genome # <<<<<<<<<<<<<< @@ -28529,7 +28555,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_5s_tag___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28568,7 +28594,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_5e_tag___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28607,7 +28633,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_6capped___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28646,7 +28672,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_8stranded___get__(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stranded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->stranded); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28685,7 +28711,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_7reverse___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->reverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->reverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28724,7 +28750,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_11ignore_ends___get__( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->ignore_ends); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->ignore_ends); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28763,7 +28789,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_19remove_noncanonical_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->remove_noncanonical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->remove_noncanonical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28802,7 +28828,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_18labels_are_trimmed__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->labels_are_trimmed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->labels_are_trimmed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28841,7 +28867,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_14quality_filter___get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->quality_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->quality_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28880,7 +28906,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_7verbose___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->verbose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28919,7 +28945,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_9secondary___get__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->secondary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->secondary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28958,7 +28984,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_10has_genome___get__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_genome); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->has_genome); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 487, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28975,7 +29001,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_10has_genome___get__(s return __pyx_r; } -/* "_rnaseq_utils.pyx":487 +/* "_rnaseq_utils.pyx":488 * cdef readonly dict config, genome, label_tally * cdef readonly bint s_tag, e_tag, capped, stranded, reverse, ignore_ends, remove_noncanonical, labels_are_trimmed, quality_filter, verbose, secondary, has_genome * cdef readonly str start_seq, end_seq, gene_delim # <<<<<<<<<<<<<< @@ -29070,7 +29096,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_10gene_delim___get__(s return __pyx_r; } -/* "_rnaseq_utils.pyx":488 +/* "_rnaseq_utils.pyx":489 * cdef readonly bint s_tag, e_tag, capped, stranded, reverse, ignore_ends, remove_noncanonical, labels_are_trimmed, quality_filter, verbose, secondary, has_genome * cdef readonly str start_seq, end_seq, gene_delim * cdef readonly int minlen, minlen_strict, minlen_loose # <<<<<<<<<<<<<< @@ -29100,7 +29126,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_6minlen___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minlen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29139,7 +29165,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_13minlen_strict___get_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minlen_strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minlen_strict); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29178,7 +29204,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_12minlen_loose___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minlen_loose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->minlen_loose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29195,7 +29221,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_12minlen_loose___get__ return __pyx_r; } -/* "_rnaseq_utils.pyx":489 +/* "_rnaseq_utils.pyx":490 * cdef readonly str start_seq, end_seq, gene_delim * cdef readonly int minlen, minlen_strict, minlen_loose * cdef readonly float mismatch_rate, error_rate # <<<<<<<<<<<<<< @@ -29225,7 +29251,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_13mismatch_rate___get_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->mismatch_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->mismatch_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29264,7 +29290,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_10error_rate___get__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->error_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->error_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29281,7 +29307,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_10error_rate___get__(s return __pyx_r; } -/* "_rnaseq_utils.pyx":490 +/* "_rnaseq_utils.pyx":491 * cdef readonly int minlen, minlen_strict, minlen_loose * cdef readonly float mismatch_rate, error_rate * cdef readonly array.array start_array, end_array # <<<<<<<<<<<<<< @@ -29347,7 +29373,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_9end_array___get__(str return __pyx_r; } -/* "_rnaseq_utils.pyx":491 +/* "_rnaseq_utils.pyx":492 * cdef readonly float mismatch_rate, error_rate * cdef readonly array.array start_array, end_array * cdef public set sj_set # <<<<<<<<<<<<<< @@ -29405,7 +29431,7 @@ static int __pyx_pf_13_rnaseq_utils_13RNAseqDataset_6sj_set_2__set__(struct __py const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 491, __pyx_L1_error) + if (!(likely(PySet_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 492, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -30045,7 +30071,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13RNAseqDataset_28__setstate_cython__( return __pyx_r; } -/* "_rnaseq_utils.pyx":991 +/* "_rnaseq_utils.pyx":993 * cdef public (int, int) span * cdef public tuple fields * def __init__(self, anno_string, format, config_dict): # <<<<<<<<<<<<<< @@ -30094,17 +30120,17 @@ static int __pyx_pw_13_rnaseq_utils_16AnnotationObject_1__init__(PyObject *__pyx case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_format)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 991, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 993, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_config_dict)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 991, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 993, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 991, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 993, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -30119,7 +30145,7 @@ static int __pyx_pw_13_rnaseq_utils_16AnnotationObject_1__init__(PyObject *__pyx } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 991, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 993, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.AnnotationObject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -30155,14 +30181,14 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_RefNannySetupContext("__init__", 0); __Pyx_INCREF(__pyx_v_anno_string); - /* "_rnaseq_utils.pyx":999 + /* "_rnaseq_utils.pyx":1001 * list transcript_id_keys * * anno_string = anno_string.rstrip() # <<<<<<<<<<<<<< * self.format = format * self.keep = False */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_anno_string, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_anno_string, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -30176,20 +30202,20 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1001, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF_SET(__pyx_v_anno_string, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1000 + /* "_rnaseq_utils.pyx":1002 * * anno_string = anno_string.rstrip() * self.format = format # <<<<<<<<<<<<<< * self.keep = False * self.parent = False */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(0, 1000, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_format))||((__pyx_v_format) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_format)->tp_name), 0))) __PYX_ERR(0, 1002, __pyx_L1_error) __pyx_t_1 = __pyx_v_format; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -30198,7 +30224,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __pyx_v_self->format = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1001 + /* "_rnaseq_utils.pyx":1003 * anno_string = anno_string.rstrip() * self.format = format * self.keep = False # <<<<<<<<<<<<<< @@ -30207,7 +30233,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ __pyx_v_self->keep = 0; - /* "_rnaseq_utils.pyx":1002 + /* "_rnaseq_utils.pyx":1004 * self.format = format * self.keep = False * self.parent = False # <<<<<<<<<<<<<< @@ -30216,7 +30242,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ __pyx_v_self->parent = 0; - /* "_rnaseq_utils.pyx":1003 + /* "_rnaseq_utils.pyx":1005 * self.keep = False * self.parent = False * self.gene_id = '' # <<<<<<<<<<<<<< @@ -30229,7 +30255,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->gene_id); __pyx_v_self->gene_id = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":1004 + /* "_rnaseq_utils.pyx":1006 * self.parent = False * self.gene_id = '' * self.transcript_id = '' # <<<<<<<<<<<<<< @@ -30242,7 +30268,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->transcript_id); __pyx_v_self->transcript_id = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":1005 + /* "_rnaseq_utils.pyx":1007 * self.gene_id = '' * self.transcript_id = '' * self.anno_type = '' # <<<<<<<<<<<<<< @@ -30255,7 +30281,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->anno_type); __pyx_v_self->anno_type = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":1006 + /* "_rnaseq_utils.pyx":1008 * self.transcript_id = '' * self.anno_type = '' * self.fields = () # <<<<<<<<<<<<<< @@ -30268,38 +30294,38 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->fields); __pyx_v_self->fields = __pyx_empty_tuple; - /* "_rnaseq_utils.pyx":1007 + /* "_rnaseq_utils.pyx":1009 * self.anno_type = '' * self.fields = () * if len(anno_string) > 0: # <<<<<<<<<<<<<< * if anno_string[0] != '#': * self.fields = tuple(anno_string.split('\t')[0:9]) */ - __pyx_t_4 = PyObject_Length(__pyx_v_anno_string); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1007, __pyx_L1_error) + __pyx_t_4 = PyObject_Length(__pyx_v_anno_string); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1009, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 0) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1008 + /* "_rnaseq_utils.pyx":1010 * self.fields = () * if len(anno_string) > 0: * if anno_string[0] != '#': # <<<<<<<<<<<<<< * self.fields = tuple(anno_string.split('\t')[0:9]) * self.anno_type = self.fields[2] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_anno_string, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1008, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_anno_string, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__26, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1008, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__26, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1010, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1009 + /* "_rnaseq_utils.pyx":1011 * if len(anno_string) > 0: * if anno_string[0] != '#': * self.fields = tuple(anno_string.split('\t')[0:9]) # <<<<<<<<<<<<<< * self.anno_type = self.fields[2] * child_types = config_dict['child_types'] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_anno_string, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_anno_string, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -30313,13 +30339,13 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u__13); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 9, NULL, NULL, &__pyx_slice__29, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1009, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_t_1, 0, 9, NULL, NULL, &__pyx_slice__29, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1009, __pyx_L1_error) + __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -30328,7 +30354,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __pyx_v_self->fields = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1010 + /* "_rnaseq_utils.pyx":1012 * if anno_string[0] != '#': * self.fields = tuple(anno_string.split('\t')[0:9]) * self.anno_type = self.fields[2] # <<<<<<<<<<<<<< @@ -30337,44 +30363,44 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1010, __pyx_L1_error) + __PYX_ERR(0, 1012, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1010, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1010, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1012, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->anno_type); __Pyx_DECREF(__pyx_v_self->anno_type); __pyx_v_self->anno_type = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1011 + /* "_rnaseq_utils.pyx":1013 * self.fields = tuple(anno_string.split('\t')[0:9]) * self.anno_type = self.fields[2] * child_types = config_dict['child_types'] # <<<<<<<<<<<<<< * parent_types = config_dict['parent_types'] * if self.anno_type in child_types: */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_child_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_child_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1013, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1011, __pyx_L1_error) + if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1013, __pyx_L1_error) __pyx_v_child_types = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1012 + /* "_rnaseq_utils.pyx":1014 * self.anno_type = self.fields[2] * child_types = config_dict['child_types'] * parent_types = config_dict['parent_types'] # <<<<<<<<<<<<<< * if self.anno_type in child_types: * self.keep = True */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_parent_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1012, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_parent_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1014, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1012, __pyx_L1_error) + if (!(likely(PySet_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "set", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1014, __pyx_L1_error) __pyx_v_parent_types = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1013 + /* "_rnaseq_utils.pyx":1015 * child_types = config_dict['child_types'] * parent_types = config_dict['parent_types'] * if self.anno_type in child_types: # <<<<<<<<<<<<<< @@ -30383,13 +30409,13 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_child_types == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1013, __pyx_L1_error) + __PYX_ERR(0, 1015, __pyx_L1_error) } - __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_v_self->anno_type, __pyx_v_child_types, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1013, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_v_self->anno_type, __pyx_v_child_types, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1015, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1014 + /* "_rnaseq_utils.pyx":1016 * parent_types = config_dict['parent_types'] * if self.anno_type in child_types: * self.keep = True # <<<<<<<<<<<<<< @@ -30398,7 +30424,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ __pyx_v_self->keep = 1; - /* "_rnaseq_utils.pyx":1015 + /* "_rnaseq_utils.pyx":1017 * if self.anno_type in child_types: * self.keep = True * self.parent = False # <<<<<<<<<<<<<< @@ -30407,7 +30433,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ __pyx_v_self->parent = 0; - /* "_rnaseq_utils.pyx":1013 + /* "_rnaseq_utils.pyx":1015 * child_types = config_dict['child_types'] * parent_types = config_dict['parent_types'] * if self.anno_type in child_types: # <<<<<<<<<<<<<< @@ -30417,7 +30443,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj goto __pyx_L5; } - /* "_rnaseq_utils.pyx":1016 + /* "_rnaseq_utils.pyx":1018 * self.keep = True * self.parent = False * elif self.anno_type in parent_types: # <<<<<<<<<<<<<< @@ -30426,13 +30452,13 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_parent_types == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1016, __pyx_L1_error) + __PYX_ERR(0, 1018, __pyx_L1_error) } - __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_v_self->anno_type, __pyx_v_parent_types, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1016, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_v_self->anno_type, __pyx_v_parent_types, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1018, __pyx_L1_error) __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1017 + /* "_rnaseq_utils.pyx":1019 * self.parent = False * elif self.anno_type in parent_types: * self.keep = True # <<<<<<<<<<<<<< @@ -30441,7 +30467,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ __pyx_v_self->keep = 1; - /* "_rnaseq_utils.pyx":1018 + /* "_rnaseq_utils.pyx":1020 * elif self.anno_type in parent_types: * self.keep = True * self.parent = True # <<<<<<<<<<<<<< @@ -30450,7 +30476,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ __pyx_v_self->parent = 1; - /* "_rnaseq_utils.pyx":1016 + /* "_rnaseq_utils.pyx":1018 * self.keep = True * self.parent = False * elif self.anno_type in parent_types: # <<<<<<<<<<<<<< @@ -30460,7 +30486,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj } __pyx_L5:; - /* "_rnaseq_utils.pyx":1020 + /* "_rnaseq_utils.pyx":1022 * self.parent = True * * if self.keep: # <<<<<<<<<<<<<< @@ -30470,7 +30496,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __pyx_t_5 = (__pyx_v_self->keep != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1021 + /* "_rnaseq_utils.pyx":1023 * * if self.keep: * self.chrom = self.fields[0] # <<<<<<<<<<<<<< @@ -30479,18 +30505,18 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1021, __pyx_L1_error) + __PYX_ERR(0, 1023, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1021, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1021, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1023, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->chrom); __Pyx_DECREF(__pyx_v_self->chrom); __pyx_v_self->chrom = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1022 + /* "_rnaseq_utils.pyx":1024 * if self.keep: * self.chrom = self.fields[0] * self.source = self.fields[1] # <<<<<<<<<<<<<< @@ -30499,18 +30525,18 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1022, __pyx_L1_error) + __PYX_ERR(0, 1024, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1022, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1024, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->source); __Pyx_DECREF(__pyx_v_self->source); __pyx_v_self->source = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1023 + /* "_rnaseq_utils.pyx":1025 * self.chrom = self.fields[0] * self.source = self.fields[1] * self.span = (int(self.fields[3])-1, int(self.fields[4])) # <<<<<<<<<<<<<< @@ -30519,34 +30545,34 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1023, __pyx_L1_error) + __PYX_ERR(0, 1025, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_self->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1023, __pyx_L1_error) + __PYX_ERR(0, 1025, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1025, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_9.f0 = __pyx_t_7; __pyx_t_9.f1 = __pyx_t_8; __pyx_v_self->span = __pyx_t_9; - /* "_rnaseq_utils.pyx":1024 + /* "_rnaseq_utils.pyx":1026 * self.source = self.fields[1] * self.span = (int(self.fields[3])-1, int(self.fields[4])) * self.attributes = self.parse_attributes(self.fields[8], self.format) # <<<<<<<<<<<<<< @@ -30555,14 +30581,14 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1024, __pyx_L1_error) + __PYX_ERR(0, 1026, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1024, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1026, __pyx_L1_error) __pyx_t_1 = __pyx_v_self->format; __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationObject *)__pyx_v_self->__pyx_vtab)->parse_attributes(__pyx_v_self, ((PyObject*)__pyx_t_2), ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationObject *)__pyx_v_self->__pyx_vtab)->parse_attributes(__pyx_v_self, ((PyObject*)__pyx_t_2), ((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -30572,7 +30598,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __pyx_v_self->attributes = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1025 + /* "_rnaseq_utils.pyx":1027 * self.span = (int(self.fields[3])-1, int(self.fields[4])) * self.attributes = self.parse_attributes(self.fields[8], self.format) * if self.parent: # <<<<<<<<<<<<<< @@ -30582,33 +30608,33 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __pyx_t_5 = (__pyx_v_self->parent != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1026 + /* "_rnaseq_utils.pyx":1028 * self.attributes = self.parse_attributes(self.fields[8], self.format) * if self.parent: * gene_id_key = config_dict['parent_key_gene'] # <<<<<<<<<<<<<< * transcript_id_keys = config_dict['parent_key_transcript'] * else: */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_parent_key_gene); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_parent_key_gene); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1028, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1026, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1028, __pyx_L1_error) __pyx_v_gene_id_key = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1027 + /* "_rnaseq_utils.pyx":1029 * if self.parent: * gene_id_key = config_dict['parent_key_gene'] * transcript_id_keys = config_dict['parent_key_transcript'] # <<<<<<<<<<<<<< * else: * gene_id_key = config_dict['child_key_gene'] */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_parent_key_transcript); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_parent_key_transcript); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1027, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1029, __pyx_L1_error) __pyx_v_transcript_id_keys = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1025 + /* "_rnaseq_utils.pyx":1027 * self.span = (int(self.fields[3])-1, int(self.fields[4])) * self.attributes = self.parse_attributes(self.fields[8], self.format) * if self.parent: # <<<<<<<<<<<<<< @@ -30618,7 +30644,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj goto __pyx_L7; } - /* "_rnaseq_utils.pyx":1029 + /* "_rnaseq_utils.pyx":1031 * transcript_id_keys = config_dict['parent_key_transcript'] * else: * gene_id_key = config_dict['child_key_gene'] # <<<<<<<<<<<<<< @@ -30626,28 +30652,28 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj * */ /*else*/ { - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_child_key_gene); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_child_key_gene); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1031, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1029, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1031, __pyx_L1_error) __pyx_v_gene_id_key = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1030 + /* "_rnaseq_utils.pyx":1032 * else: * gene_id_key = config_dict['child_key_gene'] * transcript_id_keys = config_dict['child_key_transcript'] # <<<<<<<<<<<<<< * * self.gene_id = self.attributes.get(gene_id_key,'') */ - __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_child_key_transcript); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1030, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config_dict, __pyx_n_u_child_key_transcript); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1032, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1030, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1032, __pyx_L1_error) __pyx_v_transcript_id_keys = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; } __pyx_L7:; - /* "_rnaseq_utils.pyx":1032 + /* "_rnaseq_utils.pyx":1034 * transcript_id_keys = config_dict['child_key_transcript'] * * self.gene_id = self.attributes.get(gene_id_key,'') # <<<<<<<<<<<<<< @@ -30656,18 +30682,18 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1032, __pyx_L1_error) + __PYX_ERR(0, 1034, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_v_gene_id_key, __pyx_kp_u__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_v_gene_id_key, __pyx_kp_u__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1032, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->gene_id); __Pyx_DECREF(__pyx_v_self->gene_id); __pyx_v_self->gene_id = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1033 + /* "_rnaseq_utils.pyx":1035 * * self.gene_id = self.attributes.get(gene_id_key,'') * self.gene_id = self.gene_id.split(':')[-1] # <<<<<<<<<<<<<< @@ -30676,21 +30702,21 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->gene_id == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split"); - __PYX_ERR(0, 1033, __pyx_L1_error) + __PYX_ERR(0, 1035, __pyx_L1_error) } - __pyx_t_3 = PyUnicode_Split(__pyx_v_self->gene_id, __pyx_kp_u__30, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1033, __pyx_L1_error) + __pyx_t_3 = PyUnicode_Split(__pyx_v_self->gene_id, __pyx_kp_u__30, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1033, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1033, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->gene_id); __Pyx_DECREF(__pyx_v_self->gene_id); __pyx_v_self->gene_id = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1034 + /* "_rnaseq_utils.pyx":1036 * self.gene_id = self.attributes.get(gene_id_key,'') * self.gene_id = self.gene_id.split(':')[-1] * self.transcript_id = '' # <<<<<<<<<<<<<< @@ -30703,7 +30729,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_DECREF(__pyx_v_self->transcript_id); __pyx_v_self->transcript_id = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":1035 + /* "_rnaseq_utils.pyx":1037 * self.gene_id = self.gene_id.split(':')[-1] * self.transcript_id = '' * for t_id in transcript_id_keys: # <<<<<<<<<<<<<< @@ -30712,22 +30738,22 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_transcript_id_keys == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1035, __pyx_L1_error) + __PYX_ERR(0, 1037, __pyx_L1_error) } __pyx_t_1 = __pyx_v_transcript_id_keys; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1035, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1037, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1035, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1035, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1037, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_t_id, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1036 + /* "_rnaseq_utils.pyx":1038 * self.transcript_id = '' * for t_id in transcript_id_keys: * self.transcript_id = self.attributes.get(t_id,'') # <<<<<<<<<<<<<< @@ -30736,29 +30762,29 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1036, __pyx_L1_error) + __PYX_ERR(0, 1038, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_v_t_id, __pyx_kp_u__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1036, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItemDefault(__pyx_v_self->attributes, __pyx_v_t_id, __pyx_kp_u__7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1036, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->transcript_id); __Pyx_DECREF(__pyx_v_self->transcript_id); __pyx_v_self->transcript_id = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1037 + /* "_rnaseq_utils.pyx":1039 * for t_id in transcript_id_keys: * self.transcript_id = self.attributes.get(t_id,'') * if self.transcript_id != '': # <<<<<<<<<<<<<< * self.transcript_id = self.transcript_id.split(':')[-1] * break */ - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_self->transcript_id, __pyx_kp_u__7, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1037, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_self->transcript_id, __pyx_kp_u__7, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1039, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1038 + /* "_rnaseq_utils.pyx":1040 * self.transcript_id = self.attributes.get(t_id,'') * if self.transcript_id != '': * self.transcript_id = self.transcript_id.split(':')[-1] # <<<<<<<<<<<<<< @@ -30767,21 +30793,21 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->transcript_id == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split"); - __PYX_ERR(0, 1038, __pyx_L1_error) + __PYX_ERR(0, 1040, __pyx_L1_error) } - __pyx_t_3 = PyUnicode_Split(__pyx_v_self->transcript_id, __pyx_kp_u__30, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1038, __pyx_L1_error) + __pyx_t_3 = PyUnicode_Split(__pyx_v_self->transcript_id, __pyx_kp_u__30, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_t_3, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1038, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->transcript_id); __Pyx_DECREF(__pyx_v_self->transcript_id); __pyx_v_self->transcript_id = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1039 + /* "_rnaseq_utils.pyx":1041 * if self.transcript_id != '': * self.transcript_id = self.transcript_id.split(':')[-1] * break # <<<<<<<<<<<<<< @@ -30790,7 +30816,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ goto __pyx_L9_break; - /* "_rnaseq_utils.pyx":1037 + /* "_rnaseq_utils.pyx":1039 * for t_id in transcript_id_keys: * self.transcript_id = self.attributes.get(t_id,'') * if self.transcript_id != '': # <<<<<<<<<<<<<< @@ -30799,7 +30825,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ } - /* "_rnaseq_utils.pyx":1035 + /* "_rnaseq_utils.pyx":1037 * self.gene_id = self.gene_id.split(':')[-1] * self.transcript_id = '' * for t_id in transcript_id_keys: # <<<<<<<<<<<<<< @@ -30810,7 +30836,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __pyx_L9_break:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1041 + /* "_rnaseq_utils.pyx":1043 * break * * self.attributes['gene_id'] = self.gene_id # <<<<<<<<<<<<<< @@ -30821,12 +30847,12 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1041, __pyx_L1_error) + __PYX_ERR(0, 1043, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_n_u_gene_id, __pyx_t_1) < 0)) __PYX_ERR(0, 1041, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_n_u_gene_id, __pyx_t_1) < 0)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1042 + /* "_rnaseq_utils.pyx":1044 * * self.attributes['gene_id'] = self.gene_id * self.attributes['transcript_id'] = self.transcript_id # <<<<<<<<<<<<<< @@ -30837,12 +30863,12 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1042, __pyx_L1_error) + __PYX_ERR(0, 1044, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_n_u_transcript_id, __pyx_t_1) < 0)) __PYX_ERR(0, 1042, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_n_u_transcript_id, __pyx_t_1) < 0)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1043 + /* "_rnaseq_utils.pyx":1045 * self.attributes['gene_id'] = self.gene_id * self.attributes['transcript_id'] = self.transcript_id * self.attributes['anno_type'] = self.anno_type # <<<<<<<<<<<<<< @@ -30853,12 +30879,12 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_v_self->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1043, __pyx_L1_error) + __PYX_ERR(0, 1045, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_n_u_anno_type, __pyx_t_1) < 0)) __PYX_ERR(0, 1043, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->attributes, __pyx_n_u_anno_type, __pyx_t_1) < 0)) __PYX_ERR(0, 1045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1044 + /* "_rnaseq_utils.pyx":1046 * self.attributes['transcript_id'] = self.transcript_id * self.attributes['anno_type'] = self.anno_type * if self.fields[6] == '+': # <<<<<<<<<<<<<< @@ -30867,15 +30893,15 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1044, __pyx_L1_error) + __PYX_ERR(0, 1046, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1044, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1046, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1045 + /* "_rnaseq_utils.pyx":1047 * self.attributes['anno_type'] = self.anno_type * if self.fields[6] == '+': * self.strand = 1 # <<<<<<<<<<<<<< @@ -30884,7 +30910,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ __pyx_v_self->strand = 1; - /* "_rnaseq_utils.pyx":1044 + /* "_rnaseq_utils.pyx":1046 * self.attributes['transcript_id'] = self.transcript_id * self.attributes['anno_type'] = self.anno_type * if self.fields[6] == '+': # <<<<<<<<<<<<<< @@ -30894,7 +30920,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj goto __pyx_L11; } - /* "_rnaseq_utils.pyx":1046 + /* "_rnaseq_utils.pyx":1048 * if self.fields[6] == '+': * self.strand = 1 * elif self.fields[6] == '-': # <<<<<<<<<<<<<< @@ -30903,15 +30929,15 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ if (unlikely(__pyx_v_self->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1046, __pyx_L1_error) + __PYX_ERR(0, 1048, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1046, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_self->fields, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1048, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1046, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1048, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1047 + /* "_rnaseq_utils.pyx":1049 * self.strand = 1 * elif self.fields[6] == '-': * self.strand = -1 # <<<<<<<<<<<<<< @@ -30920,7 +30946,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ __pyx_v_self->strand = -1; - /* "_rnaseq_utils.pyx":1046 + /* "_rnaseq_utils.pyx":1048 * if self.fields[6] == '+': * self.strand = 1 * elif self.fields[6] == '-': # <<<<<<<<<<<<<< @@ -30930,7 +30956,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj goto __pyx_L11; } - /* "_rnaseq_utils.pyx":1049 + /* "_rnaseq_utils.pyx":1051 * self.strand = -1 * else: * self.strand = 0 # <<<<<<<<<<<<<< @@ -30942,7 +30968,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj } __pyx_L11:; - /* "_rnaseq_utils.pyx":1020 + /* "_rnaseq_utils.pyx":1022 * self.parent = True * * if self.keep: # <<<<<<<<<<<<<< @@ -30951,7 +30977,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ } - /* "_rnaseq_utils.pyx":1008 + /* "_rnaseq_utils.pyx":1010 * self.fields = () * if len(anno_string) > 0: * if anno_string[0] != '#': # <<<<<<<<<<<<<< @@ -30960,7 +30986,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ } - /* "_rnaseq_utils.pyx":1007 + /* "_rnaseq_utils.pyx":1009 * self.anno_type = '' * self.fields = () * if len(anno_string) > 0: # <<<<<<<<<<<<<< @@ -30969,7 +30995,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj */ } - /* "_rnaseq_utils.pyx":991 + /* "_rnaseq_utils.pyx":993 * cdef public (int, int) span * cdef public tuple fields * def __init__(self, anno_string, format, config_dict): # <<<<<<<<<<<<<< @@ -30997,7 +31023,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject___init__(struct __pyx_obj return __pyx_r; } -/* "_rnaseq_utils.pyx":1051 +/* "_rnaseq_utils.pyx":1053 * self.strand = 0 * * cpdef dict parse_attributes(self, str attr_string, str attr_format): # <<<<<<<<<<<<<< @@ -31051,7 +31077,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_parse_attributes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_16AnnotationObject_3parse_attributes)) { __Pyx_XDECREF(__pyx_r); @@ -31071,7 +31097,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_attr_string, __pyx_v_attr_format}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else @@ -31079,13 +31105,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_attr_string, __pyx_v_attr_format}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_2); } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_4) { __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL; @@ -31096,12 +31122,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_INCREF(__pyx_v_attr_format); __Pyx_GIVEREF(__pyx_v_attr_format); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_attr_format); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1051, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1053, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -31120,30 +31146,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT #endif } - /* "_rnaseq_utils.pyx":1053 + /* "_rnaseq_utils.pyx":1055 * cpdef dict parse_attributes(self, str attr_string, str attr_format): * """Converts a GTF or GFF3 formatted string to """ * cdef dict attr_dict = {} # <<<<<<<<<<<<<< * if attr_format == 'GTF': * try: */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_attr_dict = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1054 + /* "_rnaseq_utils.pyx":1056 * """Converts a GTF or GFF3 formatted string to """ * cdef dict attr_dict = {} * if attr_format == 'GTF': # <<<<<<<<<<<<<< * try: * attr_dict = {k:v.rstrip('";') for k,v in [attr.split(' "') for attr in attr_string.split('"; ')]} */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_attr_format, __pyx_n_u_GTF, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1054, __pyx_L1_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_attr_format, __pyx_n_u_GTF, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1056, __pyx_L1_error) __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":1055 + /* "_rnaseq_utils.pyx":1057 * cdef dict attr_dict = {} * if attr_format == 'GTF': * try: # <<<<<<<<<<<<<< @@ -31159,7 +31185,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { - /* "_rnaseq_utils.pyx":1056 + /* "_rnaseq_utils.pyx":1058 * if attr_format == 'GTF': * try: * attr_dict = {k:v.rstrip('";') for k,v in [attr.split(' "') for attr in attr_string.split('"; ')]} # <<<<<<<<<<<<<< @@ -31167,30 +31193,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT * attr_dict = {k:v.strip('"') for k,v in [attr.rstrip(';').split(' ') for attr in attr_string.split('; ')]} */ { /* enter inner scope */ - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L12_error) + __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1058, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_1); { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L17_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_attr_string == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split"); - __PYX_ERR(0, 1056, __pyx_L17_error) + __PYX_ERR(0, 1058, __pyx_L17_error) } - __pyx_t_3 = PyUnicode_Split(__pyx_v_attr_string, __pyx_kp_u__31, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L17_error) + __pyx_t_3 = PyUnicode_Split(__pyx_v_attr_string, __pyx_kp_u__31, -1L); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1056, __pyx_L17_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1058, __pyx_L17_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L17_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_9genexpr23__pyx_v_attr, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr23__pyx_v_attr, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1056, __pyx_L17_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr23__pyx_v_attr, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -31204,10 +31230,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_13, __pyx_kp_u__32) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__32); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L17_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L17_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1056, __pyx_L17_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1058, __pyx_L17_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -31223,9 +31249,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT for (;;) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1056, __pyx_L12_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1058, __pyx_L12_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L12_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_2); #endif if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { @@ -31234,7 +31260,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1056, __pyx_L12_error) + __PYX_ERR(0, 1058, __pyx_L12_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -31247,15 +31273,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1056, __pyx_L12_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1056, __pyx_L12_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1056, __pyx_L12_error) + __pyx_t_13 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1058, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_13)->tp_iternext; @@ -31263,7 +31289,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_4 = __pyx_t_14(__pyx_t_13); if (unlikely(!__pyx_t_4)) goto __pyx_L21_unpacking_failed; __Pyx_GOTREF(__pyx_t_4); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1056, __pyx_L12_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_13), 2) < 0) __PYX_ERR(0, 1058, __pyx_L12_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; goto __pyx_L22_unpacking_done; @@ -31271,14 +31297,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1056, __pyx_L12_error) + __PYX_ERR(0, 1058, __pyx_L12_error) __pyx_L22_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_k, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr22__pyx_v_v, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr22__pyx_v_v, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1056, __pyx_L12_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr22__pyx_v_v, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -31292,10 +31318,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_u__33) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__33); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L12_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1058, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr22__pyx_v_k, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1056, __pyx_L12_error) + if (unlikely(PyDict_SetItem(__pyx_t_1, (PyObject*)__pyx_9genexpr22__pyx_v_k, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1058, __pyx_L12_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -31311,7 +31337,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_DECREF_SET(__pyx_v_attr_dict, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1055 + /* "_rnaseq_utils.pyx":1057 * cdef dict attr_dict = {} * if attr_format == 'GTF': * try: # <<<<<<<<<<<<<< @@ -31331,7 +31357,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":1057 + /* "_rnaseq_utils.pyx":1059 * try: * attr_dict = {k:v.rstrip('";') for k,v in [attr.split(' "') for attr in attr_string.split('"; ')]} * except: # Failure case: attribute values aren't all surrounded by quotes # <<<<<<<<<<<<<< @@ -31340,12 +31366,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT */ /*except:*/ { __Pyx_AddTraceback("_rnaseq_utils.AnnotationObject.parse_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(0, 1057, __pyx_L6_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(0, 1059, __pyx_L6_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_2); - /* "_rnaseq_utils.pyx":1058 + /* "_rnaseq_utils.pyx":1060 * attr_dict = {k:v.rstrip('";') for k,v in [attr.split(' "') for attr in attr_string.split('"; ')]} * except: # Failure case: attribute values aren't all surrounded by quotes * attr_dict = {k:v.strip('"') for k,v in [attr.rstrip(';').split(' ') for attr in attr_string.split('; ')]} # <<<<<<<<<<<<<< @@ -31353,30 +31379,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT * attr_dict = {k:v for k,v in [attr.rstrip(';').split('=') for attr in attr_string.rstrip(';').split(';')]} */ { /* enter inner scope */ - __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1058, __pyx_L28_error) + __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_4); { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L33_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_attr_string == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split"); - __PYX_ERR(0, 1058, __pyx_L33_error) + __PYX_ERR(0, 1060, __pyx_L33_error) } - __pyx_t_13 = PyUnicode_Split(__pyx_v_attr_string, __pyx_kp_u__34, -1L); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1058, __pyx_L33_error) + __pyx_t_13 = PyUnicode_Split(__pyx_v_attr_string, __pyx_kp_u__34, -1L); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1060, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_13); __pyx_t_15 = __pyx_t_13; __Pyx_INCREF(__pyx_t_15); __pyx_t_12 = 0; __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; for (;;) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_15)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_13 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_13); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1058, __pyx_L33_error) + __pyx_t_13 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_13); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1060, __pyx_L33_error) #else - __pyx_t_13 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1058, __pyx_L33_error) + __pyx_t_13 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1060, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_13); #endif __Pyx_XDECREF_SET(__pyx_9genexpr25__pyx_v_attr, __pyx_t_13); __pyx_t_13 = 0; - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr25__pyx_v_attr, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1058, __pyx_L33_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr25__pyx_v_attr, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1060, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) { @@ -31390,10 +31416,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_t_16 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_18, __pyx_kp_u__35) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_kp_u__35); __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1058, __pyx_L33_error) + if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1060, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_split); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1058, __pyx_L33_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_t_16, __pyx_n_s_split); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1060, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_16 = NULL; @@ -31408,10 +31434,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_t_13 = (__pyx_t_16) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_16, __pyx_kp_u__19) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_kp_u__19); __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1058, __pyx_L33_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1060, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1058, __pyx_L33_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_13))) __PYX_ERR(0, 1060, __pyx_L33_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -31427,9 +31453,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT for (;;) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_15)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1058, __pyx_L28_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1060, __pyx_L28_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L28_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -31438,7 +31464,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1058, __pyx_L28_error) + __PYX_ERR(0, 1060, __pyx_L28_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -31451,15 +31477,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_INCREF(__pyx_t_13); __Pyx_INCREF(__pyx_t_17); #else - __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1058, __pyx_L28_error) + __pyx_t_13 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1060, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1058, __pyx_L28_error) + __pyx_t_17 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1060, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_17); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_16 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1058, __pyx_L28_error) + __pyx_t_16 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 1060, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_16); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_16)->tp_iternext; @@ -31467,7 +31493,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_GOTREF(__pyx_t_13); index = 1; __pyx_t_17 = __pyx_t_14(__pyx_t_16); if (unlikely(!__pyx_t_17)) goto __pyx_L37_unpacking_failed; __Pyx_GOTREF(__pyx_t_17); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_16), 2) < 0) __PYX_ERR(0, 1058, __pyx_L28_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_16), 2) < 0) __PYX_ERR(0, 1060, __pyx_L28_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; goto __pyx_L38_unpacking_done; @@ -31475,14 +31501,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1058, __pyx_L28_error) + __PYX_ERR(0, 1060, __pyx_L28_error) __pyx_L38_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr24__pyx_v_k, __pyx_t_13); __pyx_t_13 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr24__pyx_v_v, __pyx_t_17); __pyx_t_17 = 0; - __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr24__pyx_v_v, __pyx_n_s_strip); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1058, __pyx_L28_error) + __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr24__pyx_v_v, __pyx_n_s_strip); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 1060, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_17))) { @@ -31496,10 +31522,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_t_3 = (__pyx_t_13) ? __Pyx_PyObject_Call2Args(__pyx_t_17, __pyx_t_13, __pyx_kp_u__36) : __Pyx_PyObject_CallOneArg(__pyx_t_17, __pyx_kp_u__36); __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1058, __pyx_L28_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L28_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_4, (PyObject*)__pyx_9genexpr24__pyx_v_k, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1058, __pyx_L28_error) + if (unlikely(PyDict_SetItem(__pyx_t_4, (PyObject*)__pyx_9genexpr24__pyx_v_k, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 1060, __pyx_L28_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -31521,7 +31547,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_L6_except_error:; - /* "_rnaseq_utils.pyx":1055 + /* "_rnaseq_utils.pyx":1057 * cdef dict attr_dict = {} * if attr_format == 'GTF': * try: # <<<<<<<<<<<<<< @@ -31541,7 +31567,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __pyx_L9_try_end:; } - /* "_rnaseq_utils.pyx":1054 + /* "_rnaseq_utils.pyx":1056 * """Converts a GTF or GFF3 formatted string to """ * cdef dict attr_dict = {} * if attr_format == 'GTF': # <<<<<<<<<<<<<< @@ -31551,18 +31577,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1059 + /* "_rnaseq_utils.pyx":1061 * except: # Failure case: attribute values aren't all surrounded by quotes * attr_dict = {k:v.strip('"') for k,v in [attr.rstrip(';').split(' ') for attr in attr_string.split('; ')]} * elif attr_format == 'GFF': # <<<<<<<<<<<<<< * attr_dict = {k:v for k,v in [attr.rstrip(';').split('=') for attr in attr_string.rstrip(';').split(';')]} * */ - __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_attr_format, __pyx_n_u_GFF, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_attr_format, __pyx_n_u_GFF, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1061, __pyx_L1_error) __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":1060 + /* "_rnaseq_utils.pyx":1062 * attr_dict = {k:v.strip('"') for k,v in [attr.rstrip(';').split(' ') for attr in attr_string.split('; ')]} * elif attr_format == 'GFF': * attr_dict = {k:v for k,v in [attr.rstrip(';').split('=') for attr in attr_string.rstrip(';').split(';')]} # <<<<<<<<<<<<<< @@ -31570,14 +31596,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT * return attr_dict */ { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1060, __pyx_L42_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1062, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_2); { /* enter inner scope */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_attr_string, __pyx_kp_u__35); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_4 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_attr_string, __pyx_kp_u__35); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -31592,16 +31618,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_15, __pyx_t_4, __pyx_kp_u__35) : __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_kp_u__35); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L47_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_15 = __pyx_t_1; __Pyx_INCREF(__pyx_t_15); __pyx_t_12 = 0; __pyx_t_19 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_12 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_19 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_19 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 1062, __pyx_L47_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -31609,17 +31635,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT if (likely(PyList_CheckExact(__pyx_t_15))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_15)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1062, __pyx_L47_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_15)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_1); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1062, __pyx_L47_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -31629,7 +31655,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1060, __pyx_L47_error) + else __PYX_ERR(0, 1062, __pyx_L47_error) } break; } @@ -31637,7 +31663,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __Pyx_XDECREF_SET(__pyx_9genexpr27__pyx_v_attr, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr27__pyx_v_attr, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr27__pyx_v_attr, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_17 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -31651,10 +31677,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_t_4 = (__pyx_t_17) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_17, __pyx_kp_u__35) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__35); __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L47_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L47_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = NULL; @@ -31669,10 +31695,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_kp_u__37) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__37); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L47_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1060, __pyx_L47_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1062, __pyx_L47_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -31688,9 +31714,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT for (;;) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_15)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1060, __pyx_L42_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1062, __pyx_L42_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1060, __pyx_L42_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1062, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_6); #endif if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { @@ -31699,7 +31725,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1060, __pyx_L42_error) + __PYX_ERR(0, 1062, __pyx_L42_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -31712,15 +31738,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1060, __pyx_L42_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1062, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1060, __pyx_L42_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1060, __pyx_L42_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1062, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_14 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -31728,7 +31754,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_3 = __pyx_t_14(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L51_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1060, __pyx_L42_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1062, __pyx_L42_error) __pyx_t_14 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L52_unpacking_done; @@ -31736,14 +31762,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_14 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1060, __pyx_L42_error) + __PYX_ERR(0, 1062, __pyx_L42_error) __pyx_L52_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_k, __pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr26__pyx_v_v, __pyx_t_3); __pyx_t_3 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr26__pyx_v_k, (PyObject*)__pyx_9genexpr26__pyx_v_v))) __PYX_ERR(0, 1060, __pyx_L42_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr26__pyx_v_k, (PyObject*)__pyx_9genexpr26__pyx_v_v))) __PYX_ERR(0, 1062, __pyx_L42_error) } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_XDECREF(__pyx_9genexpr26__pyx_v_k); __pyx_9genexpr26__pyx_v_k = 0; @@ -31758,7 +31784,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __Pyx_DECREF_SET(__pyx_v_attr_dict, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1059 + /* "_rnaseq_utils.pyx":1061 * except: # Failure case: attribute values aren't all surrounded by quotes * attr_dict = {k:v.strip('"') for k,v in [attr.rstrip(';').split(' ') for attr in attr_string.split('; ')]} * elif attr_format == 'GFF': # <<<<<<<<<<<<<< @@ -31768,7 +31794,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT } __pyx_L3:; - /* "_rnaseq_utils.pyx":1062 + /* "_rnaseq_utils.pyx":1064 * attr_dict = {k:v for k,v in [attr.rstrip(';').split('=') for attr in attr_string.rstrip(';').split(';')]} * * return attr_dict # <<<<<<<<<<<<<< @@ -31780,7 +31806,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(CYT __pyx_r = __pyx_v_attr_dict; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1051 + /* "_rnaseq_utils.pyx":1053 * self.strand = 0 * * cpdef dict parse_attributes(self, str attr_string, str attr_format): # <<<<<<<<<<<<<< @@ -31853,11 +31879,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_16AnnotationObject_3parse_attributes(P case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_attr_format)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("parse_attributes", 1, 2, 2, 1); __PYX_ERR(0, 1051, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse_attributes", 1, 2, 2, 1); __PYX_ERR(0, 1053, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_attributes") < 0)) __PYX_ERR(0, 1051, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_attributes") < 0)) __PYX_ERR(0, 1053, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -31870,14 +31896,14 @@ static PyObject *__pyx_pw_13_rnaseq_utils_16AnnotationObject_3parse_attributes(P } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parse_attributes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1051, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse_attributes", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1053, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.AnnotationObject.parse_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attr_string), (&PyUnicode_Type), 1, "attr_string", 1))) __PYX_ERR(0, 1051, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attr_format), (&PyUnicode_Type), 1, "attr_format", 1))) __PYX_ERR(0, 1051, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attr_string), (&PyUnicode_Type), 1, "attr_string", 1))) __PYX_ERR(0, 1053, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attr_format), (&PyUnicode_Type), 1, "attr_format", 1))) __PYX_ERR(0, 1053, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_16AnnotationObject_2parse_attributes(((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)__pyx_v_self), __pyx_v_attr_string, __pyx_v_attr_format); /* function exit code */ @@ -31898,7 +31924,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_2parse_attributes(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_attributes", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(__pyx_v_self, __pyx_v_attr_string, __pyx_v_attr_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1051, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes(__pyx_v_self, __pyx_v_attr_string, __pyx_v_attr_format, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1053, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -31915,7 +31941,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_2parse_attributes(s return __pyx_r; } -/* "_rnaseq_utils.pyx":1064 +/* "_rnaseq_utils.pyx":1066 * return attr_dict * * def __eq__(self, other): return self.span == other.span # <<<<<<<<<<<<<< @@ -31947,11 +31973,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_4__eq__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__eq__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1066, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -31971,7 +31997,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_4__eq__(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":1065 +/* "_rnaseq_utils.pyx":1067 * * def __eq__(self, other): return self.span == other.span * def __ne__(self, other): return self.span != other.span # <<<<<<<<<<<<<< @@ -32003,11 +32029,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_6__ne__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__ne__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1065, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -32027,7 +32053,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_6__ne__(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":1066 +/* "_rnaseq_utils.pyx":1068 * def __eq__(self, other): return self.span == other.span * def __ne__(self, other): return self.span != other.span * def __gt__(self, other): return self.span > other.span # <<<<<<<<<<<<<< @@ -32059,11 +32085,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_8__gt__(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__gt__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1066, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1066, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1066, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -32083,7 +32109,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_8__gt__(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":1067 +/* "_rnaseq_utils.pyx":1069 * def __ne__(self, other): return self.span != other.span * def __gt__(self, other): return self.span > other.span * def __ge__(self, other): return self.span >= other.span # <<<<<<<<<<<<<< @@ -32115,11 +32141,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_10__ge__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__ge__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1069, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -32139,7 +32165,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_10__ge__(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":1068 +/* "_rnaseq_utils.pyx":1070 * def __gt__(self, other): return self.span > other.span * def __ge__(self, other): return self.span >= other.span * def __lt__(self, other): return self.span < other.span # <<<<<<<<<<<<<< @@ -32171,11 +32197,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_12__lt__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__lt__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1070, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -32195,7 +32221,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_12__lt__(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":1069 +/* "_rnaseq_utils.pyx":1071 * def __ge__(self, other): return self.span >= other.span * def __lt__(self, other): return self.span < other.span * def __le__(self, other): return self.span <= other.span # <<<<<<<<<<<<<< @@ -32227,11 +32253,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_14__le__(struct __p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__le__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1069, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_3; @@ -32251,7 +32277,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_14__le__(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":985 +/* "_rnaseq_utils.pyx":987 * * cdef class AnnotationObject: * cdef public dict attributes # <<<<<<<<<<<<<< @@ -32309,7 +32335,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_10attributes_2__set__(str const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 985, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 987, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -32359,7 +32385,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_10attributes_4__del__(str return __pyx_r; } -/* "_rnaseq_utils.pyx":986 +/* "_rnaseq_utils.pyx":988 * cdef class AnnotationObject: * cdef public dict attributes * cdef public bint keep, parent # <<<<<<<<<<<<<< @@ -32389,7 +32415,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_4keep___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->keep); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->keep); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32427,7 +32453,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_4keep_2__set__(struct __p const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L1_error) __pyx_v_self->keep = __pyx_t_1; /* function exit code */ @@ -32463,7 +32489,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_6parent___get__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->parent); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -32501,7 +32527,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_6parent_2__set__(struct _ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L1_error) __pyx_v_self->parent = __pyx_t_1; /* function exit code */ @@ -32515,7 +32541,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_6parent_2__set__(struct _ return __pyx_r; } -/* "_rnaseq_utils.pyx":987 +/* "_rnaseq_utils.pyx":989 * cdef public dict attributes * cdef public bint keep, parent * cdef public str format, gene_id, transcript_id, chrom, source, anno_type # <<<<<<<<<<<<<< @@ -32573,7 +32599,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_6format_2__set__(struct _ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 987, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 989, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -32673,7 +32699,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_7gene_id_2__set__(struct const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 987, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 989, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -32773,7 +32799,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_13transcript_id_2__set__( const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 987, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 989, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -32873,7 +32899,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_5chrom_2__set__(struct __ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 987, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 989, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -32973,7 +32999,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_6source_2__set__(struct _ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 987, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 989, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -33073,7 +33099,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_9anno_type_2__set__(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 987, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 989, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -33123,7 +33149,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_9anno_type_4__del__(struc return __pyx_r; } -/* "_rnaseq_utils.pyx":988 +/* "_rnaseq_utils.pyx":990 * cdef public bint keep, parent * cdef public str format, gene_id, transcript_id, chrom, source, anno_type * cdef public int strand # <<<<<<<<<<<<<< @@ -33153,7 +33179,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_6strand___get__(str int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33191,7 +33217,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_6strand_2__set__(struct _ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 988, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 990, __pyx_L1_error) __pyx_v_self->strand = __pyx_t_1; /* function exit code */ @@ -33205,7 +33231,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_6strand_2__set__(struct _ return __pyx_r; } -/* "_rnaseq_utils.pyx":989 +/* "_rnaseq_utils.pyx":991 * cdef public str format, gene_id, transcript_id, chrom, source, anno_type * cdef public int strand * cdef public (int, int) span # <<<<<<<<<<<<<< @@ -33235,7 +33261,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_4span___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_self->span); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -33273,7 +33299,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_4span_2__set__(struct __p const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 989, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_v_value); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error) __pyx_v_self->span = __pyx_t_1; /* function exit code */ @@ -33287,7 +33313,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_4span_2__set__(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":990 +/* "_rnaseq_utils.pyx":992 * cdef public int strand * cdef public (int, int) span * cdef public tuple fields # <<<<<<<<<<<<<< @@ -33345,7 +33371,7 @@ static int __pyx_pf_13_rnaseq_utils_16AnnotationObject_6fields_2__set__(struct _ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 990, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 992, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -33786,7 +33812,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_16AnnotationObject_18__setstate_cython return __pyx_r; } -/* "_rnaseq_utils.pyx":1080 +/* "_rnaseq_utils.pyx":1082 * cdef public int number_of_assemblies, counter, min_reps, confidence * cdef public float cap_bonus * def __init__(self, annotation_files, reference=None, genome_fasta=None, config=config_defaults, gtf_config=gtf_defaults, gff_config=gff_defaults, confidence=1): # <<<<<<<<<<<<<< @@ -33883,7 +33909,7 @@ static int __pyx_pw_13_rnaseq_utils_17AnnotationDataset_1__init__(PyObject *__py } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1080, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1082, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -33914,7 +33940,7 @@ static int __pyx_pw_13_rnaseq_utils_17AnnotationDataset_1__init__(PyObject *__py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1080, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 7, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1082, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.AnnotationDataset.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -33958,14 +33984,14 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__init__", 0); - /* "_rnaseq_utils.pyx":1081 + /* "_rnaseq_utils.pyx":1083 * cdef public float cap_bonus * def __init__(self, annotation_files, reference=None, genome_fasta=None, config=config_defaults, gtf_config=gtf_defaults, gff_config=gff_defaults, confidence=1): * RNAseqDataset.__init__(self, None, None, None, genome_fasta, config) # <<<<<<<<<<<<<< * self.source_array = annotation_files * self.min_reps = config['min_reps'] */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqDataset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqDataset), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -33982,7 +34008,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[7] = {__pyx_t_3, ((PyObject *)__pyx_v_self), Py_None, Py_None, Py_None, __pyx_v_genome_fasta, __pyx_v_config}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 6+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 6+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -33990,13 +34016,13 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[7] = {__pyx_t_3, ((PyObject *)__pyx_v_self), Py_None, Py_None, Py_None, __pyx_v_genome_fasta, __pyx_v_config}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 6+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 6+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(6+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(6+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -34019,21 +34045,21 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_INCREF(__pyx_v_config); __Pyx_GIVEREF(__pyx_v_config); PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_4, __pyx_v_config); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1082 + /* "_rnaseq_utils.pyx":1084 * def __init__(self, annotation_files, reference=None, genome_fasta=None, config=config_defaults, gtf_config=gtf_defaults, gff_config=gff_defaults, confidence=1): * RNAseqDataset.__init__(self, None, None, None, genome_fasta, config) * self.source_array = annotation_files # <<<<<<<<<<<<<< * self.min_reps = config['min_reps'] * self.cap_bonus = config['cap_bonus'] */ - if (!(likely(PyList_CheckExact(__pyx_v_annotation_files))||((__pyx_v_annotation_files) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_annotation_files)->tp_name), 0))) __PYX_ERR(0, 1082, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_v_annotation_files))||((__pyx_v_annotation_files) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_v_annotation_files)->tp_name), 0))) __PYX_ERR(0, 1084, __pyx_L1_error) __pyx_t_1 = __pyx_v_annotation_files; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -34042,49 +34068,49 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_v_self->__pyx_base.source_array = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1083 + /* "_rnaseq_utils.pyx":1085 * RNAseqDataset.__init__(self, None, None, None, genome_fasta, config) * self.source_array = annotation_files * self.min_reps = config['min_reps'] # <<<<<<<<<<<<<< * self.cap_bonus = config['cap_bonus'] * self.verbose = config.get('verbose',False) */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config, __pyx_n_u_min_reps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1083, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config, __pyx_n_u_min_reps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1083, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->min_reps = __pyx_t_4; - /* "_rnaseq_utils.pyx":1084 + /* "_rnaseq_utils.pyx":1086 * self.source_array = annotation_files * self.min_reps = config['min_reps'] * self.cap_bonus = config['cap_bonus'] # <<<<<<<<<<<<<< * self.verbose = config.get('verbose',False) * self.gene_delim = self.config['gene_delim'] */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config, __pyx_n_u_cap_bonus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_config, __pyx_n_u_cap_bonus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1086, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1084, __pyx_L1_error) + __pyx_t_6 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_6 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1086, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_self->cap_bonus = __pyx_t_6; - /* "_rnaseq_utils.pyx":1085 + /* "_rnaseq_utils.pyx":1087 * self.min_reps = config['min_reps'] * self.cap_bonus = config['cap_bonus'] * self.verbose = config.get('verbose',False) # <<<<<<<<<<<<<< * self.gene_delim = self.config['gene_delim'] * self.number_of_assemblies = len(annotation_files) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_config, __pyx_n_s_get); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_self->__pyx_base.verbose = __pyx_t_7; - /* "_rnaseq_utils.pyx":1086 + /* "_rnaseq_utils.pyx":1088 * self.cap_bonus = config['cap_bonus'] * self.verbose = config.get('verbose',False) * self.gene_delim = self.config['gene_delim'] # <<<<<<<<<<<<<< @@ -34093,45 +34119,45 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob */ if (unlikely(__pyx_v_self->__pyx_base.config == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1086, __pyx_L1_error) + __PYX_ERR(0, 1088, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx_base.config, __pyx_n_u_gene_delim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1086, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx_base.config, __pyx_n_u_gene_delim); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1088, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1086, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1088, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->__pyx_base.gene_delim); __Pyx_DECREF(__pyx_v_self->__pyx_base.gene_delim); __pyx_v_self->__pyx_base.gene_delim = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1087 + /* "_rnaseq_utils.pyx":1089 * self.verbose = config.get('verbose',False) * self.gene_delim = self.config['gene_delim'] * self.number_of_assemblies = len(annotation_files) # <<<<<<<<<<<<<< * self.confidence = confidence * self.gtf_config = gtf_config */ - __pyx_t_8 = PyObject_Length(__pyx_v_annotation_files); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_8 = PyObject_Length(__pyx_v_annotation_files); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1089, __pyx_L1_error) __pyx_v_self->number_of_assemblies = __pyx_t_8; - /* "_rnaseq_utils.pyx":1088 + /* "_rnaseq_utils.pyx":1090 * self.gene_delim = self.config['gene_delim'] * self.number_of_assemblies = len(annotation_files) * self.confidence = confidence # <<<<<<<<<<<<<< * self.gtf_config = gtf_config * self.gff_config = gff_config */ - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_confidence); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1088, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_v_confidence); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1090, __pyx_L1_error) __pyx_v_self->confidence = __pyx_t_4; - /* "_rnaseq_utils.pyx":1089 + /* "_rnaseq_utils.pyx":1091 * self.number_of_assemblies = len(annotation_files) * self.confidence = confidence * self.gtf_config = gtf_config # <<<<<<<<<<<<<< * self.gff_config = gff_config * cdef RNAseqMapping v */ - if (!(likely(PyDict_CheckExact(__pyx_v_gtf_config))||((__pyx_v_gtf_config) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_gtf_config)->tp_name), 0))) __PYX_ERR(0, 1089, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_gtf_config))||((__pyx_v_gtf_config) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_gtf_config)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) __pyx_t_2 = __pyx_v_gtf_config; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -34140,14 +34166,14 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_v_self->gtf_config = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1090 + /* "_rnaseq_utils.pyx":1092 * self.confidence = confidence * self.gtf_config = gtf_config * self.gff_config = gff_config # <<<<<<<<<<<<<< * cdef RNAseqMapping v * self.chrom_dict = {k:i for k,i in zip(self.chrom_array,range(len(self.chrom_array)))} */ - if (!(likely(PyDict_CheckExact(__pyx_v_gff_config))||((__pyx_v_gff_config) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_gff_config)->tp_name), 0))) __PYX_ERR(0, 1090, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_gff_config))||((__pyx_v_gff_config) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_gff_config)->tp_name), 0))) __PYX_ERR(0, 1092, __pyx_L1_error) __pyx_t_2 = __pyx_v_gff_config; __Pyx_INCREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); @@ -34156,7 +34182,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_v_self->gff_config = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1092 + /* "_rnaseq_utils.pyx":1094 * self.gff_config = gff_config * cdef RNAseqMapping v * self.chrom_dict = {k:i for k,i in zip(self.chrom_array,range(len(self.chrom_array)))} # <<<<<<<<<<<<<< @@ -34164,22 +34190,22 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob * # self.chrom_index = 0 */ { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_self->__pyx_base.chrom_array; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1092, __pyx_L5_error) + __PYX_ERR(0, 1094, __pyx_L5_error) } - __pyx_t_8 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_8 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base.chrom_array); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.chrom_array); @@ -34187,16 +34213,16 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1094, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -34204,17 +34230,17 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1094, __pyx_L5_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1094, __pyx_L5_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -34224,7 +34250,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1092, __pyx_L5_error) + else __PYX_ERR(0, 1094, __pyx_L5_error) } break; } @@ -34236,7 +34262,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1092, __pyx_L5_error) + __PYX_ERR(0, 1094, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -34249,15 +34275,15 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1092, __pyx_L5_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1094, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -34265,7 +34291,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1092, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1094, __pyx_L5_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9_unpacking_done; @@ -34273,14 +34299,14 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1092, __pyx_L5_error) + __PYX_ERR(0, 1094, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr28__pyx_v_k, __pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr28__pyx_v_i, __pyx_t_10); __pyx_t_10 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr28__pyx_v_k, (PyObject*)__pyx_9genexpr28__pyx_v_i))) __PYX_ERR(0, 1092, __pyx_L5_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr28__pyx_v_k, (PyObject*)__pyx_9genexpr28__pyx_v_i))) __PYX_ERR(0, 1094, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_9genexpr28__pyx_v_i); __pyx_9genexpr28__pyx_v_i = 0; @@ -34298,7 +34324,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_v_self->__pyx_base.chrom_dict = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1093 + /* "_rnaseq_utils.pyx":1095 * cdef RNAseqMapping v * self.chrom_dict = {k:i for k,i in zip(self.chrom_array,range(len(self.chrom_array)))} * self.source_dict = {k:i for k,i in zip(self.source_array,range(len(self.source_array)))} # <<<<<<<<<<<<<< @@ -34306,22 +34332,22 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob * # self.chrom_array = [] */ { /* enter inner scope */ - __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __pyx_v_self->__pyx_base.source_array; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1093, __pyx_L13_error) + __PYX_ERR(0, 1095, __pyx_L13_error) } - __pyx_t_8 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_8 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_self->__pyx_base.source_array); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.source_array); @@ -34329,16 +34355,16 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1095, __pyx_L13_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { @@ -34346,17 +34372,17 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1095, __pyx_L13_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_5); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1095, __pyx_L13_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -34366,7 +34392,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1093, __pyx_L13_error) + else __PYX_ERR(0, 1095, __pyx_L13_error) } break; } @@ -34378,7 +34404,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1093, __pyx_L13_error) + __PYX_ERR(0, 1095, __pyx_L13_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -34391,15 +34417,15 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_INCREF(__pyx_t_10); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_10 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1093, __pyx_L13_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1095, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -34407,7 +34433,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_GOTREF(__pyx_t_10); index = 1; __pyx_t_3 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_3)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1093, __pyx_L13_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1095, __pyx_L13_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L17_unpacking_done; @@ -34415,14 +34441,14 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1093, __pyx_L13_error) + __PYX_ERR(0, 1095, __pyx_L13_error) __pyx_L17_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_k, __pyx_t_10); __pyx_t_10 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr29__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; - if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr29__pyx_v_k, (PyObject*)__pyx_9genexpr29__pyx_v_i))) __PYX_ERR(0, 1093, __pyx_L13_error) + if (unlikely(PyDict_SetItem(__pyx_t_2, (PyObject*)__pyx_9genexpr29__pyx_v_k, (PyObject*)__pyx_9genexpr29__pyx_v_i))) __PYX_ERR(0, 1095, __pyx_L13_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_9genexpr29__pyx_v_i); __pyx_9genexpr29__pyx_v_i = 0; @@ -34440,14 +34466,14 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_v_self->__pyx_base.source_dict = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1118 + /* "_rnaseq_utils.pyx":1120 * # self.add_source(s) * * self.annotations = {} # <<<<<<<<<<<<<< * for f in annotation_files: * self.annotations[f] = self.import_annotation(f, f) */ - __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1118, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->annotations); @@ -34455,7 +34481,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_v_self->annotations = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1119 + /* "_rnaseq_utils.pyx":1121 * * self.annotations = {} * for f in annotation_files: # <<<<<<<<<<<<<< @@ -34466,26 +34492,26 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_t_2 = __pyx_v_annotation_files; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_annotation_files); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_annotation_files); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1121, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_9)) { if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1121, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1121, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -34495,7 +34521,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1119, __pyx_L1_error) + else __PYX_ERR(0, 1121, __pyx_L1_error) } break; } @@ -34504,25 +34530,25 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __Pyx_XDECREF_SET(__pyx_v_f, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1120 + /* "_rnaseq_utils.pyx":1122 * self.annotations = {} * for f in annotation_files: * self.annotations[f] = self.import_annotation(f, f) # <<<<<<<<<<<<<< * * if reference is not None: */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_f))||((__pyx_v_f) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_f)->tp_name), 0))) __PYX_ERR(0, 1120, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_v_f))||((__pyx_v_f) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_f)->tp_name), 0))) __PYX_ERR(0, 1120, __pyx_L1_error) - __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationDataset *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.import_annotation(((struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self), ((PyObject*)__pyx_v_f), ((PyObject*)__pyx_v_f), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1120, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_f))||((__pyx_v_f) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_f)->tp_name), 0))) __PYX_ERR(0, 1122, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_f))||((__pyx_v_f) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_f)->tp_name), 0))) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationDataset *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.import_annotation(((struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self), ((PyObject*)__pyx_v_f), ((PyObject*)__pyx_v_f), 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->annotations == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1120, __pyx_L1_error) + __PYX_ERR(0, 1122, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->annotations, __pyx_v_f, __pyx_t_1) < 0)) __PYX_ERR(0, 1120, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->annotations, __pyx_v_f, __pyx_t_1) < 0)) __PYX_ERR(0, 1122, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1119 + /* "_rnaseq_utils.pyx":1121 * * self.annotations = {} * for f in annotation_files: # <<<<<<<<<<<<<< @@ -34532,7 +34558,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1122 + /* "_rnaseq_utils.pyx":1124 * self.annotations[f] = self.import_annotation(f, f) * * if reference is not None: # <<<<<<<<<<<<<< @@ -34543,24 +34569,24 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_t_13 = (__pyx_t_7 != 0); if (__pyx_t_13) { - /* "_rnaseq_utils.pyx":1123 + /* "_rnaseq_utils.pyx":1125 * * if reference is not None: * self.annotations['reference'] = self.import_annotation(reference, 'reference') # <<<<<<<<<<<<<< * for k in self.annotations['reference'].keys(): * for v in self.annotations['reference'][k]: */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_reference))||((__pyx_v_reference) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_reference)->tp_name), 0))) __PYX_ERR(0, 1123, __pyx_L1_error) - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationDataset *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.import_annotation(((struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self), ((PyObject*)__pyx_v_reference), __pyx_n_u_reference, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1123, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_reference))||((__pyx_v_reference) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_reference)->tp_name), 0))) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_AnnotationDataset *)__pyx_v_self->__pyx_base.__pyx_vtab)->__pyx_base.import_annotation(((struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *)__pyx_v_self), ((PyObject*)__pyx_v_reference), __pyx_n_u_reference, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_v_self->annotations == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1123, __pyx_L1_error) + __PYX_ERR(0, 1125, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_self->annotations, __pyx_n_u_reference, __pyx_t_2) < 0)) __PYX_ERR(0, 1123, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_self->annotations, __pyx_n_u_reference, __pyx_t_2) < 0)) __PYX_ERR(0, 1125, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1124 + /* "_rnaseq_utils.pyx":1126 * if reference is not None: * self.annotations['reference'] = self.import_annotation(reference, 'reference') * for k in self.annotations['reference'].keys(): # <<<<<<<<<<<<<< @@ -34570,15 +34596,15 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_t_8 = 0; if (unlikely(__pyx_v_self->annotations == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1124, __pyx_L1_error) + __PYX_ERR(0, 1126, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->annotations, __pyx_n_u_reference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_self->annotations, __pyx_n_u_reference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 1124, __pyx_L1_error) + __PYX_ERR(0, 1126, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_t_1, 0, __pyx_n_s_keys, (&__pyx_t_14), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_5 = __Pyx_dict_iterator(__pyx_t_1, 0, __pyx_n_s_keys, (&__pyx_t_14), (&__pyx_t_4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_2); @@ -34587,12 +34613,12 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob while (1) { __pyx_t_15 = __Pyx_dict_iter_next(__pyx_t_2, __pyx_t_14, &__pyx_t_8, &__pyx_t_5, NULL, NULL, __pyx_t_4); if (unlikely(__pyx_t_15 == 0)) break; - if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 1124, __pyx_L1_error) + if (unlikely(__pyx_t_15 == -1)) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_XDECREF_SET(__pyx_v_k, __pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":1125 + /* "_rnaseq_utils.pyx":1127 * self.annotations['reference'] = self.import_annotation(reference, 'reference') * for k in self.annotations['reference'].keys(): * for v in self.annotations['reference'][k]: # <<<<<<<<<<<<<< @@ -34601,20 +34627,20 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob */ if (unlikely(__pyx_v_self->annotations == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1125, __pyx_L1_error) + __PYX_ERR(0, 1127, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->annotations, __pyx_n_u_reference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyDict_GetItem(__pyx_v_self->annotations, __pyx_n_u_reference); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_k); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_k); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_16 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_16 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1127, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { @@ -34622,17 +34648,17 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_16); __Pyx_INCREF(__pyx_t_1); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_16); __Pyx_INCREF(__pyx_t_1); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1127, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_16); __Pyx_INCREF(__pyx_t_1); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_16); __Pyx_INCREF(__pyx_t_1); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1127, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif } @@ -34642,17 +34668,17 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1125, __pyx_L1_error) + else __PYX_ERR(0, 1127, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_1); } - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1125, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1127, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_v, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1126 + /* "_rnaseq_utils.pyx":1128 * for k in self.annotations['reference'].keys(): * for v in self.annotations['reference'][k]: * v.is_reference = True # <<<<<<<<<<<<<< @@ -34661,7 +34687,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob */ __pyx_v_v->is_reference = 1; - /* "_rnaseq_utils.pyx":1127 + /* "_rnaseq_utils.pyx":1129 * for v in self.annotations['reference'][k]: * v.is_reference = True * v.attributes['TPM'] = 1 # <<<<<<<<<<<<<< @@ -34670,11 +34696,11 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob */ if (unlikely(__pyx_v_v->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1127, __pyx_L1_error) + __PYX_ERR(0, 1129, __pyx_L1_error) } - if (unlikely(PyDict_SetItem(__pyx_v_v->attributes, __pyx_n_u_TPM, __pyx_int_1) < 0)) __PYX_ERR(0, 1127, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_v->attributes, __pyx_n_u_TPM, __pyx_int_1) < 0)) __PYX_ERR(0, 1129, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1125 + /* "_rnaseq_utils.pyx":1127 * self.annotations['reference'] = self.import_annotation(reference, 'reference') * for k in self.annotations['reference'].keys(): * for v in self.annotations['reference'][k]: # <<<<<<<<<<<<<< @@ -34686,7 +34712,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1122 + /* "_rnaseq_utils.pyx":1124 * self.annotations[f] = self.import_annotation(f, f) * * if reference is not None: # <<<<<<<<<<<<<< @@ -34695,7 +34721,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":1129 + /* "_rnaseq_utils.pyx":1131 * v.attributes['TPM'] = 1 * * self.counter = 0 # <<<<<<<<<<<<<< @@ -34704,14 +34730,14 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob */ __pyx_v_self->counter = 0; - /* "_rnaseq_utils.pyx":1130 + /* "_rnaseq_utils.pyx":1132 * * self.counter = 0 * self.generator = self.generate_loci() # <<<<<<<<<<<<<< * * cpdef str get_transcript_fasta(self, RNAseqMapping transcript): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generate_loci); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generate_loci); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -34725,7 +34751,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_5); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -34734,7 +34760,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob __pyx_v_self->generator = __pyx_t_2; __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1080 + /* "_rnaseq_utils.pyx":1082 * cdef public int number_of_assemblies, counter, min_reps, confidence * cdef public float cap_bonus * def __init__(self, annotation_files, reference=None, genome_fasta=None, config=config_defaults, gtf_config=gtf_defaults, gff_config=gff_defaults, confidence=1): # <<<<<<<<<<<<<< @@ -34766,7 +34792,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset___init__(struct __pyx_ob return __pyx_r; } -/* "_rnaseq_utils.pyx":1132 +/* "_rnaseq_utils.pyx":1134 * self.generator = self.generate_loci() * * cpdef str get_transcript_fasta(self, RNAseqMapping transcript): # <<<<<<<<<<<<<< @@ -34809,7 +34835,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_transcript_fasta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_transcript_fasta); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_17AnnotationDataset_3get_transcript_fasta)) { __Pyx_XDECREF(__pyx_r); @@ -34826,10 +34852,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_transcript)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_transcript)); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1132, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1132, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1134, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -34848,16 +34874,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast #endif } - /* "_rnaseq_utils.pyx":1139 + /* "_rnaseq_utils.pyx":1141 * list ranges * * ranges = copy.deepcopy(transcript.ranges) # <<<<<<<<<<<<<< * chrom = self.chrom_array[transcript.chrom] * leftExtend = 0 */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1139, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_copy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -34872,14 +34898,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_transcript->ranges) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_transcript->ranges); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1139, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1139, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1141, __pyx_L1_error) __pyx_v_ranges = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1140 + /* "_rnaseq_utils.pyx":1142 * * ranges = copy.deepcopy(transcript.ranges) * chrom = self.chrom_array[transcript.chrom] # <<<<<<<<<<<<<< @@ -34888,15 +34914,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_self->__pyx_base.chrom_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1140, __pyx_L1_error) + __PYX_ERR(0, 1142, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.chrom_array, __pyx_v_transcript->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1140, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->__pyx_base.chrom_array, __pyx_v_transcript->chrom, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1140, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1142, __pyx_L1_error) __pyx_v_chrom = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1141 + /* "_rnaseq_utils.pyx":1143 * ranges = copy.deepcopy(transcript.ranges) * chrom = self.chrom_array[transcript.chrom] * leftExtend = 0 # <<<<<<<<<<<<<< @@ -34905,7 +34931,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ __pyx_v_leftExtend = 0; - /* "_rnaseq_utils.pyx":1142 + /* "_rnaseq_utils.pyx":1144 * chrom = self.chrom_array[transcript.chrom] * leftExtend = 0 * rightExtend = 0 # <<<<<<<<<<<<<< @@ -34914,7 +34940,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ __pyx_v_rightExtend = 0; - /* "_rnaseq_utils.pyx":1143 + /* "_rnaseq_utils.pyx":1145 * leftExtend = 0 * rightExtend = 0 * if transcript.strand == 1: # <<<<<<<<<<<<<< @@ -34924,7 +34950,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast switch (__pyx_v_transcript->strand) { case 1: - /* "_rnaseq_utils.pyx":1144 + /* "_rnaseq_utils.pyx":1146 * rightExtend = 0 * if transcript.strand == 1: * if 'S.left' in transcript.attributes: # <<<<<<<<<<<<<< @@ -34933,13 +34959,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_transcript->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1144, __pyx_L1_error) + __PYX_ERR(0, 1146, __pyx_L1_error) } - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_kp_u_S_left, __pyx_v_transcript->attributes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1144, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_kp_u_S_left, __pyx_v_transcript->attributes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1146, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1145 + /* "_rnaseq_utils.pyx":1147 * if transcript.strand == 1: * if 'S.left' in transcript.attributes: * leftExtend = ranges[0][0] - int(transcript.attributes['S.left']) # <<<<<<<<<<<<<< @@ -34948,31 +34974,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1145, __pyx_L1_error) + __PYX_ERR(0, 1147, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_transcript->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1145, __pyx_L1_error) + __PYX_ERR(0, 1147, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_transcript->attributes, __pyx_kp_u_S_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_transcript->attributes, __pyx_kp_u_S_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1145, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1147, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_leftExtend = __pyx_t_7; - /* "_rnaseq_utils.pyx":1146 + /* "_rnaseq_utils.pyx":1148 * if 'S.left' in transcript.attributes: * leftExtend = ranges[0][0] - int(transcript.attributes['S.left']) * ranges[0] = (ranges[0][0]-leftExtend, ranges[0][1]) # <<<<<<<<<<<<<< @@ -34981,29 +35007,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1146, __pyx_L1_error) + __PYX_ERR(0, 1148, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_leftExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_leftExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_3 = PyNumber_Subtract(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1146, __pyx_L1_error) + __PYX_ERR(0, 1148, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -35013,12 +35039,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __pyx_t_2 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1146, __pyx_L1_error) + __PYX_ERR(0, 1148, __pyx_L1_error) } - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, 0, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 1146, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, 0, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 1148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1144 + /* "_rnaseq_utils.pyx":1146 * rightExtend = 0 * if transcript.strand == 1: * if 'S.left' in transcript.attributes: # <<<<<<<<<<<<<< @@ -35027,7 +35053,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ } - /* "_rnaseq_utils.pyx":1148 + /* "_rnaseq_utils.pyx":1150 * ranges[0] = (ranges[0][0]-leftExtend, ranges[0][1]) * * if 'E.right' in transcript.attributes: # <<<<<<<<<<<<<< @@ -35036,13 +35062,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_transcript->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1148, __pyx_L1_error) + __PYX_ERR(0, 1150, __pyx_L1_error) } - __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_kp_u_E_right, __pyx_v_transcript->attributes, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_kp_u_E_right, __pyx_v_transcript->attributes, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1150, __pyx_L1_error) __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1149 + /* "_rnaseq_utils.pyx":1151 * * if 'E.right' in transcript.attributes: * rightExtend = int(transcript.attributes['E.right']) - ranges[-1][1] # <<<<<<<<<<<<<< @@ -35051,31 +35077,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_transcript->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1149, __pyx_L1_error) + __PYX_ERR(0, 1151, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_transcript->attributes, __pyx_kp_u_E_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_transcript->attributes, __pyx_kp_u_E_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1149, __pyx_L1_error) + __PYX_ERR(0, 1151, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1149, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1151, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rightExtend = __pyx_t_7; - /* "_rnaseq_utils.pyx":1150 + /* "_rnaseq_utils.pyx":1152 * if 'E.right' in transcript.attributes: * rightExtend = int(transcript.attributes['E.right']) - ranges[-1][1] * ranges[-1] = (ranges[-1][0], ranges[-1][1]+rightExtend) # <<<<<<<<<<<<<< @@ -35084,29 +35110,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1150, __pyx_L1_error) + __PYX_ERR(0, 1152, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1150, __pyx_L1_error) + __PYX_ERR(0, 1152, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rightExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rightExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -35116,12 +35142,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __pyx_t_4 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1150, __pyx_L1_error) + __PYX_ERR(0, 1152, __pyx_L1_error) } - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, -1L, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1150, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, -1L, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1148 + /* "_rnaseq_utils.pyx":1150 * ranges[0] = (ranges[0][0]-leftExtend, ranges[0][1]) * * if 'E.right' in transcript.attributes: # <<<<<<<<<<<<<< @@ -35130,7 +35156,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ } - /* "_rnaseq_utils.pyx":1143 + /* "_rnaseq_utils.pyx":1145 * leftExtend = 0 * rightExtend = 0 * if transcript.strand == 1: # <<<<<<<<<<<<<< @@ -35140,7 +35166,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast break; case -1L: - /* "_rnaseq_utils.pyx":1152 + /* "_rnaseq_utils.pyx":1154 * ranges[-1] = (ranges[-1][0], ranges[-1][1]+rightExtend) * elif transcript.strand == -1: * if 'E.left' in transcript.attributes: # <<<<<<<<<<<<<< @@ -35149,13 +35175,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_transcript->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1152, __pyx_L1_error) + __PYX_ERR(0, 1154, __pyx_L1_error) } - __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_kp_u_E_left, __pyx_v_transcript->attributes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1152, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyDict_ContainsTF(__pyx_kp_u_E_left, __pyx_v_transcript->attributes, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1154, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1153 + /* "_rnaseq_utils.pyx":1155 * elif transcript.strand == -1: * if 'E.left' in transcript.attributes: * leftExtend = ranges[0][0] - int(transcript.attributes['E.left']) # <<<<<<<<<<<<<< @@ -35164,31 +35190,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1153, __pyx_L1_error) + __PYX_ERR(0, 1155, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_transcript->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1153, __pyx_L1_error) + __PYX_ERR(0, 1155, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_transcript->attributes, __pyx_kp_u_E_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_transcript->attributes, __pyx_kp_u_E_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_leftExtend = __pyx_t_7; - /* "_rnaseq_utils.pyx":1154 + /* "_rnaseq_utils.pyx":1156 * if 'E.left' in transcript.attributes: * leftExtend = ranges[0][0] - int(transcript.attributes['E.left']) * ranges[0] = (ranges[0][0]-leftExtend, ranges[0][1]) # <<<<<<<<<<<<<< @@ -35197,29 +35223,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1154, __pyx_L1_error) + __PYX_ERR(0, 1156, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_leftExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_leftExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_t_4 = PyNumber_Subtract(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1154, __pyx_L1_error) + __PYX_ERR(0, 1156, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); @@ -35229,12 +35255,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __pyx_t_3 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1154, __pyx_L1_error) + __PYX_ERR(0, 1156, __pyx_L1_error) } - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, 0, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 1154, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, 0, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 1156, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1152 + /* "_rnaseq_utils.pyx":1154 * ranges[-1] = (ranges[-1][0], ranges[-1][1]+rightExtend) * elif transcript.strand == -1: * if 'E.left' in transcript.attributes: # <<<<<<<<<<<<<< @@ -35243,7 +35269,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ } - /* "_rnaseq_utils.pyx":1156 + /* "_rnaseq_utils.pyx":1158 * ranges[0] = (ranges[0][0]-leftExtend, ranges[0][1]) * * if 'S.right' in transcript.attributes: # <<<<<<<<<<<<<< @@ -35252,13 +35278,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_transcript->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1156, __pyx_L1_error) + __PYX_ERR(0, 1158, __pyx_L1_error) } - __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_kp_u_S_right, __pyx_v_transcript->attributes, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_kp_u_S_right, __pyx_v_transcript->attributes, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1158, __pyx_L1_error) __pyx_t_5 = (__pyx_t_6 != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1157 + /* "_rnaseq_utils.pyx":1159 * * if 'S.right' in transcript.attributes: * rightExtend = int(transcript.attributes['S.right']) - ranges[-1][1] # <<<<<<<<<<<<<< @@ -35267,31 +35293,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_transcript->attributes == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1157, __pyx_L1_error) + __PYX_ERR(0, 1159, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_transcript->attributes, __pyx_kp_u_S_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_transcript->attributes, __pyx_kp_u_S_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1157, __pyx_L1_error) + __PYX_ERR(0, 1159, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_1 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1159, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rightExtend = __pyx_t_7; - /* "_rnaseq_utils.pyx":1158 + /* "_rnaseq_utils.pyx":1160 * if 'S.right' in transcript.attributes: * rightExtend = int(transcript.attributes['S.right']) - ranges[-1][1] * ranges[-1] = (ranges[-1][0], ranges[-1][1]+rightExtend) # <<<<<<<<<<<<<< @@ -35300,29 +35326,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1158, __pyx_L1_error) + __PYX_ERR(0, 1160, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1158, __pyx_L1_error) + __PYX_ERR(0, 1160, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rightExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rightExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); @@ -35332,12 +35358,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __pyx_t_2 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1158, __pyx_L1_error) + __PYX_ERR(0, 1160, __pyx_L1_error) } - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, -1L, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1158, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, -1L, __pyx_t_1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1156 + /* "_rnaseq_utils.pyx":1158 * ranges[0] = (ranges[0][0]-leftExtend, ranges[0][1]) * * if 'S.right' in transcript.attributes: # <<<<<<<<<<<<<< @@ -35346,7 +35372,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ } - /* "_rnaseq_utils.pyx":1151 + /* "_rnaseq_utils.pyx":1153 * rightExtend = int(transcript.attributes['E.right']) - ranges[-1][1] * ranges[-1] = (ranges[-1][0], ranges[-1][1]+rightExtend) * elif transcript.strand == -1: # <<<<<<<<<<<<<< @@ -35357,7 +35383,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast default: break; } - /* "_rnaseq_utils.pyx":1160 + /* "_rnaseq_utils.pyx":1162 * ranges[-1] = (ranges[-1][0], ranges[-1][1]+rightExtend) * * fasta = ''.join([self.genome[chrom][l:r] for l,r in ranges]) # <<<<<<<<<<<<<< @@ -35365,19 +35391,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast * fasta = fasta[:leftExtend].lower()+fasta[leftExtend:] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L9_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1160, __pyx_L9_error) + __PYX_ERR(0, 1162, __pyx_L9_error) } __pyx_t_2 = __pyx_v_ranges; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1160, __pyx_L9_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_4); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1162, __pyx_L9_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1160, __pyx_L9_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1162, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_4); #endif if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { @@ -35386,7 +35412,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1160, __pyx_L9_error) + __PYX_ERR(0, 1162, __pyx_L9_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -35399,15 +35425,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_9); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L9_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1162, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1160, __pyx_L9_error) + __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_9); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1160, __pyx_L9_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1162, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -35415,7 +35441,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __Pyx_GOTREF(__pyx_t_3); index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L12_unpacking_failed; __Pyx_GOTREF(__pyx_t_9); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1160, __pyx_L9_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1162, __pyx_L9_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L13_unpacking_done; @@ -35423,7 +35449,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1160, __pyx_L9_error) + __PYX_ERR(0, 1162, __pyx_L9_error) __pyx_L13_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr30__pyx_v_l, __pyx_t_3); @@ -35432,14 +35458,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __pyx_t_9 = 0; if (unlikely(__pyx_v_self->__pyx_base.genome == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1160, __pyx_L9_error) + __PYX_ERR(0, 1162, __pyx_L9_error) } - __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx_base.genome, __pyx_v_chrom); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1160, __pyx_L9_error) + __pyx_t_4 = __Pyx_PyDict_GetItem(__pyx_v_self->__pyx_base.genome, __pyx_v_chrom); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1162, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, &__pyx_9genexpr30__pyx_v_l, &__pyx_9genexpr30__pyx_v_r, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1160, __pyx_L9_error) + __pyx_t_9 = __Pyx_PyObject_GetSlice(__pyx_t_4, 0, 0, &__pyx_9genexpr30__pyx_v_l, &__pyx_9genexpr30__pyx_v_r, NULL, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L9_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1160, __pyx_L9_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 1162, __pyx_L9_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -35452,13 +35478,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast goto __pyx_L1_error; __pyx_L14_exit_scope:; } /* exit inner scope */ - __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Join(__pyx_kp_u__7, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_fasta = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1161 + /* "_rnaseq_utils.pyx":1163 * * fasta = ''.join([self.genome[chrom][l:r] for l,r in ranges]) * if leftExtend>0: # <<<<<<<<<<<<<< @@ -35468,7 +35494,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __pyx_t_5 = ((__pyx_v_leftExtend > 0) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1162 + /* "_rnaseq_utils.pyx":1164 * fasta = ''.join([self.genome[chrom][l:r] for l,r in ranges]) * if leftExtend>0: * fasta = fasta[:leftExtend].lower()+fasta[leftExtend:] # <<<<<<<<<<<<<< @@ -35477,11 +35503,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_fasta == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1162, __pyx_L1_error) + __PYX_ERR(0, 1164, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_fasta, 0, __pyx_v_leftExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_fasta, 0, __pyx_v_leftExtend); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_lower); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_lower); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -35496,24 +35522,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1162, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (unlikely(__pyx_v_fasta == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1162, __pyx_L1_error) + __PYX_ERR(0, 1164, __pyx_L1_error) } - __pyx_t_9 = __Pyx_PyUnicode_Substring(__pyx_v_fasta, __pyx_v_leftExtend, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyUnicode_Substring(__pyx_v_fasta, __pyx_v_leftExtend, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1162, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1164, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_fasta, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1161 + /* "_rnaseq_utils.pyx":1163 * * fasta = ''.join([self.genome[chrom][l:r] for l,r in ranges]) * if leftExtend>0: # <<<<<<<<<<<<<< @@ -35522,7 +35548,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ } - /* "_rnaseq_utils.pyx":1164 + /* "_rnaseq_utils.pyx":1166 * fasta = fasta[:leftExtend].lower()+fasta[leftExtend:] * * if rightExtend>0: # <<<<<<<<<<<<<< @@ -35532,7 +35558,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __pyx_t_5 = ((__pyx_v_rightExtend > 0) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":1165 + /* "_rnaseq_utils.pyx":1167 * * if rightExtend>0: * fasta = fasta[:-rightExtend]+fasta[-rightExtend:].lower() # <<<<<<<<<<<<<< @@ -35541,17 +35567,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ if (unlikely(__pyx_v_fasta == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1165, __pyx_L1_error) + __PYX_ERR(0, 1167, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_fasta, 0, (-__pyx_v_rightExtend)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_fasta, 0, (-__pyx_v_rightExtend)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_fasta == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1165, __pyx_L1_error) + __PYX_ERR(0, 1167, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyUnicode_Substring(__pyx_v_fasta, (-__pyx_v_rightExtend), PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Substring(__pyx_v_fasta, (-__pyx_v_rightExtend), PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_lower); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -35566,18 +35592,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast } __pyx_t_9 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1165, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_4 = PyNumber_Add(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1165, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_fasta, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":1164 + /* "_rnaseq_utils.pyx":1166 * fasta = fasta[:leftExtend].lower()+fasta[leftExtend:] * * if rightExtend>0: # <<<<<<<<<<<<<< @@ -35586,7 +35612,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast */ } - /* "_rnaseq_utils.pyx":1167 + /* "_rnaseq_utils.pyx":1169 * fasta = fasta[:-rightExtend]+fasta[-rightExtend:].lower() * * if transcript.strand == -1: # <<<<<<<<<<<<<< @@ -35596,16 +35622,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast switch (__pyx_v_transcript->strand) { case -1L: - /* "_rnaseq_utils.pyx":1168 + /* "_rnaseq_utils.pyx":1170 * * if transcript.strand == -1: * fasta = fu.rc(fasta) # <<<<<<<<<<<<<< * elif transcript.strand == 0: * fasta = fasta.lower() */ - __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_fu); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1168, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_fu); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_rc); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -35620,14 +35646,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast } __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_9, __pyx_v_fasta) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_fasta); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1168, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_fasta, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":1167 + /* "_rnaseq_utils.pyx":1169 * fasta = fasta[:-rightExtend]+fasta[-rightExtend:].lower() * * if transcript.strand == -1: # <<<<<<<<<<<<<< @@ -35637,14 +35663,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast break; case 0: - /* "_rnaseq_utils.pyx":1170 + /* "_rnaseq_utils.pyx":1172 * fasta = fu.rc(fasta) * elif transcript.strand == 0: * fasta = fasta.lower() # <<<<<<<<<<<<<< * * return fasta */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta, __pyx_n_s_lower); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -35658,14 +35684,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast } __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1170, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1170, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_fasta, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":1169 + /* "_rnaseq_utils.pyx":1171 * if transcript.strand == -1: * fasta = fu.rc(fasta) * elif transcript.strand == 0: # <<<<<<<<<<<<<< @@ -35676,7 +35702,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast default: break; } - /* "_rnaseq_utils.pyx":1172 + /* "_rnaseq_utils.pyx":1174 * fasta = fasta.lower() * * return fasta # <<<<<<<<<<<<<< @@ -35688,7 +35714,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fast __pyx_r = __pyx_v_fasta; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1132 + /* "_rnaseq_utils.pyx":1134 * self.generator = self.generate_loci() * * cpdef str get_transcript_fasta(self, RNAseqMapping transcript): # <<<<<<<<<<<<<< @@ -35727,7 +35753,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_17AnnotationDataset_3get_transcript_fa PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_transcript_fasta (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_transcript), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "transcript", 0))) __PYX_ERR(0, 1132, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_transcript), __pyx_ptype_13_rnaseq_utils_RNAseqMapping, 1, "transcript", 0))) __PYX_ERR(0, 1134, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_17AnnotationDataset_2get_transcript_fasta(((struct __pyx_obj_13_rnaseq_utils_AnnotationDataset *)__pyx_v_self), ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_v_transcript)); /* function exit code */ @@ -35748,7 +35774,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_2get_transcript_fa int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_transcript_fasta", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fasta(__pyx_v_self, __pyx_v_transcript, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fasta(__pyx_v_self, __pyx_v_transcript, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -35765,7 +35791,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_2get_transcript_fa return __pyx_r; } -/* "_rnaseq_utils.pyx":1174 +/* "_rnaseq_utils.pyx":1176 * return fasta * * cpdef list merge_children(self, children): # <<<<<<<<<<<<<< @@ -35801,7 +35827,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_merge_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_merge_children); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_17AnnotationDataset_5merge_children)) { __Pyx_XDECREF(__pyx_r); @@ -35818,10 +35844,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_children) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_children); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1174, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1174, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1176, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -35840,69 +35866,69 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH #endif } - /* "_rnaseq_utils.pyx":1179 + /* "_rnaseq_utils.pyx":1181 * cdef AnnotationObject child, last_child * cdef list children_out * children_out = [] # <<<<<<<<<<<<<< * for child in sorted(children): * if len(children_out) == 0: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_children_out = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1180 + /* "_rnaseq_utils.pyx":1182 * cdef list children_out * children_out = [] * for child in sorted(children): # <<<<<<<<<<<<<< * if len(children_out) == 0: * children_out.append(child) */ - __pyx_t_2 = PySequence_List(__pyx_v_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_2 = PySequence_List(__pyx_v_children); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_5 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1182, __pyx_L1_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1180, __pyx_L1_error) + __PYX_ERR(0, 1182, __pyx_L1_error) } __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1182, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_AnnotationObject))))) __PYX_ERR(0, 1180, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_AnnotationObject))))) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child, ((struct __pyx_obj_13_rnaseq_utils_AnnotationObject *)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1181 + /* "_rnaseq_utils.pyx":1183 * children_out = [] * for child in sorted(children): * if len(children_out) == 0: # <<<<<<<<<<<<<< * children_out.append(child) * last_child = child */ - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_children_out); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_children_out); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1183, __pyx_L1_error) __pyx_t_8 = ((__pyx_t_7 == 0) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":1182 + /* "_rnaseq_utils.pyx":1184 * for child in sorted(children): * if len(children_out) == 0: * children_out.append(child) # <<<<<<<<<<<<<< * last_child = child * else: */ - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_children_out, ((PyObject *)__pyx_v_child)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_children_out, ((PyObject *)__pyx_v_child)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1184, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1183 + /* "_rnaseq_utils.pyx":1185 * if len(children_out) == 0: * children_out.append(child) * last_child = child # <<<<<<<<<<<<<< @@ -35912,7 +35938,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH __Pyx_INCREF(((PyObject *)__pyx_v_child)); __Pyx_XDECREF_SET(__pyx_v_last_child, __pyx_v_child); - /* "_rnaseq_utils.pyx":1181 + /* "_rnaseq_utils.pyx":1183 * children_out = [] * for child in sorted(children): * if len(children_out) == 0: # <<<<<<<<<<<<<< @@ -35922,7 +35948,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH goto __pyx_L5; } - /* "_rnaseq_utils.pyx":1185 + /* "_rnaseq_utils.pyx":1187 * last_child = child * else: * if child.span[0] == last_child.span[1]: # <<<<<<<<<<<<<< @@ -35930,21 +35956,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH * else: */ /*else*/ { - if (unlikely(!__pyx_v_last_child)) { __Pyx_RaiseUnboundLocalError("last_child"); __PYX_ERR(0, 1185, __pyx_L1_error) } + if (unlikely(!__pyx_v_last_child)) { __Pyx_RaiseUnboundLocalError("last_child"); __PYX_ERR(0, 1187, __pyx_L1_error) } __pyx_t_8 = ((__pyx_v_child->span.f0 == __pyx_v_last_child->span.f1) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":1186 + /* "_rnaseq_utils.pyx":1188 * else: * if child.span[0] == last_child.span[1]: * last_child.span[1] = child.span[1] # <<<<<<<<<<<<<< * else: * children_out.append(child) */ - if (unlikely(!__pyx_v_last_child)) { __Pyx_RaiseUnboundLocalError("last_child"); __PYX_ERR(0, 1186, __pyx_L1_error) } + if (unlikely(!__pyx_v_last_child)) { __Pyx_RaiseUnboundLocalError("last_child"); __PYX_ERR(0, 1188, __pyx_L1_error) } __pyx_v_last_child->span.f1 = __pyx_v_child->span.f1; - /* "_rnaseq_utils.pyx":1185 + /* "_rnaseq_utils.pyx":1187 * last_child = child * else: * if child.span[0] == last_child.span[1]: # <<<<<<<<<<<<<< @@ -35954,7 +35980,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH goto __pyx_L6; } - /* "_rnaseq_utils.pyx":1188 + /* "_rnaseq_utils.pyx":1190 * last_child.span[1] = child.span[1] * else: * children_out.append(child) # <<<<<<<<<<<<<< @@ -35962,9 +35988,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH * */ /*else*/ { - __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_children_out, ((PyObject *)__pyx_v_child)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyList_Append(__pyx_v_children_out, ((PyObject *)__pyx_v_child)); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1190, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1189 + /* "_rnaseq_utils.pyx":1191 * else: * children_out.append(child) * last_child = child # <<<<<<<<<<<<<< @@ -35978,7 +36004,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH } __pyx_L5:; - /* "_rnaseq_utils.pyx":1180 + /* "_rnaseq_utils.pyx":1182 * cdef list children_out * children_out = [] * for child in sorted(children): # <<<<<<<<<<<<<< @@ -35988,7 +36014,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1191 + /* "_rnaseq_utils.pyx":1193 * last_child = child * * return children_out # <<<<<<<<<<<<<< @@ -36000,7 +36026,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(CYTH __pyx_r = __pyx_v_children_out; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1174 + /* "_rnaseq_utils.pyx":1176 * return fasta * * cpdef list merge_children(self, children): # <<<<<<<<<<<<<< @@ -36048,7 +36074,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_4merge_children(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("merge_children", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(__pyx_v_self, __pyx_v_children, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children(__pyx_v_self, __pyx_v_children, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -36066,7 +36092,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_4merge_children(st } static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_rnaseq_utils.pyx":1193 +/* "_rnaseq_utils.pyx":1195 * return children_out * * def generate_loci(self): # <<<<<<<<<<<<<< @@ -36100,7 +36126,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_6generate_loci(str if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_2_generate_loci *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1193, __pyx_L1_error) + __PYX_ERR(0, 1195, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -36108,7 +36134,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_6generate_loci(str __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self); __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_generate_loci, __pyx_n_s_AnnotationDataset_generate_loci, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator, NULL, (PyObject *) __pyx_cur_scope, __pyx_n_s_generate_loci, __pyx_n_s_AnnotationDataset_generate_loci, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 1195, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -36156,9 +36182,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1193, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1195, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1200 + /* "_rnaseq_utils.pyx":1202 * cdef RNAseqMapping item * cdef int number_of_items, i, left * number_of_files = len(self.annotations) # <<<<<<<<<<<<<< @@ -36169,13 +36195,13 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1200, __pyx_L1_error) + __PYX_ERR(0, 1202, __pyx_L1_error) } - __pyx_t_2 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_t_2 = PyDict_Size(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_number_of_files = __pyx_t_2; - /* "_rnaseq_utils.pyx":1201 + /* "_rnaseq_utils.pyx":1203 * cdef int number_of_items, i, left * number_of_files = len(self.annotations) * for chrom in self.chrom_array: # <<<<<<<<<<<<<< @@ -36184,38 +36210,38 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C */ if (unlikely(__pyx_cur_scope->__pyx_v_self->__pyx_base.chrom_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1201, __pyx_L1_error) + __PYX_ERR(0, 1203, __pyx_L1_error) } __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->__pyx_base.chrom_array; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1203, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1201, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_chrom); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_chrom, ((PyObject*)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1202 + /* "_rnaseq_utils.pyx":1204 * number_of_files = len(self.annotations) * for chrom in self.chrom_array: * chrom_annotation_list = [] # <<<<<<<<<<<<<< * for k in self.annotations.keys(): * chrom_annotation_list += self.annotations[k].get(chrom, []) */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1204, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_chrom_annotation_list); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1203 + /* "_rnaseq_utils.pyx":1205 * for chrom in self.chrom_array: * chrom_annotation_list = [] * for k in self.annotations.keys(): # <<<<<<<<<<<<<< @@ -36225,9 +36251,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __pyx_t_4 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_self->annotations == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 1203, __pyx_L1_error) + __PYX_ERR(0, 1205, __pyx_L1_error) } - __pyx_t_7 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_self->annotations, 1, __pyx_n_s_keys, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_7 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_self->annotations, 1, __pyx_n_s_keys, (&__pyx_t_5), (&__pyx_t_6)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = __pyx_t_7; @@ -36235,14 +36261,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C while (1) { __pyx_t_8 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_5, &__pyx_t_4, &__pyx_t_7, NULL, NULL, __pyx_t_6); if (unlikely(__pyx_t_8 == 0)) break; - if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1203, __pyx_L1_error) + if (unlikely(__pyx_t_8 == -1)) __PYX_ERR(0, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_k); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_k, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1204 + /* "_rnaseq_utils.pyx":1206 * chrom_annotation_list = [] * for k in self.annotations.keys(): * chrom_annotation_list += self.annotations[k].get(chrom, []) # <<<<<<<<<<<<<< @@ -36251,14 +36277,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C */ if (unlikely(__pyx_cur_scope->__pyx_v_self->annotations == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1204, __pyx_L1_error) + __PYX_ERR(0, 1206, __pyx_L1_error) } - __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_self->annotations, __pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_self->annotations, __pyx_cur_scope->__pyx_v_k); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_11 = NULL; __pyx_t_8 = 0; @@ -36275,7 +36301,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_cur_scope->__pyx_v_chrom, __pyx_t_9}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; @@ -36284,14 +36310,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_cur_scope->__pyx_v_chrom, __pyx_t_9}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } else #endif { - __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL; @@ -36302,12 +36328,12 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_8, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_chrom_annotation_list); @@ -36317,14 +36343,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1206 + /* "_rnaseq_utils.pyx":1208 * chrom_annotation_list += self.annotations[k].get(chrom, []) * * chrom_annotation_list.sort() # <<<<<<<<<<<<<< * number_of_items = len(chrom_annotation_list) * left = 0 */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_n_s_sort); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_n_s_sort); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { @@ -36338,22 +36364,22 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C } __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_10); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1208, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1207 + /* "_rnaseq_utils.pyx":1209 * * chrom_annotation_list.sort() * number_of_items = len(chrom_annotation_list) # <<<<<<<<<<<<<< * left = 0 * rightmost = -1 */ - __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_chrom_annotation_list); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_cur_scope->__pyx_v_chrom_annotation_list); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1209, __pyx_L1_error) __pyx_cur_scope->__pyx_v_number_of_items = __pyx_t_5; - /* "_rnaseq_utils.pyx":1208 + /* "_rnaseq_utils.pyx":1210 * chrom_annotation_list.sort() * number_of_items = len(chrom_annotation_list) * left = 0 # <<<<<<<<<<<<<< @@ -36362,7 +36388,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C */ __pyx_cur_scope->__pyx_v_left = 0; - /* "_rnaseq_utils.pyx":1209 + /* "_rnaseq_utils.pyx":1211 * number_of_items = len(chrom_annotation_list) * left = 0 * rightmost = -1 # <<<<<<<<<<<<<< @@ -36371,7 +36397,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C */ __pyx_cur_scope->__pyx_v_rightmost = -1L; - /* "_rnaseq_utils.pyx":1210 + /* "_rnaseq_utils.pyx":1212 * left = 0 * rightmost = -1 * for i in range(number_of_items): # <<<<<<<<<<<<<< @@ -36383,22 +36409,22 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_8; __pyx_t_13+=1) { __pyx_cur_scope->__pyx_v_i = __pyx_t_13; - /* "_rnaseq_utils.pyx":1211 + /* "_rnaseq_utils.pyx":1213 * rightmost = -1 * for i in range(number_of_items): * item = chrom_annotation_list[i] # <<<<<<<<<<<<<< * if rightmost > 0: * if item.left() > rightmost: # A gap was jumped */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_cur_scope->__pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1211, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_item)); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_item, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_3)); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1212 + /* "_rnaseq_utils.pyx":1214 * for i in range(number_of_items): * item = chrom_annotation_list[i] * if rightmost > 0: # <<<<<<<<<<<<<< @@ -36408,7 +36434,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __pyx_t_14 = ((__pyx_cur_scope->__pyx_v_rightmost > 0) != 0); if (__pyx_t_14) { - /* "_rnaseq_utils.pyx":1213 + /* "_rnaseq_utils.pyx":1215 * item = chrom_annotation_list[i] * if rightmost > 0: * if item.left() > rightmost: # A gap was jumped # <<<<<<<<<<<<<< @@ -36418,14 +36444,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __pyx_t_14 = ((((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_cur_scope->__pyx_v_item->__pyx_vtab)->left(__pyx_cur_scope->__pyx_v_item, 0) > __pyx_cur_scope->__pyx_v_rightmost) != 0); if (__pyx_t_14) { - /* "_rnaseq_utils.pyx":1214 + /* "_rnaseq_utils.pyx":1216 * if rightmost > 0: * if item.left() > rightmost: # A gap was jumped * yield chrom_annotation_list[left:i] # <<<<<<<<<<<<<< * left = i * */ - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_cur_scope->__pyx_v_left, __pyx_cur_scope->__pyx_v_i, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_cur_scope->__pyx_v_left, __pyx_cur_scope->__pyx_v_i, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1216, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -36449,9 +36475,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __pyx_t_6 = __pyx_cur_scope->__pyx_t_2; __pyx_t_8 = __pyx_cur_scope->__pyx_t_3; __pyx_t_13 = __pyx_cur_scope->__pyx_t_4; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1214, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1216, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1215 + /* "_rnaseq_utils.pyx":1217 * if item.left() > rightmost: # A gap was jumped * yield chrom_annotation_list[left:i] * left = i # <<<<<<<<<<<<<< @@ -36460,7 +36486,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C */ __pyx_cur_scope->__pyx_v_left = __pyx_cur_scope->__pyx_v_i; - /* "_rnaseq_utils.pyx":1213 + /* "_rnaseq_utils.pyx":1215 * item = chrom_annotation_list[i] * if rightmost > 0: * if item.left() > rightmost: # A gap was jumped # <<<<<<<<<<<<<< @@ -36469,7 +36495,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C */ } - /* "_rnaseq_utils.pyx":1212 + /* "_rnaseq_utils.pyx":1214 * for i in range(number_of_items): * item = chrom_annotation_list[i] * if rightmost > 0: # <<<<<<<<<<<<<< @@ -36478,7 +36504,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C */ } - /* "_rnaseq_utils.pyx":1217 + /* "_rnaseq_utils.pyx":1219 * left = i * * if item.span[1] > rightmost: # <<<<<<<<<<<<<< @@ -36488,7 +36514,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __pyx_t_14 = ((__pyx_cur_scope->__pyx_v_item->span.f1 > __pyx_cur_scope->__pyx_v_rightmost) != 0); if (__pyx_t_14) { - /* "_rnaseq_utils.pyx":1218 + /* "_rnaseq_utils.pyx":1220 * * if item.span[1] > rightmost: * rightmost = item.span[1] # <<<<<<<<<<<<<< @@ -36497,7 +36523,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C */ __pyx_cur_scope->__pyx_v_rightmost = __pyx_cur_scope->__pyx_v_item->span.f1; - /* "_rnaseq_utils.pyx":1217 + /* "_rnaseq_utils.pyx":1219 * left = i * * if item.span[1] > rightmost: # <<<<<<<<<<<<<< @@ -36507,14 +36533,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C } } - /* "_rnaseq_utils.pyx":1220 + /* "_rnaseq_utils.pyx":1222 * rightmost = item.span[1] * * yield chrom_annotation_list[left:] # <<<<<<<<<<<<<< * * ######################################### */ - __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_cur_scope->__pyx_v_left, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_cur_scope->__pyx_v_chrom_annotation_list, __pyx_cur_scope->__pyx_v_left, 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_r = __pyx_t_3; __pyx_t_3 = 0; @@ -36532,9 +36558,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1220, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1222, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1201 + /* "_rnaseq_utils.pyx":1203 * cdef int number_of_items, i, left * number_of_files = len(self.annotations) * for chrom in self.chrom_array: # <<<<<<<<<<<<<< @@ -36545,7 +36571,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_rnaseq_utils.pyx":1193 + /* "_rnaseq_utils.pyx":1195 * return children_out * * def generate_loci(self): # <<<<<<<<<<<<<< @@ -36576,7 +36602,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_17AnnotationDataset_8generator(__pyx_C return __pyx_r; } -/* "_rnaseq_utils.pyx":1076 +/* "_rnaseq_utils.pyx":1078 * Has methods that allow these annotations to be merged together to * form a single consensus or to be merged directly into a 'reference' annotation.""" * cdef public dict annotations, gtf_config, gff_config # <<<<<<<<<<<<<< @@ -36634,7 +36660,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_11annotations_2__set__(s const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1076, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1078, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -36734,7 +36760,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_10gtf_config_2__set__(st const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1076, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1078, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -36834,7 +36860,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_10gff_config_2__set__(st const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1076, __pyx_L1_error) + if (!(likely(PyDict_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "dict", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1078, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -36884,7 +36910,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_10gff_config_4__del__(st return __pyx_r; } -/* "_rnaseq_utils.pyx":1077 +/* "_rnaseq_utils.pyx":1079 * form a single consensus or to be merged directly into a 'reference' annotation.""" * cdef public dict annotations, gtf_config, gff_config * cdef public object generator # <<<<<<<<<<<<<< @@ -36979,7 +37005,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_9generator_4__del__(stru return __pyx_r; } -/* "_rnaseq_utils.pyx":1078 +/* "_rnaseq_utils.pyx":1080 * cdef public dict annotations, gtf_config, gff_config * cdef public object generator * cdef public int number_of_assemblies, counter, min_reps, confidence # <<<<<<<<<<<<<< @@ -37009,7 +37035,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_20number_of_assemb int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->number_of_assemblies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->number_of_assemblies); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37047,7 +37073,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_20number_of_assemblies_2 const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error) __pyx_v_self->number_of_assemblies = __pyx_t_1; /* function exit code */ @@ -37083,7 +37109,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_7counter___get__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37121,7 +37147,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_7counter_2__set__(struct const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error) __pyx_v_self->counter = __pyx_t_1; /* function exit code */ @@ -37157,7 +37183,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_8min_reps___get__( int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->min_reps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->min_reps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37195,7 +37221,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_8min_reps_2__set__(struc const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error) __pyx_v_self->min_reps = __pyx_t_1; /* function exit code */ @@ -37231,7 +37257,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_10confidence___get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->confidence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->confidence); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37269,7 +37295,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_10confidence_2__set__(st const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1078, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1080, __pyx_L1_error) __pyx_v_self->confidence = __pyx_t_1; /* function exit code */ @@ -37283,7 +37309,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_10confidence_2__set__(st return __pyx_r; } -/* "_rnaseq_utils.pyx":1079 +/* "_rnaseq_utils.pyx":1081 * cdef public object generator * cdef public int number_of_assemblies, counter, min_reps, confidence * cdef public float cap_bonus # <<<<<<<<<<<<<< @@ -37313,7 +37339,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_9cap_bonus___get__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->cap_bonus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->cap_bonus); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1081, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37351,7 +37377,7 @@ static int __pyx_pf_13_rnaseq_utils_17AnnotationDataset_9cap_bonus_2__set__(stru const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__set__", 0); - __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1079, __pyx_L1_error) + __pyx_t_1 = __pyx_PyFloat_AsFloat(__pyx_v_value); if (unlikely((__pyx_t_1 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1081, __pyx_L1_error) __pyx_v_self->cap_bonus = __pyx_t_1; /* function exit code */ @@ -38031,7 +38057,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17AnnotationDataset_11__setstate_cytho } static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_rnaseq_utils.pyx":1235 +/* "_rnaseq_utils.pyx":1237 * } * * def array_to_blocks(list arr): # <<<<<<<<<<<<<< @@ -38050,7 +38076,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_1array_to_blocks(PyObject *__pyx_self, PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("array_to_blocks (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), (&PyList_Type), 1, "arr", 1))) __PYX_ERR(0, 1235, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_arr), (&PyList_Type), 1, "arr", 1))) __PYX_ERR(0, 1237, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_array_to_blocks(__pyx_self, ((PyObject*)__pyx_v_arr)); /* function exit code */ @@ -38074,7 +38100,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_array_to_blocks(CYTHON_UNUSED PyObject if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_3_array_to_blocks *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1235, __pyx_L1_error) + __PYX_ERR(0, 1237, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -38082,7 +38108,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_array_to_blocks(CYTHON_UNUSED PyObject __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arr); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arr); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_2generator1, __pyx_codeobj__42, (PyObject *) __pyx_cur_scope, __pyx_n_s_array_to_blocks, __pyx_n_s_array_to_blocks, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_2generator1, __pyx_codeobj__42, (PyObject *) __pyx_cur_scope, __pyx_n_s_array_to_blocks, __pyx_n_s_array_to_blocks, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -38126,9 +38152,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1235, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1237, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1240 + /* "_rnaseq_utils.pyx":1242 * cdef list clean_array * cdef int block_start, block_end, i * clean_array = sorted(list(set([i for i in arr if type(i) is int]))) # <<<<<<<<<<<<<< @@ -38136,55 +38162,55 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p * raise StopIteration */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); if (unlikely(__pyx_cur_scope->__pyx_v_arr == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1240, __pyx_L1_error) + __PYX_ERR(0, 1242, __pyx_L1_error) } __pyx_t_3 = __pyx_cur_scope->__pyx_v_arr; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1242, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_cur_scope->__pyx_9genexpr31__pyx_v_i = __pyx_t_6; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_9genexpr31__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_9genexpr31__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = (((PyObject *)Py_TYPE(__pyx_t_5)) == ((PyObject *)(&PyInt_Type))); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_9genexpr31__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_9genexpr31__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1240, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } /* exit inner scope */ - __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_3 = PySet_New(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_2 = PySequence_List(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_3 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1240, __pyx_L1_error) + __pyx_t_9 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_clean_array = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1241 + /* "_rnaseq_utils.pyx":1243 * cdef int block_start, block_end, i * clean_array = sorted(list(set([i for i in arr if type(i) is int]))) * if len(clean_array) == 0: # <<<<<<<<<<<<<< @@ -38193,13 +38219,13 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ if (unlikely(__pyx_cur_scope->__pyx_v_clean_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1241, __pyx_L1_error) + __PYX_ERR(0, 1243, __pyx_L1_error) } - __pyx_t_4 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_clean_array); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_t_4 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_clean_array); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1243, __pyx_L1_error) __pyx_t_8 = ((__pyx_t_4 == 0) != 0); if (unlikely(__pyx_t_8)) { - /* "_rnaseq_utils.pyx":1242 + /* "_rnaseq_utils.pyx":1244 * clean_array = sorted(list(set([i for i in arr if type(i) is int]))) * if len(clean_array) == 0: * raise StopIteration # <<<<<<<<<<<<<< @@ -38207,9 +38233,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p * block_start = clean_array[0] */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 1242, __pyx_L1_error) + __PYX_ERR(0, 1244, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1241 + /* "_rnaseq_utils.pyx":1243 * cdef int block_start, block_end, i * clean_array = sorted(list(set([i for i in arr if type(i) is int]))) * if len(clean_array) == 0: # <<<<<<<<<<<<<< @@ -38218,7 +38244,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ } - /* "_rnaseq_utils.pyx":1244 + /* "_rnaseq_utils.pyx":1246 * raise StopIteration * * block_start = clean_array[0] # <<<<<<<<<<<<<< @@ -38227,15 +38253,15 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ if (unlikely(__pyx_cur_scope->__pyx_v_clean_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1244, __pyx_L1_error) + __PYX_ERR(0, 1246, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_clean_array, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_clean_array, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_block_start = __pyx_t_6; - /* "_rnaseq_utils.pyx":1245 + /* "_rnaseq_utils.pyx":1247 * * block_start = clean_array[0] * block_end = clean_array[0] # <<<<<<<<<<<<<< @@ -38244,15 +38270,15 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ if (unlikely(__pyx_cur_scope->__pyx_v_clean_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1245, __pyx_L1_error) + __PYX_ERR(0, 1247, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_clean_array, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1245, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_clean_array, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1245, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1247, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_block_end = __pyx_t_6; - /* "_rnaseq_utils.pyx":1246 + /* "_rnaseq_utils.pyx":1248 * block_start = clean_array[0] * block_end = clean_array[0] * if len(arr) == 1: # <<<<<<<<<<<<<< @@ -38261,24 +38287,24 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ if (unlikely(__pyx_cur_scope->__pyx_v_arr == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1246, __pyx_L1_error) + __PYX_ERR(0, 1248, __pyx_L1_error) } - __pyx_t_4 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_arr); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1246, __pyx_L1_error) + __pyx_t_4 = PyList_GET_SIZE(__pyx_cur_scope->__pyx_v_arr); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1248, __pyx_L1_error) __pyx_t_8 = ((__pyx_t_4 == 1) != 0); if (unlikely(__pyx_t_8)) { - /* "_rnaseq_utils.pyx":1247 + /* "_rnaseq_utils.pyx":1249 * block_end = clean_array[0] * if len(arr) == 1: * yield (block_start, block_end) # <<<<<<<<<<<<<< * raise StopIteration * */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1247, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1247, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1247, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); @@ -38295,9 +38321,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p __pyx_generator->resume_label = 1; return __pyx_r; __pyx_L9_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1247, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1249, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1248 + /* "_rnaseq_utils.pyx":1250 * if len(arr) == 1: * yield (block_start, block_end) * raise StopIteration # <<<<<<<<<<<<<< @@ -38305,9 +38331,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p * for i in clean_array[1:]: */ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0); - __PYX_ERR(0, 1248, __pyx_L1_error) + __PYX_ERR(0, 1250, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1246 + /* "_rnaseq_utils.pyx":1248 * block_start = clean_array[0] * block_end = clean_array[0] * if len(arr) == 1: # <<<<<<<<<<<<<< @@ -38316,7 +38342,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ } - /* "_rnaseq_utils.pyx":1250 + /* "_rnaseq_utils.pyx":1252 * raise StopIteration * * for i in clean_array[1:]: # <<<<<<<<<<<<<< @@ -38325,25 +38351,25 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ if (unlikely(__pyx_cur_scope->__pyx_v_clean_array == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1250, __pyx_L1_error) + __PYX_ERR(0, 1252, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_clean_array, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_clean_array, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1252, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1252, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_cur_scope->__pyx_v_i = __pyx_t_6; - /* "_rnaseq_utils.pyx":1251 + /* "_rnaseq_utils.pyx":1253 * * for i in clean_array[1:]: * if i-1 == block_end: # <<<<<<<<<<<<<< @@ -38353,7 +38379,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p __pyx_t_8 = (((__pyx_cur_scope->__pyx_v_i - 1) == __pyx_cur_scope->__pyx_v_block_end) != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":1252 + /* "_rnaseq_utils.pyx":1254 * for i in clean_array[1:]: * if i-1 == block_end: * block_end = i # <<<<<<<<<<<<<< @@ -38362,7 +38388,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ __pyx_cur_scope->__pyx_v_block_end = __pyx_cur_scope->__pyx_v_i; - /* "_rnaseq_utils.pyx":1251 + /* "_rnaseq_utils.pyx":1253 * * for i in clean_array[1:]: * if i-1 == block_end: # <<<<<<<<<<<<<< @@ -38372,7 +38398,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p goto __pyx_L12; } - /* "_rnaseq_utils.pyx":1254 + /* "_rnaseq_utils.pyx":1256 * block_end = i * else: * yield (block_start, block_end) # <<<<<<<<<<<<<< @@ -38380,11 +38406,11 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p * block_end = i */ /*else*/ { - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1256, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); @@ -38408,9 +38434,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_3); __pyx_t_4 = __pyx_cur_scope->__pyx_t_1; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1254, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1256, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1255 + /* "_rnaseq_utils.pyx":1257 * else: * yield (block_start, block_end) * block_start = i # <<<<<<<<<<<<<< @@ -38419,7 +38445,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p */ __pyx_cur_scope->__pyx_v_block_start = __pyx_cur_scope->__pyx_v_i; - /* "_rnaseq_utils.pyx":1256 + /* "_rnaseq_utils.pyx":1258 * yield (block_start, block_end) * block_start = i * block_end = i # <<<<<<<<<<<<<< @@ -38430,7 +38456,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p } __pyx_L12:; - /* "_rnaseq_utils.pyx":1250 + /* "_rnaseq_utils.pyx":1252 * raise StopIteration * * for i in clean_array[1:]: # <<<<<<<<<<<<<< @@ -38440,18 +38466,18 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1258 + /* "_rnaseq_utils.pyx":1260 * block_end = i * * yield (block_start, block_end) # <<<<<<<<<<<<<< * * cpdef tuple overlap_type(tuple range_a, tuple range_b): */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_block_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -38468,10 +38494,10 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p __pyx_generator->resume_label = 3; return __pyx_r; __pyx_L14_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1258, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1260, __pyx_L1_error) CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_rnaseq_utils.pyx":1235 + /* "_rnaseq_utils.pyx":1237 * } * * def array_to_blocks(list arr): # <<<<<<<<<<<<<< @@ -38499,7 +38525,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_2generator1(__pyx_CoroutineObject *__p return __pyx_r; } -/* "_rnaseq_utils.pyx":1260 +/* "_rnaseq_utils.pyx":1262 * yield (block_start, block_end) * * cpdef tuple overlap_type(tuple range_a, tuple range_b): # <<<<<<<<<<<<<< @@ -38527,7 +38553,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_overlap_type(PyObject *__pyx_v_range_a, int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlap_type", 0); - /* "_rnaseq_utils.pyx":1264 + /* "_rnaseq_utils.pyx":1266 * between the edges of range_a and range_b""" * cdef int LL, LR, RL, RR * LL = range_a[0] >= range_b[0] # <<<<<<<<<<<<<< @@ -38536,24 +38562,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_overlap_type(PyObject *__pyx_v_range_a, */ if (unlikely(__pyx_v_range_a == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1264, __pyx_L1_error) + __PYX_ERR(0, 1266, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_range_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_range_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_range_b == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1264, __pyx_L1_error) + __PYX_ERR(0, 1266, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_range_b, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_range_b, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_LL = __pyx_t_4; - /* "_rnaseq_utils.pyx":1265 + /* "_rnaseq_utils.pyx":1267 * cdef int LL, LR, RL, RR * LL = range_a[0] >= range_b[0] * LR = range_a[0] >= range_b[1] # <<<<<<<<<<<<<< @@ -38562,24 +38588,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_overlap_type(PyObject *__pyx_v_range_a, */ if (unlikely(__pyx_v_range_a == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1265, __pyx_L1_error) + __PYX_ERR(0, 1267, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_range_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_range_a, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_range_b == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1265, __pyx_L1_error) + __PYX_ERR(0, 1267, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_range_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_range_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_LR = __pyx_t_4; - /* "_rnaseq_utils.pyx":1266 + /* "_rnaseq_utils.pyx":1268 * LL = range_a[0] >= range_b[0] * LR = range_a[0] >= range_b[1] * RL = range_a[1] >= range_b[0] # <<<<<<<<<<<<<< @@ -38588,24 +38614,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_overlap_type(PyObject *__pyx_v_range_a, */ if (unlikely(__pyx_v_range_a == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1266, __pyx_L1_error) + __PYX_ERR(0, 1268, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_range_a, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v_range_a, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_range_b == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1266, __pyx_L1_error) + __PYX_ERR(0, 1268, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_range_b, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_range_b, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_RL = __pyx_t_4; - /* "_rnaseq_utils.pyx":1267 + /* "_rnaseq_utils.pyx":1269 * LR = range_a[0] >= range_b[1] * RL = range_a[1] >= range_b[0] * RR = range_a[1] >= range_b[1] # <<<<<<<<<<<<<< @@ -38614,39 +38640,39 @@ static PyObject *__pyx_f_13_rnaseq_utils_overlap_type(PyObject *__pyx_v_range_a, */ if (unlikely(__pyx_v_range_a == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1267, __pyx_L1_error) + __PYX_ERR(0, 1269, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_range_a, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_Tuple(__pyx_v_range_a, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_range_b == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1267, __pyx_L1_error) + __PYX_ERR(0, 1269, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_range_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_Tuple(__pyx_v_range_b, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_RR = __pyx_t_4; - /* "_rnaseq_utils.pyx":1268 + /* "_rnaseq_utils.pyx":1270 * RL = range_a[1] >= range_b[0] * RR = range_a[1] >= range_b[1] * cdef tuple overlap_pattern = (LL, LR, RL, RR) # <<<<<<<<<<<<<< * return overlap_pattern * */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_LL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_LL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_LR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_LR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_RL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_RL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_RR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_RR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_1); @@ -38663,7 +38689,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_overlap_type(PyObject *__pyx_v_range_a, __pyx_v_overlap_pattern = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":1269 + /* "_rnaseq_utils.pyx":1271 * RR = range_a[1] >= range_b[1] * cdef tuple overlap_pattern = (LL, LR, RL, RR) * return overlap_pattern # <<<<<<<<<<<<<< @@ -38675,7 +38701,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_overlap_type(PyObject *__pyx_v_range_a, __pyx_r = __pyx_v_overlap_pattern; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1260 + /* "_rnaseq_utils.pyx":1262 * yield (block_start, block_end) * * cpdef tuple overlap_type(tuple range_a, tuple range_b): # <<<<<<<<<<<<<< @@ -38734,11 +38760,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_4overlap_type(PyObject *__pyx_self, Py case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_range_b)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("overlap_type", 1, 2, 2, 1); __PYX_ERR(0, 1260, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("overlap_type", 1, 2, 2, 1); __PYX_ERR(0, 1262, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlap_type") < 0)) __PYX_ERR(0, 1260, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "overlap_type") < 0)) __PYX_ERR(0, 1262, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -38751,14 +38777,14 @@ static PyObject *__pyx_pw_13_rnaseq_utils_4overlap_type(PyObject *__pyx_self, Py } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("overlap_type", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1260, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("overlap_type", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1262, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.overlap_type", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_range_a), (&PyTuple_Type), 1, "range_a", 1))) __PYX_ERR(0, 1260, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_range_b), (&PyTuple_Type), 1, "range_b", 1))) __PYX_ERR(0, 1260, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_range_a), (&PyTuple_Type), 1, "range_a", 1))) __PYX_ERR(0, 1262, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_range_b), (&PyTuple_Type), 1, "range_b", 1))) __PYX_ERR(0, 1262, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_3overlap_type(__pyx_self, __pyx_v_range_a, __pyx_v_range_b); /* function exit code */ @@ -38779,7 +38805,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_3overlap_type(CYTHON_UNUSED PyObject * int __pyx_clineno = 0; __Pyx_RefNannySetupContext("overlap_type", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_overlap_type(__pyx_v_range_a, __pyx_v_range_b, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_overlap_type(__pyx_v_range_a, __pyx_v_range_b, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -38796,7 +38822,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_3overlap_type(CYTHON_UNUSED PyObject * return __pyx_r; } -/* "_rnaseq_utils.pyx":1271 +/* "_rnaseq_utils.pyx":1273 * return overlap_pattern * * cpdef list flatten(list list_of_lists): # <<<<<<<<<<<<<< @@ -38822,7 +38848,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_flatten(PyObject *__pyx_v_list_of_lists int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flatten", 0); - /* "_rnaseq_utils.pyx":1272 + /* "_rnaseq_utils.pyx":1274 * * cpdef list flatten(list list_of_lists): * return [item for sublist in list_of_lists for item in sublist] # <<<<<<<<<<<<<< @@ -38831,19 +38857,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_flatten(PyObject *__pyx_v_list_of_lists */ __Pyx_XDECREF(__pyx_r); { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_list_of_lists == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1272, __pyx_L5_error) + __PYX_ERR(0, 1274, __pyx_L5_error) } __pyx_t_2 = __pyx_v_list_of_lists; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1274, __pyx_L5_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_9genexpr32__pyx_v_sublist, __pyx_t_4); @@ -38852,26 +38878,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_flatten(PyObject *__pyx_v_list_of_lists __pyx_t_4 = __pyx_9genexpr32__pyx_v_sublist; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_9genexpr32__pyx_v_sublist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_9genexpr32__pyx_v_sublist); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1274, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_6)) { if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1274, __pyx_L5_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1274, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_7); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1274, __pyx_L5_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1272, __pyx_L5_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1274, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -38881,7 +38907,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_flatten(PyObject *__pyx_v_list_of_lists PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1272, __pyx_L5_error) + else __PYX_ERR(0, 1274, __pyx_L5_error) } break; } @@ -38889,7 +38915,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_flatten(PyObject *__pyx_v_list_of_lists } __Pyx_XDECREF_SET(__pyx_9genexpr32__pyx_v_item, __pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr32__pyx_v_item))) __PYX_ERR(0, 1272, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_9genexpr32__pyx_v_item))) __PYX_ERR(0, 1274, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } @@ -38907,7 +38933,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_flatten(PyObject *__pyx_v_list_of_lists __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1271 + /* "_rnaseq_utils.pyx":1273 * return overlap_pattern * * cpdef list flatten(list list_of_lists): # <<<<<<<<<<<<<< @@ -38940,7 +38966,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_6flatten(PyObject *__pyx_self, PyObjec PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("flatten (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_lists), (&PyList_Type), 1, "list_of_lists", 1))) __PYX_ERR(0, 1271, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_lists), (&PyList_Type), 1, "list_of_lists", 1))) __PYX_ERR(0, 1273, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_5flatten(__pyx_self, ((PyObject*)__pyx_v_list_of_lists)); /* function exit code */ @@ -38961,7 +38987,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_5flatten(CYTHON_UNUSED PyObject *__pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("flatten", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_flatten(__pyx_v_list_of_lists, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_flatten(__pyx_v_list_of_lists, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -38978,7 +39004,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_5flatten(CYTHON_UNUSED PyObject *__pyx return __pyx_r; } -/* "_rnaseq_utils.pyx":1274 +/* "_rnaseq_utils.pyx":1276 * return [item for sublist in list_of_lists for item in sublist] * * cpdef list collapse_blocks(list list_of_doubles): # <<<<<<<<<<<<<< @@ -39014,7 +39040,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("collapse_blocks", 0); - /* "_rnaseq_utils.pyx":1281 + /* "_rnaseq_utils.pyx":1283 * cdef bint previous_block_exists * cdef int overlap, merged_left, merged_right * list_of_doubles.sort() # <<<<<<<<<<<<<< @@ -39023,23 +39049,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ */ if (unlikely(__pyx_v_list_of_doubles == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "sort"); - __PYX_ERR(0, 1281, __pyx_L1_error) + __PYX_ERR(0, 1283, __pyx_L1_error) } - __pyx_t_1 = PyList_Sort(__pyx_v_list_of_doubles); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_1 = PyList_Sort(__pyx_v_list_of_doubles); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 1283, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1282 + /* "_rnaseq_utils.pyx":1284 * cdef int overlap, merged_left, merged_right * list_of_doubles.sort() * new_blocks = [] # <<<<<<<<<<<<<< * previous_block_exists = False * for current_block in list_of_doubles: */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_new_blocks = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1283 + /* "_rnaseq_utils.pyx":1285 * list_of_doubles.sort() * new_blocks = [] * previous_block_exists = False # <<<<<<<<<<<<<< @@ -39048,7 +39074,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ */ __pyx_v_previous_block_exists = 0; - /* "_rnaseq_utils.pyx":1284 + /* "_rnaseq_utils.pyx":1286 * new_blocks = [] * previous_block_exists = False * for current_block in list_of_doubles: # <<<<<<<<<<<<<< @@ -39057,22 +39083,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ */ if (unlikely(__pyx_v_list_of_doubles == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1284, __pyx_L1_error) + __PYX_ERR(0, 1286, __pyx_L1_error) } __pyx_t_2 = __pyx_v_list_of_doubles; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1286, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif - __pyx_t_5 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_5 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_4); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1286, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_current_block = __pyx_t_5; - /* "_rnaseq_utils.pyx":1285 + /* "_rnaseq_utils.pyx":1287 * previous_block_exists = False * for current_block in list_of_doubles: * if previous_block_exists: # <<<<<<<<<<<<<< @@ -39082,31 +39108,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ __pyx_t_6 = (__pyx_v_previous_block_exists != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1287 + /* "_rnaseq_utils.pyx":1289 * if previous_block_exists: * # Get the overlap type of the two adjacent blocks * overlap = sum(overlap_type(current_block, previous_block)) # <<<<<<<<<<<<<< * if overlap > 0 and overlap < 4: * # The two blocks do overlap to some degree */ - __pyx_t_4 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_current_block); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_4 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_current_block); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(PyTuple_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1287, __pyx_L1_error) - __pyx_t_7 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_previous_block); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1287, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_4))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1289, __pyx_L1_error) + __pyx_t_7 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_previous_block); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!(likely(PyTuple_CheckExact(__pyx_t_7))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1287, __pyx_L1_error) - __pyx_t_8 = __pyx_f_13_rnaseq_utils_overlap_type(((PyObject*)__pyx_t_4), ((PyObject*)__pyx_t_7), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1287, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_7))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1289, __pyx_L1_error) + __pyx_t_8 = __pyx_f_13_rnaseq_utils_overlap_type(((PyObject*)__pyx_t_4), ((PyObject*)__pyx_t_7), 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_overlap = __pyx_t_9; - /* "_rnaseq_utils.pyx":1288 + /* "_rnaseq_utils.pyx":1290 * # Get the overlap type of the two adjacent blocks * overlap = sum(overlap_type(current_block, previous_block)) * if overlap > 0 and overlap < 4: # <<<<<<<<<<<<<< @@ -39124,7 +39150,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ __pyx_L7_bool_binop_done:; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1290 + /* "_rnaseq_utils.pyx":1292 * if overlap > 0 and overlap < 4: * # The two blocks do overlap to some degree * merged_left = min(previous_block[0],current_block[0]) # <<<<<<<<<<<<<< @@ -39140,7 +39166,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ } __pyx_v_merged_left = __pyx_t_12; - /* "_rnaseq_utils.pyx":1291 + /* "_rnaseq_utils.pyx":1293 * # The two blocks do overlap to some degree * merged_left = min(previous_block[0],current_block[0]) * merged_right = max(previous_block[-1],current_block[-1]) # <<<<<<<<<<<<<< @@ -39156,7 +39182,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ } __pyx_v_merged_right = __pyx_t_11; - /* "_rnaseq_utils.pyx":1292 + /* "_rnaseq_utils.pyx":1294 * merged_left = min(previous_block[0],current_block[0]) * merged_right = max(previous_block[-1],current_block[-1]) * current_block = (merged_left, merged_right) # <<<<<<<<<<<<<< @@ -39167,7 +39193,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ __pyx_t_5.f1 = __pyx_v_merged_right; __pyx_v_current_block = __pyx_t_5; - /* "_rnaseq_utils.pyx":1288 + /* "_rnaseq_utils.pyx":1290 * # Get the overlap type of the two adjacent blocks * overlap = sum(overlap_type(current_block, previous_block)) * if overlap > 0 and overlap < 4: # <<<<<<<<<<<<<< @@ -39177,7 +39203,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ goto __pyx_L6; } - /* "_rnaseq_utils.pyx":1294 + /* "_rnaseq_utils.pyx":1296 * current_block = (merged_left, merged_right) * else: * new_blocks += [previous_block] # <<<<<<<<<<<<<< @@ -39185,14 +39211,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ * # Update the last block */ /*else*/ { - __pyx_t_7 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_previous_block); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_7 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_previous_block); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_8 = PyList_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_new_blocks, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_new_blocks, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF_SET(__pyx_v_new_blocks, ((PyObject*)__pyx_t_7)); @@ -39200,7 +39226,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ } __pyx_L6:; - /* "_rnaseq_utils.pyx":1285 + /* "_rnaseq_utils.pyx":1287 * previous_block_exists = False * for current_block in list_of_doubles: * if previous_block_exists: # <<<<<<<<<<<<<< @@ -39209,7 +39235,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ */ } - /* "_rnaseq_utils.pyx":1297 + /* "_rnaseq_utils.pyx":1299 * * # Update the last block * previous_block = current_block # <<<<<<<<<<<<<< @@ -39218,7 +39244,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ */ __pyx_v_previous_block = __pyx_v_current_block; - /* "_rnaseq_utils.pyx":1298 + /* "_rnaseq_utils.pyx":1300 * # Update the last block * previous_block = current_block * if not previous_block_exists: # <<<<<<<<<<<<<< @@ -39228,7 +39254,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ __pyx_t_6 = ((!(__pyx_v_previous_block_exists != 0)) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1299 + /* "_rnaseq_utils.pyx":1301 * previous_block = current_block * if not previous_block_exists: * previous_block_exists = True # <<<<<<<<<<<<<< @@ -39237,7 +39263,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ */ __pyx_v_previous_block_exists = 1; - /* "_rnaseq_utils.pyx":1298 + /* "_rnaseq_utils.pyx":1300 * # Update the last block * previous_block = current_block * if not previous_block_exists: # <<<<<<<<<<<<<< @@ -39246,7 +39272,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ */ } - /* "_rnaseq_utils.pyx":1284 + /* "_rnaseq_utils.pyx":1286 * new_blocks = [] * previous_block_exists = False * for current_block in list_of_doubles: # <<<<<<<<<<<<<< @@ -39256,27 +39282,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1302 + /* "_rnaseq_utils.pyx":1304 * * # Resolve the last block * new_blocks += [previous_block] # <<<<<<<<<<<<<< * return new_blocks * */ - __pyx_t_2 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_previous_block); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_2 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_previous_block); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyList_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_new_blocks, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_new_blocks, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_new_blocks, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1303 + /* "_rnaseq_utils.pyx":1305 * # Resolve the last block * new_blocks += [previous_block] * return new_blocks # <<<<<<<<<<<<<< @@ -39288,7 +39314,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_collapse_blocks(PyObject *__pyx_v_list_ __pyx_r = __pyx_v_new_blocks; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1274 + /* "_rnaseq_utils.pyx":1276 * return [item for sublist in list_of_lists for item in sublist] * * cpdef list collapse_blocks(list list_of_doubles): # <<<<<<<<<<<<<< @@ -39321,7 +39347,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_8collapse_blocks(PyObject *__pyx_self, PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("collapse_blocks (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_doubles), (&PyList_Type), 1, "list_of_doubles", 1))) __PYX_ERR(0, 1274, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_doubles), (&PyList_Type), 1, "list_of_doubles", 1))) __PYX_ERR(0, 1276, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_7collapse_blocks(__pyx_self, ((PyObject*)__pyx_v_list_of_doubles)); /* function exit code */ @@ -39342,7 +39368,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_7collapse_blocks(CYTHON_UNUSED PyObjec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("collapse_blocks", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_collapse_blocks(__pyx_v_list_of_doubles, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1274, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_collapse_blocks(__pyx_v_list_of_doubles, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -39359,7 +39385,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_7collapse_blocks(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "_rnaseq_utils.pyx":1305 +/* "_rnaseq_utils.pyx":1307 * return new_blocks * * cdef list get_block_ranges(str chromStart, str blockStarts, str blockSizes): # <<<<<<<<<<<<<< @@ -39397,7 +39423,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_block_ranges", 0); - /* "_rnaseq_utils.pyx":1310 + /* "_rnaseq_utils.pyx":1312 * cdef int c, i, number_of_blocks, l, r, start, size * cdef str s * sizes = [int(s) for s in blockSizes.rstrip(',').split(',')] # <<<<<<<<<<<<<< @@ -39405,11 +39431,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro * c = int(chromStart) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_blockSizes, __pyx_kp_u__14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_3 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_blockSizes, __pyx_kp_u__14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = NULL; @@ -39424,16 +39450,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_kp_u__14) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_kp_u__14); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L5_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) { __pyx_t_4 = __pyx_t_2; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1312, __pyx_L5_error) } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; for (;;) { @@ -39441,17 +39467,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_2 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1312, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_2); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1312, __pyx_L5_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); #endif } @@ -39461,18 +39487,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1310, __pyx_L5_error) + else __PYX_ERR(0, 1312, __pyx_L5_error) } break; } __Pyx_GOTREF(__pyx_t_2); } - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1310, __pyx_L5_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_XDECREF_SET(__pyx_9genexpr33__pyx_v_s, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_9genexpr33__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L5_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_9genexpr33__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1310, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) __PYX_ERR(0, 1312, __pyx_L5_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -39486,7 +39512,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro __pyx_v_sizes = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1311 + /* "_rnaseq_utils.pyx":1313 * cdef str s * sizes = [int(s) for s in blockSizes.rstrip(',').split(',')] * starts = [int(s) for s in blockStarts.rstrip(',').split(',')] # <<<<<<<<<<<<<< @@ -39494,11 +39520,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro * number_of_blocks = len(sizes) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_blockStarts, __pyx_kp_u__14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_2 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_blockStarts, __pyx_kp_u__14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -39513,16 +39539,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro } __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u__14) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__14); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L11_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1313, __pyx_L11_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -39530,17 +39556,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro if (likely(PyList_CheckExact(__pyx_t_3))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1313, __pyx_L11_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1313, __pyx_L11_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -39550,18 +39576,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1311, __pyx_L11_error) + else __PYX_ERR(0, 1313, __pyx_L11_error) } break; } __Pyx_GOTREF(__pyx_t_4); } - if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1311, __pyx_L11_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_XDECREF_SET(__pyx_9genexpr34__pyx_v_s, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_9genexpr34__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1311, __pyx_L11_error) + __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_9genexpr34__pyx_v_s); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1311, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1313, __pyx_L11_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -39575,37 +39601,37 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro __pyx_v_starts = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1312 + /* "_rnaseq_utils.pyx":1314 * sizes = [int(s) for s in blockSizes.rstrip(',').split(',')] * starts = [int(s) for s in blockStarts.rstrip(',').split(',')] * c = int(chromStart) # <<<<<<<<<<<<<< * number_of_blocks = len(sizes) * block_ranges = [()] * number_of_blocks */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_chromStart); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_chromStart); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_c = __pyx_t_7; - /* "_rnaseq_utils.pyx":1313 + /* "_rnaseq_utils.pyx":1315 * starts = [int(s) for s in blockStarts.rstrip(',').split(',')] * c = int(chromStart) * number_of_blocks = len(sizes) # <<<<<<<<<<<<<< * block_ranges = [()] * number_of_blocks * for i in range(number_of_blocks): */ - __pyx_t_5 = PyList_GET_SIZE(__pyx_v_sizes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_sizes); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1315, __pyx_L1_error) __pyx_v_number_of_blocks = __pyx_t_5; - /* "_rnaseq_utils.pyx":1314 + /* "_rnaseq_utils.pyx":1316 * c = int(chromStart) * number_of_blocks = len(sizes) * block_ranges = [()] * number_of_blocks # <<<<<<<<<<<<<< * for i in range(number_of_blocks): * start = starts[i] */ - __pyx_t_1 = PyList_New(1 * ((__pyx_v_number_of_blocks<0) ? 0:__pyx_v_number_of_blocks)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_1 = PyList_New(1 * ((__pyx_v_number_of_blocks<0) ? 0:__pyx_v_number_of_blocks)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < __pyx_v_number_of_blocks; __pyx_temp++) { @@ -39617,7 +39643,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro __pyx_v_block_ranges = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1315 + /* "_rnaseq_utils.pyx":1317 * number_of_blocks = len(sizes) * block_ranges = [()] * number_of_blocks * for i in range(number_of_blocks): # <<<<<<<<<<<<<< @@ -39629,33 +39655,33 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_i = __pyx_t_9; - /* "_rnaseq_utils.pyx":1316 + /* "_rnaseq_utils.pyx":1318 * block_ranges = [()] * number_of_blocks * for i in range(number_of_blocks): * start = starts[i] # <<<<<<<<<<<<<< * size = sizes[i] * l = c+start */ - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_starts, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_starts, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1316, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_start = __pyx_t_10; - /* "_rnaseq_utils.pyx":1317 + /* "_rnaseq_utils.pyx":1319 * for i in range(number_of_blocks): * start = starts[i] * size = sizes[i] # <<<<<<<<<<<<<< * l = c+start * r = l+size */ - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_sizes, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_sizes, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_size = __pyx_t_10; - /* "_rnaseq_utils.pyx":1318 + /* "_rnaseq_utils.pyx":1320 * start = starts[i] * size = sizes[i] * l = c+start # <<<<<<<<<<<<<< @@ -39664,7 +39690,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro */ __pyx_v_l = (__pyx_v_c + __pyx_v_start); - /* "_rnaseq_utils.pyx":1319 + /* "_rnaseq_utils.pyx":1321 * size = sizes[i] * l = c+start * r = l+size # <<<<<<<<<<<<<< @@ -39673,18 +39699,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro */ __pyx_v_r = (__pyx_v_l + __pyx_v_size); - /* "_rnaseq_utils.pyx":1320 + /* "_rnaseq_utils.pyx":1322 * l = c+start * r = l+size * block_ranges[i] = (l, r) # <<<<<<<<<<<<<< * * return block_ranges */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1320, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -39692,11 +39718,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_v_block_ranges, __pyx_v_i, __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) __PYX_ERR(0, 1320, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_block_ranges, __pyx_v_i, __pyx_t_4, int, 1, __Pyx_PyInt_From_int, 1, 1, 1) < 0)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - /* "_rnaseq_utils.pyx":1322 + /* "_rnaseq_utils.pyx":1324 * block_ranges[i] = (l, r) * * return block_ranges # <<<<<<<<<<<<<< @@ -39708,7 +39734,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro __pyx_r = __pyx_v_block_ranges; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1305 + /* "_rnaseq_utils.pyx":1307 * return new_blocks * * cdef list get_block_ranges(str chromStart, str blockStarts, str blockSizes): # <<<<<<<<<<<<<< @@ -39735,7 +39761,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_block_ranges(PyObject *__pyx_v_chro return __pyx_r; } -/* "_rnaseq_utils.pyx":1324 +/* "_rnaseq_utils.pyx":1326 * return block_ranges * * cdef explode_block_ranges(block_ranges): # <<<<<<<<<<<<<< @@ -39767,22 +39793,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("explode_block_ranges", 0); - /* "_rnaseq_utils.pyx":1327 + /* "_rnaseq_utils.pyx":1329 * """Converts a list of block ranges generated by get_block_ranges() * back into a set of three variables: chromStart, blockStarts, blockSizes""" * chromStart = block_ranges[0][0] # Leftmost position # <<<<<<<<<<<<<< * blockStarts = [a-chromStart for a,b in block_ranges] * blockSizes = [b-a+1 for a,b in block_ranges] */ - __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_block_ranges, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_block_ranges, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_chromStart = __pyx_t_2; __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1328 + /* "_rnaseq_utils.pyx":1330 * back into a set of three variables: chromStart, blockStarts, blockSizes""" * chromStart = block_ranges[0][0] # Leftmost position * blockStarts = [a-chromStart for a,b in block_ranges] # <<<<<<<<<<<<<< @@ -39790,32 +39816,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ * return chromStart, blockStarts, blockSizes */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_block_ranges)) || PyTuple_CheckExact(__pyx_v_block_ranges)) { __pyx_t_1 = __pyx_v_block_ranges; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_block_ranges); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_block_ranges); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1330, __pyx_L5_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1330, __pyx_L5_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1330, __pyx_L5_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -39825,7 +39851,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1328, __pyx_L5_error) + else __PYX_ERR(0, 1330, __pyx_L5_error) } break; } @@ -39837,7 +39863,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1328, __pyx_L5_error) + __PYX_ERR(0, 1330, __pyx_L5_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -39850,15 +39876,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -39866,7 +39892,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1328, __pyx_L5_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1330, __pyx_L5_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L9_unpacking_done; @@ -39874,16 +39900,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1328, __pyx_L5_error) + __PYX_ERR(0, 1330, __pyx_L5_error) __pyx_L9_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_a, __pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr35__pyx_v_b, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_5 = PyNumber_Subtract(__pyx_9genexpr35__pyx_v_a, __pyx_v_chromStart); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1328, __pyx_L5_error) + __pyx_t_5 = PyNumber_Subtract(__pyx_9genexpr35__pyx_v_a, __pyx_v_chromStart); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1328, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1330, __pyx_L5_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -39899,7 +39925,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __pyx_v_blockStarts = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1329 + /* "_rnaseq_utils.pyx":1331 * chromStart = block_ranges[0][0] # Leftmost position * blockStarts = [a-chromStart for a,b in block_ranges] * blockSizes = [b-a+1 for a,b in block_ranges] # <<<<<<<<<<<<<< @@ -39907,32 +39933,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ * */ { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_2); if (likely(PyList_CheckExact(__pyx_v_block_ranges)) || PyTuple_CheckExact(__pyx_v_block_ranges)) { __pyx_t_1 = __pyx_v_block_ranges; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = NULL; } else { - __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_block_ranges); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_block_ranges); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1331, __pyx_L13_error) } for (;;) { if (likely(!__pyx_t_4)) { if (likely(PyList_CheckExact(__pyx_t_1))) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1331, __pyx_L13_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); #endif } else { if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1331, __pyx_L13_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); #endif } @@ -39942,7 +39968,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1329, __pyx_L13_error) + else __PYX_ERR(0, 1331, __pyx_L13_error) } break; } @@ -39954,7 +39980,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1329, __pyx_L13_error) + __PYX_ERR(0, 1331, __pyx_L13_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -39967,15 +39993,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_6); #else - __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; @@ -39983,7 +40009,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __Pyx_GOTREF(__pyx_t_7); index = 1; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L16_unpacking_failed; __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1329, __pyx_L13_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 1331, __pyx_L13_error) __pyx_t_9 = NULL; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L17_unpacking_done; @@ -39991,19 +40017,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_9 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1329, __pyx_L13_error) + __PYX_ERR(0, 1331, __pyx_L13_error) __pyx_L17_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_9genexpr36__pyx_v_a, __pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF_SET(__pyx_9genexpr36__pyx_v_b, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = PyNumber_Subtract(__pyx_9genexpr36__pyx_v_b, __pyx_9genexpr36__pyx_v_a); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_5 = PyNumber_Subtract(__pyx_9genexpr36__pyx_v_b, __pyx_9genexpr36__pyx_v_a); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1329, __pyx_L13_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1329, __pyx_L13_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1331, __pyx_L13_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -40019,7 +40045,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __pyx_v_blockSizes = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1330 + /* "_rnaseq_utils.pyx":1332 * blockStarts = [a-chromStart for a,b in block_ranges] * blockSizes = [b-a+1 for a,b in block_ranges] * return chromStart, blockStarts, blockSizes # <<<<<<<<<<<<<< @@ -40027,7 +40053,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ * cdef parse_ELR_line(str elr_line): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_chromStart); __Pyx_GIVEREF(__pyx_v_chromStart); @@ -40042,7 +40068,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ __pyx_t_2 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1324 + /* "_rnaseq_utils.pyx":1326 * return block_ranges * * cdef explode_block_ranges(block_ranges): # <<<<<<<<<<<<<< @@ -40073,7 +40099,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_explode_block_ranges(PyObject *__pyx_v_ return __pyx_r; } -/* "_rnaseq_utils.pyx":1332 +/* "_rnaseq_utils.pyx":1334 * return chromStart, blockStarts, blockSizes * * cdef parse_ELR_line(str elr_line): # <<<<<<<<<<<<<< @@ -40145,16 +40171,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li int __pyx_clineno = 0; __Pyx_RefNannySetupContext("parse_ELR_line", 0); - /* "_rnaseq_utils.pyx":1342 + /* "_rnaseq_utils.pyx":1344 * cdef list label_indices, feature_lengths, ranges, splice * cdef bint gap * chrom_num, chromStart, read_len, elr_strand, EL_CIGAR, source_num, weight_string = elr_line.rstrip().split('\t') # <<<<<<<<<<<<<< * if elr_strand == '+': * strand = 1 */ - __pyx_t_2 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_elr_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_2 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyUnicode_Type_rstrip, __pyx_v_elr_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -40169,7 +40195,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__13); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1342, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -40178,7 +40204,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li if (unlikely(size != 7)) { if (size > 7) __Pyx_RaiseTooManyValuesError(7); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1342, __pyx_L1_error) + __PYX_ERR(0, 1344, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -40210,7 +40236,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li Py_ssize_t i; PyObject** temps[7] = {&__pyx_t_3,&__pyx_t_2,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8}; for (i=0; i < 7; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1342, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -40220,7 +40246,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li } else { Py_ssize_t index = -1; PyObject** temps[7] = {&__pyx_t_3,&__pyx_t_2,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8}; - __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1342, __pyx_L1_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; @@ -40229,7 +40255,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 7) < 0) __PYX_ERR(0, 1342, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 7) < 0) __PYX_ERR(0, 1344, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L4_unpacking_done; @@ -40237,16 +40263,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1342, __pyx_L1_error) + __PYX_ERR(0, 1344, __pyx_L1_error) __pyx_L4_unpacking_done:; } - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1342, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1342, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1342, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1342, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1342, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1342, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1342, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1344, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1344, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1344, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1344, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1344, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1344, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1344, __pyx_L1_error) __pyx_v_chrom_num = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; __pyx_v_chromStart = ((PyObject*)__pyx_t_2); @@ -40262,18 +40288,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_v_weight_string = ((PyObject*)__pyx_t_8); __pyx_t_8 = 0; - /* "_rnaseq_utils.pyx":1343 + /* "_rnaseq_utils.pyx":1345 * cdef bint gap * chrom_num, chromStart, read_len, elr_strand, EL_CIGAR, source_num, weight_string = elr_line.rstrip().split('\t') * if elr_strand == '+': # <<<<<<<<<<<<<< * strand = 1 * elif elr_strand == '-': */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_elr_strand, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1343, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_elr_strand, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1345, __pyx_L1_error) __pyx_t_12 = (__pyx_t_11 != 0); if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":1344 + /* "_rnaseq_utils.pyx":1346 * chrom_num, chromStart, read_len, elr_strand, EL_CIGAR, source_num, weight_string = elr_line.rstrip().split('\t') * if elr_strand == '+': * strand = 1 # <<<<<<<<<<<<<< @@ -40282,7 +40308,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __pyx_v_strand = 1; - /* "_rnaseq_utils.pyx":1343 + /* "_rnaseq_utils.pyx":1345 * cdef bint gap * chrom_num, chromStart, read_len, elr_strand, EL_CIGAR, source_num, weight_string = elr_line.rstrip().split('\t') * if elr_strand == '+': # <<<<<<<<<<<<<< @@ -40292,18 +40318,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li goto __pyx_L5; } - /* "_rnaseq_utils.pyx":1345 + /* "_rnaseq_utils.pyx":1347 * if elr_strand == '+': * strand = 1 * elif elr_strand == '-': # <<<<<<<<<<<<<< * strand = -1 * else: */ - __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_v_elr_strand, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1345, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_v_elr_strand, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1347, __pyx_L1_error) __pyx_t_11 = (__pyx_t_12 != 0); if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":1346 + /* "_rnaseq_utils.pyx":1348 * strand = 1 * elif elr_strand == '-': * strand = -1 # <<<<<<<<<<<<<< @@ -40312,7 +40338,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __pyx_v_strand = -1; - /* "_rnaseq_utils.pyx":1345 + /* "_rnaseq_utils.pyx":1347 * if elr_strand == '+': * strand = 1 * elif elr_strand == '-': # <<<<<<<<<<<<<< @@ -40322,7 +40348,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li goto __pyx_L5; } - /* "_rnaseq_utils.pyx":1348 + /* "_rnaseq_utils.pyx":1350 * strand = -1 * else: * strand = 0 # <<<<<<<<<<<<<< @@ -40334,46 +40360,46 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li } __pyx_L5:; - /* "_rnaseq_utils.pyx":1350 + /* "_rnaseq_utils.pyx":1352 * strand = 0 * * chrom = int(chrom_num) # <<<<<<<<<<<<<< * source = int(source_num) * startpos = int(chromStart) */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_chrom_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_chrom_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1350, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_chrom = __pyx_t_13; - /* "_rnaseq_utils.pyx":1351 + /* "_rnaseq_utils.pyx":1353 * * chrom = int(chrom_num) * source = int(source_num) # <<<<<<<<<<<<<< * startpos = int(chromStart) * label_indices = [i for i,character in enumerate(EL_CIGAR) if not character.isdigit()] */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_source_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_source_num); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_source = __pyx_t_13; - /* "_rnaseq_utils.pyx":1352 + /* "_rnaseq_utils.pyx":1354 * chrom = int(chrom_num) * source = int(source_num) * startpos = int(chromStart) # <<<<<<<<<<<<<< * label_indices = [i for i,character in enumerate(EL_CIGAR) if not character.isdigit()] * feature_lengths = [int(EL_CIGAR[a+1:b]) for a,b in zip(label_indices[:-1],label_indices[1:])] */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_chromStart); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_chromStart); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1354, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_startpos = __pyx_t_13; - /* "_rnaseq_utils.pyx":1353 + /* "_rnaseq_utils.pyx":1355 * source = int(source_num) * startpos = int(chromStart) * label_indices = [i for i,character in enumerate(EL_CIGAR) if not character.isdigit()] # <<<<<<<<<<<<<< @@ -40381,25 +40407,25 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li * ranges = [] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L8_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = 0; if (unlikely(__pyx_v_EL_CIGAR == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); - __PYX_ERR(0, 1353, __pyx_L8_error) + __PYX_ERR(0, 1355, __pyx_L8_error) } __Pyx_INCREF(__pyx_v_EL_CIGAR); __pyx_t_14 = __pyx_v_EL_CIGAR; - __pyx_t_19 = __Pyx_init_unicode_iteration(__pyx_t_14, (&__pyx_t_16), (&__pyx_t_17), (&__pyx_t_18)); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1353, __pyx_L8_error) + __pyx_t_19 = __Pyx_init_unicode_iteration(__pyx_t_14, (&__pyx_t_16), (&__pyx_t_17), (&__pyx_t_18)); if (unlikely(__pyx_t_19 == ((int)-1))) __PYX_ERR(0, 1355, __pyx_L8_error) for (__pyx_t_20 = 0; __pyx_t_20 < __pyx_t_16; __pyx_t_20++) { __pyx_t_15 = __pyx_t_20; - __pyx_t_8 = PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_18, __pyx_t_17, __pyx_t_15)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1353, __pyx_L8_error) + __pyx_t_8 = PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_18, __pyx_t_17, __pyx_t_15)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1355, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_XDECREF_SET(__pyx_9genexpr37__pyx_v_character, __pyx_t_8); __pyx_t_8 = 0; __pyx_9genexpr37__pyx_v_i = __pyx_t_13; __pyx_t_13 = (__pyx_t_13 + 1); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr37__pyx_v_character, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1353, __pyx_L8_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr37__pyx_v_character, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1355, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -40413,16 +40439,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li } __pyx_t_8 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1353, __pyx_L8_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1355, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1353, __pyx_L8_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1355, __pyx_L8_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_12 = ((!__pyx_t_11) != 0); if (__pyx_t_12) { - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_9genexpr37__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1353, __pyx_L8_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_9genexpr37__pyx_v_i); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1355, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_8); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1353, __pyx_L8_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1355, __pyx_L8_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } } @@ -40437,7 +40463,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_v_label_indices = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1354 + /* "_rnaseq_utils.pyx":1356 * startpos = int(chromStart) * label_indices = [i for i,character in enumerate(EL_CIGAR) if not character.isdigit()] * feature_lengths = [int(EL_CIGAR[a+1:b]) for a,b in zip(label_indices[:-1],label_indices[1:])] # <<<<<<<<<<<<<< @@ -40445,13 +40471,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li * splice = [] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyList_GetSlice(__pyx_v_label_indices, 0, -1L); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_GetSlice(__pyx_v_label_indices, 0, -1L); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyList_GetSlice(__pyx_v_label_indices, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_GetSlice(__pyx_v_label_indices, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); @@ -40459,16 +40485,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_7); __pyx_t_8 = 0; __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_16 = 0; __pyx_t_21 = NULL; } else { - __pyx_t_16 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_16 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_21 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_21 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_21)) __PYX_ERR(0, 1356, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -40476,17 +40502,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li if (likely(PyList_CheckExact(__pyx_t_6))) { if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1356, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_16 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1356, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -40496,7 +40522,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1354, __pyx_L1_error) + else __PYX_ERR(0, 1356, __pyx_L1_error) } break; } @@ -40508,7 +40534,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1354, __pyx_L1_error) + __PYX_ERR(0, 1356, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -40521,15 +40547,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -40537,7 +40563,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_GOTREF(__pyx_t_8); index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1354, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1356, __pyx_L1_error) __pyx_t_10 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L16_unpacking_done; @@ -40545,25 +40571,25 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1354, __pyx_L1_error) + __PYX_ERR(0, 1356, __pyx_L1_error) __pyx_L16_unpacking_done:; } - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_18 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_18 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_9genexpr38__pyx_v_a = __pyx_t_13; __pyx_9genexpr38__pyx_v_b = __pyx_t_18; if (unlikely(__pyx_v_EL_CIGAR == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1354, __pyx_L1_error) + __PYX_ERR(0, 1356, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_EL_CIGAR, (__pyx_9genexpr38__pyx_v_a + 1), __pyx_9genexpr38__pyx_v_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_EL_CIGAR, (__pyx_9genexpr38__pyx_v_a + 1), __pyx_9genexpr38__pyx_v_b); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1354, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -40571,31 +40597,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_v_feature_lengths = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1355 + /* "_rnaseq_utils.pyx":1357 * label_indices = [i for i,character in enumerate(EL_CIGAR) if not character.isdigit()] * feature_lengths = [int(EL_CIGAR[a+1:b]) for a,b in zip(label_indices[:-1],label_indices[1:])] * ranges = [] # <<<<<<<<<<<<<< * splice = [] * gap = False */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ranges = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1356 + /* "_rnaseq_utils.pyx":1358 * feature_lengths = [int(EL_CIGAR[a+1:b]) for a,b in zip(label_indices[:-1],label_indices[1:])] * ranges = [] * splice = [] # <<<<<<<<<<<<<< * gap = False * position = startpos */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_splice = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1357 + /* "_rnaseq_utils.pyx":1359 * ranges = [] * splice = [] * gap = False # <<<<<<<<<<<<<< @@ -40604,7 +40630,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __pyx_v_gap = 0; - /* "_rnaseq_utils.pyx":1358 + /* "_rnaseq_utils.pyx":1360 * splice = [] * gap = False * position = startpos # <<<<<<<<<<<<<< @@ -40613,7 +40639,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __pyx_v_position = __pyx_v_startpos; - /* "_rnaseq_utils.pyx":1359 + /* "_rnaseq_utils.pyx":1361 * gap = False * position = startpos * for i,f in enumerate(feature_lengths): # <<<<<<<<<<<<<< @@ -40625,18 +40651,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li for (;;) { if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 1361, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_f = __pyx_t_13; __pyx_v_i = __pyx_t_18; __pyx_t_18 = (__pyx_t_18 + 1); - /* "_rnaseq_utils.pyx":1360 + /* "_rnaseq_utils.pyx":1362 * position = startpos * for i,f in enumerate(feature_lengths): * if not gap: # <<<<<<<<<<<<<< @@ -40646,7 +40672,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_t_12 = ((!(__pyx_v_gap != 0)) != 0); if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":1361 + /* "_rnaseq_utils.pyx":1363 * for i,f in enumerate(feature_lengths): * if not gap: * rightside = position + f # <<<<<<<<<<<<<< @@ -40655,18 +40681,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __pyx_v_rightside = (__pyx_v_position + __pyx_v_f); - /* "_rnaseq_utils.pyx":1362 + /* "_rnaseq_utils.pyx":1364 * if not gap: * rightside = position + f * ranges += [(position, rightside)] # <<<<<<<<<<<<<< * position = rightside * else: */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_position); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_position); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rightside); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rightside); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); @@ -40674,18 +40700,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); __pyx_t_6 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_7); PyList_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_ranges, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_ranges, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_ranges, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1363 + /* "_rnaseq_utils.pyx":1365 * rightside = position + f * ranges += [(position, rightside)] * position = rightside # <<<<<<<<<<<<<< @@ -40694,7 +40720,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __pyx_v_position = __pyx_v_rightside; - /* "_rnaseq_utils.pyx":1360 + /* "_rnaseq_utils.pyx":1362 * position = startpos * for i,f in enumerate(feature_lengths): * if not gap: # <<<<<<<<<<<<<< @@ -40704,7 +40730,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li goto __pyx_L19; } - /* "_rnaseq_utils.pyx":1365 + /* "_rnaseq_utils.pyx":1367 * position = rightside * else: * position += f # <<<<<<<<<<<<<< @@ -40714,27 +40740,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li /*else*/ { __pyx_v_position = (__pyx_v_position + __pyx_v_f); - /* "_rnaseq_utils.pyx":1366 + /* "_rnaseq_utils.pyx":1368 * else: * position += f * l_index = label_indices[i] # <<<<<<<<<<<<<< * if EL_CIGAR[l_index] in ['A','D']: * splice += [True] */ - __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_label_indices, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_List(__pyx_v_label_indices, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_l_index = __pyx_t_13; - /* "_rnaseq_utils.pyx":1367 + /* "_rnaseq_utils.pyx":1369 * position += f * l_index = label_indices[i] * if EL_CIGAR[l_index] in ['A','D']: # <<<<<<<<<<<<<< * splice += [True] * else: */ - __pyx_t_22 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, __pyx_v_l_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_22 == (Py_UCS4)-1)) __PYX_ERR(0, 1367, __pyx_L1_error) + __pyx_t_22 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, __pyx_v_l_index, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_22 == (Py_UCS4)-1)) __PYX_ERR(0, 1369, __pyx_L1_error) __pyx_t_11 = ((__pyx_t_22 == 65) != 0); if (!__pyx_t_11) { } else { @@ -40747,25 +40773,25 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_t_11 = (__pyx_t_12 != 0); if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":1368 + /* "_rnaseq_utils.pyx":1370 * l_index = label_indices[i] * if EL_CIGAR[l_index] in ['A','D']: * splice += [True] # <<<<<<<<<<<<<< * else: * splice += [False] */ - __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(Py_True); __Pyx_GIVEREF(Py_True); PyList_SET_ITEM(__pyx_t_7, 0, Py_True); - __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_splice, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_v_splice, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF_SET(__pyx_v_splice, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":1367 + /* "_rnaseq_utils.pyx":1369 * position += f * l_index = label_indices[i] * if EL_CIGAR[l_index] in ['A','D']: # <<<<<<<<<<<<<< @@ -40775,7 +40801,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li goto __pyx_L20; } - /* "_rnaseq_utils.pyx":1370 + /* "_rnaseq_utils.pyx":1372 * splice += [True] * else: * splice += [False] # <<<<<<<<<<<<<< @@ -40783,12 +40809,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li * gap = not gap */ /*else*/ { - __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(Py_False); __Pyx_GIVEREF(Py_False); PyList_SET_ITEM(__pyx_t_5, 0, Py_False); - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_splice, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_v_splice, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_splice, ((PyObject*)__pyx_t_7)); @@ -40798,7 +40824,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li } __pyx_L19:; - /* "_rnaseq_utils.pyx":1372 + /* "_rnaseq_utils.pyx":1374 * splice += [False] * * gap = not gap # <<<<<<<<<<<<<< @@ -40807,7 +40833,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __pyx_v_gap = (!(__pyx_v_gap != 0)); - /* "_rnaseq_utils.pyx":1359 + /* "_rnaseq_utils.pyx":1361 * gap = False * position = startpos * for i,f in enumerate(feature_lengths): # <<<<<<<<<<<<<< @@ -40817,7 +40843,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1374 + /* "_rnaseq_utils.pyx":1376 * gap = not gap * * s_tag = False # <<<<<<<<<<<<<< @@ -40826,7 +40852,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __pyx_v_s_tag = 0; - /* "_rnaseq_utils.pyx":1375 + /* "_rnaseq_utils.pyx":1377 * * s_tag = False * e_tag = False # <<<<<<<<<<<<<< @@ -40836,7 +40862,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_INCREF(Py_False); __pyx_v_e_tag = Py_False; - /* "_rnaseq_utils.pyx":1376 + /* "_rnaseq_utils.pyx":1378 * s_tag = False * e_tag = False * capped = False # <<<<<<<<<<<<<< @@ -40846,47 +40872,47 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_INCREF(Py_False); __pyx_v_capped = Py_False; - /* "_rnaseq_utils.pyx":1377 + /* "_rnaseq_utils.pyx":1379 * e_tag = False * capped = False * first = EL_CIGAR[0].upper() # <<<<<<<<<<<<<< * last = EL_CIGAR[-1].upper() * condensed = first != EL_CIGAR[0] or last != EL_CIGAR[-1] */ - __pyx_t_22 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == (Py_UCS4)-1)) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_t_22 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == (Py_UCS4)-1)) __PYX_ERR(0, 1379, __pyx_L1_error) __pyx_t_23 = Py_UNICODE_TOUPPER(__pyx_t_22); - __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_t_23); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_t_23); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_first = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1378 + /* "_rnaseq_utils.pyx":1380 * capped = False * first = EL_CIGAR[0].upper() * last = EL_CIGAR[-1].upper() # <<<<<<<<<<<<<< * condensed = first != EL_CIGAR[0] or last != EL_CIGAR[-1] * s_tag = first in ['C', 'S'] or last in ['C','S'] */ - __pyx_t_23 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_23 == (Py_UCS4)-1)) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_t_23 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_23 == (Py_UCS4)-1)) __PYX_ERR(0, 1380, __pyx_L1_error) __pyx_t_22 = Py_UNICODE_TOUPPER(__pyx_t_23); - __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_t_1 = PyUnicode_FromOrdinal(__pyx_t_22); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_last = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1379 + /* "_rnaseq_utils.pyx":1381 * first = EL_CIGAR[0].upper() * last = EL_CIGAR[-1].upper() * condensed = first != EL_CIGAR[0] or last != EL_CIGAR[-1] # <<<<<<<<<<<<<< * s_tag = first in ['C', 'S'] or last in ['C','S'] * capped = first == 'C' or last == 'C' */ - __pyx_t_22 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == (Py_UCS4)-1)) __PYX_ERR(0, 1379, __pyx_L1_error) - __pyx_t_7 = PyUnicode_FromOrdinal(__pyx_t_22); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_22 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_22 == (Py_UCS4)-1)) __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_t_7 = PyUnicode_FromOrdinal(__pyx_t_22); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = PyObject_RichCompare(__pyx_v_first, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_v_first, __pyx_t_7, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1381, __pyx_L1_error) if (!__pyx_t_11) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { @@ -40895,10 +40921,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; goto __pyx_L23_bool_binop_done; } - __pyx_t_22 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_22 == (Py_UCS4)-1)) __PYX_ERR(0, 1379, __pyx_L1_error) - __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_t_22); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_22 = __Pyx_GetItemInt_Unicode(__pyx_v_EL_CIGAR, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_22 == (Py_UCS4)-1)) __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_t_22); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyObject_RichCompare(__pyx_v_last, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_v_last, __pyx_t_5, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_INCREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; @@ -40907,7 +40933,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_v_condensed = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1380 + /* "_rnaseq_utils.pyx":1382 * last = EL_CIGAR[-1].upper() * condensed = first != EL_CIGAR[0] or last != EL_CIGAR[-1] * s_tag = first in ['C', 'S'] or last in ['C','S'] # <<<<<<<<<<<<<< @@ -40916,14 +40942,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li */ __Pyx_INCREF(__pyx_v_first); __pyx_t_14 = __pyx_v_first; - __pyx_t_24 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_24 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_24 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error) __pyx_t_25 = (__pyx_t_24 != 0); if (!__pyx_t_25) { } else { __pyx_t_12 = __pyx_t_25; goto __pyx_L27_bool_binop_done; } - __pyx_t_25 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_25 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error) __pyx_t_24 = (__pyx_t_25 != 0); __pyx_t_12 = __pyx_t_24; __pyx_L27_bool_binop_done:; @@ -40936,14 +40962,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li } __Pyx_INCREF(__pyx_v_last); __pyx_t_14 = __pyx_v_last; - __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error) __pyx_t_25 = (__pyx_t_12 != 0); if (!__pyx_t_25) { } else { __pyx_t_24 = __pyx_t_25; goto __pyx_L29_bool_binop_done; } - __pyx_t_25 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_25 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_25 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error) __pyx_t_12 = (__pyx_t_25 != 0); __pyx_t_24 = __pyx_t_12; __pyx_L29_bool_binop_done:; @@ -40953,24 +40979,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_L25_bool_binop_done:; __pyx_v_s_tag = __pyx_t_11; - /* "_rnaseq_utils.pyx":1381 + /* "_rnaseq_utils.pyx":1383 * condensed = first != EL_CIGAR[0] or last != EL_CIGAR[-1] * s_tag = first in ['C', 'S'] or last in ['C','S'] * capped = first == 'C' or last == 'C' # <<<<<<<<<<<<<< * e_tag = first == 'E' or last == 'E' * */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1383, __pyx_L1_error) if (!__pyx_t_11) { } else { - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L31_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1381, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1383, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; @@ -40978,24 +41004,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_DECREF_SET(__pyx_v_capped, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1382 + /* "_rnaseq_utils.pyx":1384 * s_tag = first in ['C', 'S'] or last in ['C','S'] * capped = first == 'C' or last == 'C' * e_tag = first == 'E' or last == 'E' # <<<<<<<<<<<<<< * * # chrom source strand ranges splice s_tag e_tag capped weight */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1384, __pyx_L1_error) if (!__pyx_t_11) { } else { - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; goto __pyx_L33_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = __pyx_t_7; __pyx_t_7 = 0; @@ -41003,7 +41029,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1385 + /* "_rnaseq_utils.pyx":1387 * * # chrom source strand ranges splice s_tag e_tag capped weight * return ELdata(chrom, source, strand, ranges, splice, s_tag, e_tag, capped, weight_string, condensed) # <<<<<<<<<<<<<< @@ -41011,15 +41037,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li * cpdef list get_sources(list list_of_reads): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ELdata); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1385, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_ELdata); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_chrom); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_chrom); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_source); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = NULL; __pyx_t_18 = 0; @@ -41036,7 +41062,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[11] = {__pyx_t_2, __pyx_t_5, __pyx_t_6, __pyx_t_8, __pyx_v_ranges, __pyx_v_splice, __pyx_t_4, __pyx_v_e_tag, __pyx_v_capped, __pyx_v_weight_string, __pyx_v_condensed}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_18, 10+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_18, 10+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -41048,7 +41074,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[11] = {__pyx_t_2, __pyx_t_5, __pyx_t_6, __pyx_t_8, __pyx_v_ranges, __pyx_v_splice, __pyx_t_4, __pyx_v_e_tag, __pyx_v_capped, __pyx_v_weight_string, __pyx_v_condensed}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_18, 10+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_18, 10+__pyx_t_18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -41058,7 +41084,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li } else #endif { - __pyx_t_3 = PyTuple_New(10+__pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(10+__pyx_t_18); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); if (__pyx_t_2) { __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL; @@ -41093,7 +41119,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_t_6 = 0; __pyx_t_8 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } @@ -41102,7 +41128,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1332 + /* "_rnaseq_utils.pyx":1334 * return chromStart, blockStarts, blockSizes * * cdef parse_ELR_line(str elr_line): # <<<<<<<<<<<<<< @@ -41147,7 +41173,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_ELR_line(PyObject *__pyx_v_elr_li return __pyx_r; } -/* "_rnaseq_utils.pyx":1387 +/* "_rnaseq_utils.pyx":1389 * return ELdata(chrom, source, strand, ranges, splice, s_tag, e_tag, capped, weight_string, condensed) * * cpdef list get_sources(list list_of_reads): # <<<<<<<<<<<<<< @@ -41171,7 +41197,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_sources(PyObject *__pyx_v_list_of_r int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sources", 0); - /* "_rnaseq_utils.pyx":1393 + /* "_rnaseq_utils.pyx":1395 * dict source_lookup * * sources = set([read.source for read in list_of_reads]) # <<<<<<<<<<<<<< @@ -41179,27 +41205,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_sources(PyObject *__pyx_v_list_of_r * */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1393, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1395, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_list_of_reads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1393, __pyx_L5_error) + __PYX_ERR(0, 1395, __pyx_L5_error) } __pyx_t_2 = __pyx_v_list_of_reads; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0; for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1393, __pyx_L5_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1395, __pyx_L5_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L5_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); #endif - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1393, __pyx_L5_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1395, __pyx_L5_error) __Pyx_XDECREF_SET(__pyx_9genexpr39__pyx_v_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_9genexpr39__pyx_v_read->source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1393, __pyx_L5_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_9genexpr39__pyx_v_read->source); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1395, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1393, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1395, __pyx_L5_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -41210,13 +41236,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_sources(PyObject *__pyx_v_list_of_r goto __pyx_L1_error; __pyx_L8_exit_scope:; } /* exit inner scope */ - __pyx_t_2 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_2 = PySet_New(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_sources = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1394 + /* "_rnaseq_utils.pyx":1396 * * sources = set([read.source for read in list_of_reads]) * return sorted(list(sources)) # <<<<<<<<<<<<<< @@ -41224,19 +41250,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_sources(PyObject *__pyx_v_list_of_r * cpdef dict get_source_dict(list list_of_sources): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PySequence_List(__pyx_v_sources); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_t_1 = PySequence_List(__pyx_v_sources); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_2 = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = PyList_Sort(__pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_t_5 = PyList_Sort(__pyx_t_2); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 1396, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1387 + /* "_rnaseq_utils.pyx":1389 * return ELdata(chrom, source, strand, ranges, splice, s_tag, e_tag, capped, weight_string, condensed) * * cpdef list get_sources(list list_of_reads): # <<<<<<<<<<<<<< @@ -41268,7 +41294,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_10get_sources(PyObject *__pyx_self, Py PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_sources (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_reads), (&PyList_Type), 1, "list_of_reads", 1))) __PYX_ERR(0, 1387, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_reads), (&PyList_Type), 1, "list_of_reads", 1))) __PYX_ERR(0, 1389, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_9get_sources(__pyx_self, ((PyObject*)__pyx_v_list_of_reads)); /* function exit code */ @@ -41289,7 +41315,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9get_sources(CYTHON_UNUSED PyObject *_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_sources", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_sources(__pyx_v_list_of_reads, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1387, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_sources(__pyx_v_list_of_reads, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -41306,7 +41332,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9get_sources(CYTHON_UNUSED PyObject *_ return __pyx_r; } -/* "_rnaseq_utils.pyx":1396 +/* "_rnaseq_utils.pyx":1398 * return sorted(list(sources)) * * cpdef dict get_source_dict(list list_of_sources): # <<<<<<<<<<<<<< @@ -41328,32 +41354,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_source_dict(PyObject *__pyx_v_list_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_source_dict", 0); - /* "_rnaseq_utils.pyx":1401 + /* "_rnaseq_utils.pyx":1403 * dict source_lookup * * sources = set(list_of_sources) # <<<<<<<<<<<<<< * source_lookup = dict(zip(sources, range(len(sources)))) * return source_lookup */ - __pyx_t_1 = PySet_New(__pyx_v_list_of_sources); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1401, __pyx_L1_error) + __pyx_t_1 = PySet_New(__pyx_v_list_of_sources); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_sources = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1402 + /* "_rnaseq_utils.pyx":1404 * * sources = set(list_of_sources) * source_lookup = dict(zip(sources, range(len(sources)))) # <<<<<<<<<<<<<< * return source_lookup * */ - __pyx_t_2 = PySet_GET_SIZE(__pyx_v_sources); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1402, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_2 = PySet_GET_SIZE(__pyx_v_sources); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1404, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_sources); __Pyx_GIVEREF(__pyx_v_sources); @@ -41361,16 +41387,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_source_dict(PyObject *__pyx_v_list_ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1402, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_source_lookup = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1403 + /* "_rnaseq_utils.pyx":1405 * sources = set(list_of_sources) * source_lookup = dict(zip(sources, range(len(sources)))) * return source_lookup # <<<<<<<<<<<<<< @@ -41382,7 +41408,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_source_dict(PyObject *__pyx_v_list_ __pyx_r = __pyx_v_source_lookup; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1396 + /* "_rnaseq_utils.pyx":1398 * return sorted(list(sources)) * * cpdef dict get_source_dict(list list_of_sources): # <<<<<<<<<<<<<< @@ -41413,7 +41439,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_12get_source_dict(PyObject *__pyx_self PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_source_dict (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_sources), (&PyList_Type), 1, "list_of_sources", 1))) __PYX_ERR(0, 1396, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_sources), (&PyList_Type), 1, "list_of_sources", 1))) __PYX_ERR(0, 1398, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_11get_source_dict(__pyx_self, ((PyObject*)__pyx_v_list_of_sources)); /* function exit code */ @@ -41434,7 +41460,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_11get_source_dict(CYTHON_UNUSED PyObje int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_source_dict", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_source_dict(__pyx_v_list_of_sources, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_source_dict(__pyx_v_list_of_sources, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -41451,7 +41477,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_11get_source_dict(CYTHON_UNUSED PyObje return __pyx_r; } -/* "_rnaseq_utils.pyx":1405 +/* "_rnaseq_utils.pyx":1407 * return source_lookup * * cpdef build_depth_matrix(int leftmost, int rightmost, tuple reads, bint use_attributes=True, bint splice=True): # <<<<<<<<<<<<<< @@ -41534,14 +41560,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } } - /* "_rnaseq_utils.pyx":1420 + /* "_rnaseq_utils.pyx":1422 * np.ndarray depth_matrix * * Sp, Ep, Sm, Em, Cp, Cm, covp, covm, covn = range(9) # <<<<<<<<<<<<<< * array_length = rightmost - leftmost * depth_matrix = np.zeros(shape=(9, array_length), dtype=np.float32) */ - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { PyObject* sequence = __pyx_t_1; @@ -41549,7 +41575,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost if (unlikely(size != 9)) { if (size > 9) __Pyx_RaiseTooManyValuesError(9); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1420, __pyx_L1_error) + __PYX_ERR(0, 1422, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -41587,7 +41613,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost Py_ssize_t i; PyObject** temps[9] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10}; for (i=0; i < 9; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1420, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -41597,7 +41623,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } else { Py_ssize_t index = -1; PyObject** temps[9] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10}; - __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; @@ -41606,7 +41632,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 9) < 0) __PYX_ERR(0, 1420, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 9) < 0) __PYX_ERR(0, 1422, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L4_unpacking_done; @@ -41614,22 +41640,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1420, __pyx_L1_error) + __PYX_ERR(0, 1422, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_13 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_14 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_15 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_16 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_17 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_18 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_19 = __Pyx_PyIndex_AsSsize_t(__pyx_t_10); if (unlikely((__pyx_t_19 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyIndex_AsSsize_t(__pyx_t_10); if (unlikely((__pyx_t_19 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_Sp = __pyx_t_13; __pyx_v_Ep = __pyx_t_14; @@ -41643,7 +41669,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_v_covm = __pyx_t_18; __pyx_v_covn = __pyx_t_19; - /* "_rnaseq_utils.pyx":1421 + /* "_rnaseq_utils.pyx":1423 * * Sp, Ep, Sm, Em, Cp, Cm, covp, covm, covn = range(9) * array_length = rightmost - leftmost # <<<<<<<<<<<<<< @@ -41652,23 +41678,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_array_length = (__pyx_v_rightmost - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1422 + /* "_rnaseq_utils.pyx":1424 * Sp, Ep, Sm, Em, Cp, Cm, covp, covm, covn = range(9) * array_length = rightmost - leftmost * depth_matrix = np.zeros(shape=(9, array_length), dtype=np.float32) # <<<<<<<<<<<<<< * J_plus, J_minus = {}, {} * for read in reads: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_array_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_array_length); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_int_9); __Pyx_GIVEREF(__pyx_int_9); @@ -41676,40 +41702,40 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9); __pyx_t_9 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_8) < 0) __PYX_ERR(0, 1422, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_shape, __pyx_t_8) < 0) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1422, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_float32); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 1422, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_9) < 0) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1422, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1424, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1422, __pyx_L1_error) + if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1424, __pyx_L1_error) __pyx_v_depth_matrix = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":1423 + /* "_rnaseq_utils.pyx":1425 * array_length = rightmost - leftmost * depth_matrix = np.zeros(shape=(9, array_length), dtype=np.float32) * J_plus, J_minus = {}, {} # <<<<<<<<<<<<<< * for read in reads: * if read.condensed: */ - __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_J_plus = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; __pyx_v_J_minus = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1424 + /* "_rnaseq_utils.pyx":1426 * depth_matrix = np.zeros(shape=(9, array_length), dtype=np.float32) * J_plus, J_minus = {}, {} * for read in reads: # <<<<<<<<<<<<<< @@ -41718,22 +41744,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ if (unlikely(__pyx_v_reads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1424, __pyx_L1_error) + __PYX_ERR(0, 1426, __pyx_L1_error) } __pyx_t_1 = __pyx_v_reads; __Pyx_INCREF(__pyx_t_1); __pyx_t_19 = 0; for (;;) { if (__pyx_t_19 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_9); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_9 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_19); __Pyx_INCREF(__pyx_t_9); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 1426, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_1, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif - if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1424, __pyx_L1_error) + if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1426, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_9)); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":1425 + /* "_rnaseq_utils.pyx":1427 * J_plus, J_minus = {}, {} * for read in reads: * if read.condensed: # <<<<<<<<<<<<<< @@ -41743,7 +41769,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_read->condensed != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1426 + /* "_rnaseq_utils.pyx":1428 * for read in reads: * if read.condensed: * s_weight = 1 if read.s_tag else 0 # <<<<<<<<<<<<<< @@ -41757,7 +41783,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_v_s_weight = __pyx_t_21; - /* "_rnaseq_utils.pyx":1427 + /* "_rnaseq_utils.pyx":1429 * if read.condensed: * s_weight = 1 if read.s_tag else 0 * c_weight = 1 if read.capped else 0 # <<<<<<<<<<<<<< @@ -41771,7 +41797,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_v_c_weight = __pyx_t_21; - /* "_rnaseq_utils.pyx":1428 + /* "_rnaseq_utils.pyx":1430 * s_weight = 1 if read.s_tag else 0 * c_weight = 1 if read.capped else 0 * e_weight = 1 if read.e_tag else 0 # <<<<<<<<<<<<<< @@ -41785,7 +41811,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_v_e_weight = __pyx_t_21; - /* "_rnaseq_utils.pyx":1429 + /* "_rnaseq_utils.pyx":1431 * c_weight = 1 if read.capped else 0 * e_weight = 1 if read.e_tag else 0 * weight = read.weight # <<<<<<<<<<<<<< @@ -41795,7 +41821,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_21 = __pyx_v_read->weight; __pyx_v_weight = __pyx_t_21; - /* "_rnaseq_utils.pyx":1425 + /* "_rnaseq_utils.pyx":1427 * J_plus, J_minus = {}, {} * for read in reads: * if read.condensed: # <<<<<<<<<<<<<< @@ -41805,7 +41831,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L7; } - /* "_rnaseq_utils.pyx":1430 + /* "_rnaseq_utils.pyx":1432 * e_weight = 1 if read.e_tag else 0 * weight = read.weight * elif use_attributes: # Check a read's attributes for different values of each type # <<<<<<<<<<<<<< @@ -41815,7 +41841,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_use_attributes != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1431 + /* "_rnaseq_utils.pyx":1433 * weight = read.weight * elif use_attributes: # Check a read's attributes for different values of each type * weight = read.weight # <<<<<<<<<<<<<< @@ -41825,7 +41851,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_21 = __pyx_v_read->weight; __pyx_v_weight = __pyx_t_21; - /* "_rnaseq_utils.pyx":1432 + /* "_rnaseq_utils.pyx":1434 * elif use_attributes: # Check a read's attributes for different values of each type * weight = read.weight * s_weight = float(read.attributes.get('S.reads', weight)) # <<<<<<<<<<<<<< @@ -41834,18 +41860,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ if (unlikely(__pyx_v_read->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1432, __pyx_L1_error) + __PYX_ERR(0, 1434, __pyx_L1_error) } - __pyx_t_9 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_t_9 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyDict_GetItemDefault(__pyx_v_read->attributes, __pyx_kp_u_S_reads, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItemDefault(__pyx_v_read->attributes, __pyx_kp_u_S_reads, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1434, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_22 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_22 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1432, __pyx_L1_error) + __pyx_t_22 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_22 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1434, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_s_weight = __pyx_t_22; - /* "_rnaseq_utils.pyx":1433 + /* "_rnaseq_utils.pyx":1435 * weight = read.weight * s_weight = float(read.attributes.get('S.reads', weight)) * e_weight = float(read.attributes.get('E.reads', weight)) # <<<<<<<<<<<<<< @@ -41854,18 +41880,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ if (unlikely(__pyx_v_read->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1433, __pyx_L1_error) + __PYX_ERR(0, 1435, __pyx_L1_error) } - __pyx_t_10 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyDict_GetItemDefault(__pyx_v_read->attributes, __pyx_kp_u_E_reads, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyDict_GetItemDefault(__pyx_v_read->attributes, __pyx_kp_u_E_reads, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_22 = __Pyx_PyObject_AsDouble(__pyx_t_9); if (unlikely(__pyx_t_22 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_22 = __Pyx_PyObject_AsDouble(__pyx_t_9); if (unlikely(__pyx_t_22 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1435, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_e_weight = __pyx_t_22; - /* "_rnaseq_utils.pyx":1434 + /* "_rnaseq_utils.pyx":1436 * s_weight = float(read.attributes.get('S.reads', weight)) * e_weight = float(read.attributes.get('E.reads', weight)) * c_weight = float(read.attributes.get('S.capped', weight)) # <<<<<<<<<<<<<< @@ -41874,18 +41900,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ if (unlikely(__pyx_v_read->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 1434, __pyx_L1_error) + __PYX_ERR(0, 1436, __pyx_L1_error) } - __pyx_t_9 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_9 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyDict_GetItemDefault(__pyx_v_read->attributes, __pyx_kp_u_S_capped, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItemDefault(__pyx_v_read->attributes, __pyx_kp_u_S_capped, __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_22 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_22 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_22 = __Pyx_PyObject_AsDouble(__pyx_t_10); if (unlikely(__pyx_t_22 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_c_weight = __pyx_t_22; - /* "_rnaseq_utils.pyx":1430 + /* "_rnaseq_utils.pyx":1432 * e_weight = 1 if read.e_tag else 0 * weight = read.weight * elif use_attributes: # Check a read's attributes for different values of each type # <<<<<<<<<<<<<< @@ -41895,7 +41921,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L7; } - /* "_rnaseq_utils.pyx":1436 + /* "_rnaseq_utils.pyx":1438 * c_weight = float(read.attributes.get('S.capped', weight)) * else: * weight, s_weight, e_weight, c_weight = read.weight, read.weight, read.weight, read.weight # <<<<<<<<<<<<<< @@ -41914,7 +41940,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_L7:; - /* "_rnaseq_utils.pyx":1438 + /* "_rnaseq_utils.pyx":1440 * weight, s_weight, e_weight, c_weight = read.weight, read.weight, read.weight, read.weight * * if read.strand == 1: # <<<<<<<<<<<<<< @@ -41924,7 +41950,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost switch (__pyx_v_read->strand) { case 1: - /* "_rnaseq_utils.pyx":1439 + /* "_rnaseq_utils.pyx":1441 * * if read.strand == 1: * covrow = covp # <<<<<<<<<<<<<< @@ -41933,22 +41959,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_covrow = __pyx_v_covp; - /* "_rnaseq_utils.pyx":1440 + /* "_rnaseq_utils.pyx":1442 * if read.strand == 1: * covrow = covp * for span in read.junctions(): # <<<<<<<<<<<<<< * l = span[0] - leftmost * r = span[1] - leftmost */ - __pyx_t_10 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_read->__pyx_vtab)->junctions(__pyx_v_read, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_10 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_read->__pyx_vtab)->junctions(__pyx_v_read, 0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) { __pyx_t_9 = __pyx_t_10; __Pyx_INCREF(__pyx_t_9); __pyx_t_18 = 0; __pyx_t_26 = NULL; } else { - __pyx_t_18 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_18 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_26 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_26 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1442, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; for (;;) { @@ -41956,17 +41982,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost if (likely(PyList_CheckExact(__pyx_t_9))) { if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_18); __Pyx_INCREF(__pyx_t_10); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_10 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_18); __Pyx_INCREF(__pyx_t_10); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif } else { if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_9)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_18); __Pyx_INCREF(__pyx_t_10); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_18); __Pyx_INCREF(__pyx_t_10); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1442, __pyx_L1_error) #else - __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_10 = PySequence_ITEM(__pyx_t_9, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif } @@ -41976,17 +42002,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1440, __pyx_L1_error) + else __PYX_ERR(0, 1442, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_10); } - __pyx_t_27 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_27 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_10); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_v_span = __pyx_t_27; - /* "_rnaseq_utils.pyx":1441 + /* "_rnaseq_utils.pyx":1443 * covrow = covp * for span in read.junctions(): * l = span[0] - leftmost # <<<<<<<<<<<<<< @@ -41995,7 +42021,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_l = (__pyx_v_span.f0 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1442 + /* "_rnaseq_utils.pyx":1444 * for span in read.junctions(): * l = span[0] - leftmost * r = span[1] - leftmost # <<<<<<<<<<<<<< @@ -42004,7 +42030,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_r = (__pyx_v_span.f1 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1443 + /* "_rnaseq_utils.pyx":1445 * l = span[0] - leftmost * r = span[1] - leftmost * if l > 0 and r < array_length: # <<<<<<<<<<<<<< @@ -42022,7 +42048,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_L11_bool_binop_done:; if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1444 + /* "_rnaseq_utils.pyx":1446 * r = span[1] - leftmost * if l > 0 and r < array_length: * block = (l,r) # <<<<<<<<<<<<<< @@ -42033,37 +42059,37 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_27.f1 = __pyx_v_r; __pyx_v_block = __pyx_t_27; - /* "_rnaseq_utils.pyx":1445 + /* "_rnaseq_utils.pyx":1447 * if l > 0 and r < array_length: * block = (l,r) * junction_hash = span_to_string(block) # <<<<<<<<<<<<<< * J_plus[junction_hash] = J_plus.get(junction_hash, 0) + weight * */ - __pyx_t_10 = __pyx_f_13_rnaseq_utils_span_to_string(__pyx_v_block); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_10 = __pyx_f_13_rnaseq_utils_span_to_string(__pyx_v_block); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_XDECREF_SET(__pyx_v_junction_hash, ((PyObject*)__pyx_t_10)); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1446 + /* "_rnaseq_utils.pyx":1448 * block = (l,r) * junction_hash = span_to_string(block) * J_plus[junction_hash] = J_plus.get(junction_hash, 0) + weight # <<<<<<<<<<<<<< * * if read.s_tag: */ - __pyx_t_10 = __Pyx_PyDict_GetItemDefault(__pyx_v_J_plus, __pyx_v_junction_hash, __pyx_int_0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyDict_GetItemDefault(__pyx_v_J_plus, __pyx_v_junction_hash, __pyx_int_0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyNumber_Add(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_7 = PyNumber_Add(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_J_plus, __pyx_v_junction_hash, __pyx_t_7) < 0)) __PYX_ERR(0, 1446, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_J_plus, __pyx_v_junction_hash, __pyx_t_7) < 0)) __PYX_ERR(0, 1448, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1443 + /* "_rnaseq_utils.pyx":1445 * l = span[0] - leftmost * r = span[1] - leftmost * if l > 0 and r < array_length: # <<<<<<<<<<<<<< @@ -42072,7 +42098,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ } - /* "_rnaseq_utils.pyx":1440 + /* "_rnaseq_utils.pyx":1442 * if read.strand == 1: * covrow = covp * for span in read.junctions(): # <<<<<<<<<<<<<< @@ -42082,7 +42108,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":1448 + /* "_rnaseq_utils.pyx":1450 * J_plus[junction_hash] = J_plus.get(junction_hash, 0) + weight * * if read.s_tag: # <<<<<<<<<<<<<< @@ -42092,7 +42118,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_read->s_tag != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1449 + /* "_rnaseq_utils.pyx":1451 * * if read.s_tag: * pos = read.span[0] - leftmost # <<<<<<<<<<<<<< @@ -42101,7 +42127,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_pos = (__pyx_v_read->span.f0 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1450 + /* "_rnaseq_utils.pyx":1452 * if read.s_tag: * pos = read.span[0] - leftmost * if pos >= 0 and pos < array_length: # <<<<<<<<<<<<<< @@ -42119,7 +42145,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_L15_bool_binop_done:; if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1451 + /* "_rnaseq_utils.pyx":1453 * pos = read.span[0] - leftmost * if pos >= 0 and pos < array_length: * if read.capped: # <<<<<<<<<<<<<< @@ -42129,16 +42155,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_read->capped != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1452 + /* "_rnaseq_utils.pyx":1454 * if pos >= 0 and pos < array_length: * if read.capped: * depth_matrix[Cp, pos] += c_weight # <<<<<<<<<<<<<< * else: * depth_matrix[Sp, pos] += s_weight */ - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_Cp); __Pyx_GIVEREF(__pyx_v_Cp); @@ -42146,19 +42172,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_c_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_c_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1452, __pyx_L1_error) + __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7, __pyx_t_10) < 0)) __PYX_ERR(0, 1452, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7, __pyx_t_10) < 0)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1451 + /* "_rnaseq_utils.pyx":1453 * pos = read.span[0] - leftmost * if pos >= 0 and pos < array_length: * if read.capped: # <<<<<<<<<<<<<< @@ -42168,7 +42194,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L17; } - /* "_rnaseq_utils.pyx":1454 + /* "_rnaseq_utils.pyx":1456 * depth_matrix[Cp, pos] += c_weight * else: * depth_matrix[Sp, pos] += s_weight # <<<<<<<<<<<<<< @@ -42176,11 +42202,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost * read.s_tag = False */ /*else*/ { - __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_Sp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_Sp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); @@ -42188,21 +42214,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_10); __pyx_t_7 = 0; __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_s_weight); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_s_weight); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1454, __pyx_L1_error) + __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_10, __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_8, __pyx_t_9) < 0)) __PYX_ERR(0, 1454, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_8, __pyx_t_9) < 0)) __PYX_ERR(0, 1456, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __pyx_L17:; - /* "_rnaseq_utils.pyx":1450 + /* "_rnaseq_utils.pyx":1452 * if read.s_tag: * pos = read.span[0] - leftmost * if pos >= 0 and pos < array_length: # <<<<<<<<<<<<<< @@ -42212,7 +42238,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L14; } - /* "_rnaseq_utils.pyx":1456 + /* "_rnaseq_utils.pyx":1458 * depth_matrix[Sp, pos] += s_weight * else: * read.s_tag = False # <<<<<<<<<<<<<< @@ -42222,7 +42248,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost /*else*/ { __pyx_v_read->s_tag = 0; - /* "_rnaseq_utils.pyx":1457 + /* "_rnaseq_utils.pyx":1459 * else: * read.s_tag = False * read.capped = False # <<<<<<<<<<<<<< @@ -42233,7 +42259,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_L14:; - /* "_rnaseq_utils.pyx":1448 + /* "_rnaseq_utils.pyx":1450 * J_plus[junction_hash] = J_plus.get(junction_hash, 0) + weight * * if read.s_tag: # <<<<<<<<<<<<<< @@ -42242,7 +42268,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ } - /* "_rnaseq_utils.pyx":1459 + /* "_rnaseq_utils.pyx":1461 * read.capped = False * * if read.e_tag: # <<<<<<<<<<<<<< @@ -42252,7 +42278,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_read->e_tag != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1460 + /* "_rnaseq_utils.pyx":1462 * * if read.e_tag: * pos = read.span[1] - leftmost - 1 # <<<<<<<<<<<<<< @@ -42261,7 +42287,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_pos = ((__pyx_v_read->span.f1 - __pyx_v_leftmost) - 1); - /* "_rnaseq_utils.pyx":1461 + /* "_rnaseq_utils.pyx":1463 * if read.e_tag: * pos = read.span[1] - leftmost - 1 * if pos >= 0 and pos < array_length: # <<<<<<<<<<<<<< @@ -42279,18 +42305,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_L20_bool_binop_done:; if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1462 + /* "_rnaseq_utils.pyx":1464 * pos = read.span[1] - leftmost - 1 * if pos >= 0 and pos < array_length: * depth_matrix[Ep, pos] += e_weight # <<<<<<<<<<<<<< * else: * read.e_tag = False */ - __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_Ep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_Ep); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); @@ -42298,19 +42324,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_9); __pyx_t_8 = 0; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_e_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_e_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_10 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7, __pyx_t_10) < 0)) __PYX_ERR(0, 1462, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7, __pyx_t_10) < 0)) __PYX_ERR(0, 1464, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1461 + /* "_rnaseq_utils.pyx":1463 * if read.e_tag: * pos = read.span[1] - leftmost - 1 * if pos >= 0 and pos < array_length: # <<<<<<<<<<<<<< @@ -42320,7 +42346,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L19; } - /* "_rnaseq_utils.pyx":1464 + /* "_rnaseq_utils.pyx":1466 * depth_matrix[Ep, pos] += e_weight * else: * read.e_tag = False # <<<<<<<<<<<<<< @@ -42332,7 +42358,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_L19:; - /* "_rnaseq_utils.pyx":1459 + /* "_rnaseq_utils.pyx":1461 * read.capped = False * * if read.e_tag: # <<<<<<<<<<<<<< @@ -42341,7 +42367,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ } - /* "_rnaseq_utils.pyx":1438 + /* "_rnaseq_utils.pyx":1440 * weight, s_weight, e_weight, c_weight = read.weight, read.weight, read.weight, read.weight * * if read.strand == 1: # <<<<<<<<<<<<<< @@ -42351,7 +42377,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost break; case -1L: - /* "_rnaseq_utils.pyx":1466 + /* "_rnaseq_utils.pyx":1468 * read.e_tag = False * elif read.strand == -1: * covrow = covm # <<<<<<<<<<<<<< @@ -42360,22 +42386,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_covrow = __pyx_v_covm; - /* "_rnaseq_utils.pyx":1467 + /* "_rnaseq_utils.pyx":1469 * elif read.strand == -1: * covrow = covm * for span in read.junctions(): # <<<<<<<<<<<<<< * l = span[0] - leftmost * r = span[1] - leftmost */ - __pyx_t_7 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_read->__pyx_vtab)->junctions(__pyx_v_read, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_7 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_read->__pyx_vtab)->junctions(__pyx_v_read, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_10 = __pyx_t_7; __Pyx_INCREF(__pyx_t_10); __pyx_t_18 = 0; __pyx_t_26 = NULL; } else { - __pyx_t_18 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_18 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_26 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_26 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_26)) __PYX_ERR(0, 1469, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -42383,17 +42409,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost if (likely(PyList_CheckExact(__pyx_t_10))) { if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_7); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_7); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1469, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_7); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_7); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1469, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -42403,17 +42429,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1467, __pyx_L1_error) + else __PYX_ERR(0, 1469, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_7); } - __pyx_t_27 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_27 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_v_span = __pyx_t_27; - /* "_rnaseq_utils.pyx":1468 + /* "_rnaseq_utils.pyx":1470 * covrow = covm * for span in read.junctions(): * l = span[0] - leftmost # <<<<<<<<<<<<<< @@ -42422,7 +42448,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_l = (__pyx_v_span.f0 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1469 + /* "_rnaseq_utils.pyx":1471 * for span in read.junctions(): * l = span[0] - leftmost * r = span[1] - leftmost # <<<<<<<<<<<<<< @@ -42431,7 +42457,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_r = (__pyx_v_span.f1 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1470 + /* "_rnaseq_utils.pyx":1472 * l = span[0] - leftmost * r = span[1] - leftmost * if l > 0 and r < array_length: # <<<<<<<<<<<<<< @@ -42449,7 +42475,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_L25_bool_binop_done:; if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1471 + /* "_rnaseq_utils.pyx":1473 * r = span[1] - leftmost * if l > 0 and r < array_length: * block = (l,r) # <<<<<<<<<<<<<< @@ -42460,37 +42486,37 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_27.f1 = __pyx_v_r; __pyx_v_block = __pyx_t_27; - /* "_rnaseq_utils.pyx":1472 + /* "_rnaseq_utils.pyx":1474 * if l > 0 and r < array_length: * block = (l,r) * junction_hash = span_to_string(block) # <<<<<<<<<<<<<< * J_minus[junction_hash] = J_minus.get(junction_hash, 0) + weight * */ - __pyx_t_7 = __pyx_f_13_rnaseq_utils_span_to_string(__pyx_v_block); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1472, __pyx_L1_error) + __pyx_t_7 = __pyx_f_13_rnaseq_utils_span_to_string(__pyx_v_block); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF_SET(__pyx_v_junction_hash, ((PyObject*)__pyx_t_7)); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1473 + /* "_rnaseq_utils.pyx":1475 * block = (l,r) * junction_hash = span_to_string(block) * J_minus[junction_hash] = J_minus.get(junction_hash, 0) + weight # <<<<<<<<<<<<<< * * if read.e_tag: */ - __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_J_minus, __pyx_v_junction_hash, __pyx_int_0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1473, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_GetItemDefault(__pyx_v_J_minus, __pyx_v_junction_hash, __pyx_int_0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1473, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1473, __pyx_L1_error) + __pyx_t_9 = PyNumber_Add(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyDict_SetItem(__pyx_v_J_minus, __pyx_v_junction_hash, __pyx_t_9) < 0)) __PYX_ERR(0, 1473, __pyx_L1_error) + if (unlikely(PyDict_SetItem(__pyx_v_J_minus, __pyx_v_junction_hash, __pyx_t_9) < 0)) __PYX_ERR(0, 1475, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":1470 + /* "_rnaseq_utils.pyx":1472 * l = span[0] - leftmost * r = span[1] - leftmost * if l > 0 and r < array_length: # <<<<<<<<<<<<<< @@ -42499,7 +42525,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ } - /* "_rnaseq_utils.pyx":1467 + /* "_rnaseq_utils.pyx":1469 * elif read.strand == -1: * covrow = covm * for span in read.junctions(): # <<<<<<<<<<<<<< @@ -42509,7 +42535,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1475 + /* "_rnaseq_utils.pyx":1477 * J_minus[junction_hash] = J_minus.get(junction_hash, 0) + weight * * if read.e_tag: # <<<<<<<<<<<<<< @@ -42519,7 +42545,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_read->e_tag != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1476 + /* "_rnaseq_utils.pyx":1478 * * if read.e_tag: * pos = max(0, read.span[0] - leftmost) # <<<<<<<<<<<<<< @@ -42535,7 +42561,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_v_pos = __pyx_t_31; - /* "_rnaseq_utils.pyx":1477 + /* "_rnaseq_utils.pyx":1479 * if read.e_tag: * pos = max(0, read.span[0] - leftmost) * if pos >= 0 and pos < array_length: # <<<<<<<<<<<<<< @@ -42553,18 +42579,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_L29_bool_binop_done:; if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1478 + /* "_rnaseq_utils.pyx":1480 * pos = max(0, read.span[0] - leftmost) * if pos >= 0 and pos < array_length: * depth_matrix[Em, pos] += e_weight # <<<<<<<<<<<<<< * else: * read.e_tag = False */ - __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_Em); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_Em); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); @@ -42572,19 +42598,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_9); __pyx_t_10 = 0; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyFloat_FromDouble(__pyx_v_e_weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_e_weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1478, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_8, __pyx_t_7) < 0)) __PYX_ERR(0, 1478, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_8, __pyx_t_7) < 0)) __PYX_ERR(0, 1480, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_rnaseq_utils.pyx":1477 + /* "_rnaseq_utils.pyx":1479 * if read.e_tag: * pos = max(0, read.span[0] - leftmost) * if pos >= 0 and pos < array_length: # <<<<<<<<<<<<<< @@ -42594,7 +42620,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L28; } - /* "_rnaseq_utils.pyx":1480 + /* "_rnaseq_utils.pyx":1482 * depth_matrix[Em, pos] += e_weight * else: * read.e_tag = False # <<<<<<<<<<<<<< @@ -42606,7 +42632,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_L28:; - /* "_rnaseq_utils.pyx":1475 + /* "_rnaseq_utils.pyx":1477 * J_minus[junction_hash] = J_minus.get(junction_hash, 0) + weight * * if read.e_tag: # <<<<<<<<<<<<<< @@ -42615,7 +42641,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ } - /* "_rnaseq_utils.pyx":1482 + /* "_rnaseq_utils.pyx":1484 * read.e_tag = False * * if read.s_tag: # <<<<<<<<<<<<<< @@ -42625,7 +42651,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_read->s_tag != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1483 + /* "_rnaseq_utils.pyx":1485 * * if read.s_tag: * pos = read.span[1] - leftmost - 1 # <<<<<<<<<<<<<< @@ -42634,7 +42660,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_pos = ((__pyx_v_read->span.f1 - __pyx_v_leftmost) - 1); - /* "_rnaseq_utils.pyx":1484 + /* "_rnaseq_utils.pyx":1486 * if read.s_tag: * pos = read.span[1] - leftmost - 1 * if pos >= 0 and pos < array_length: # <<<<<<<<<<<<<< @@ -42652,7 +42678,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_L33_bool_binop_done:; if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1485 + /* "_rnaseq_utils.pyx":1487 * pos = read.span[1] - leftmost - 1 * if pos >= 0 and pos < array_length: * if read.capped: # <<<<<<<<<<<<<< @@ -42662,16 +42688,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_read->capped != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1486 + /* "_rnaseq_utils.pyx":1488 * if pos >= 0 and pos < array_length: * if read.capped: * depth_matrix[Cm, pos] += c_weight # <<<<<<<<<<<<<< * else: * depth_matrix[Sm, pos] += s_weight */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_v_Cm); __Pyx_GIVEREF(__pyx_v_Cm); @@ -42679,19 +42705,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = PyFloat_FromDouble(__pyx_v_c_weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_c_weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7, __pyx_t_9) < 0)) __PYX_ERR(0, 1486, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7, __pyx_t_9) < 0)) __PYX_ERR(0, 1488, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1485 + /* "_rnaseq_utils.pyx":1487 * pos = read.span[1] - leftmost - 1 * if pos >= 0 and pos < array_length: * if read.capped: # <<<<<<<<<<<<<< @@ -42701,7 +42727,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L35; } - /* "_rnaseq_utils.pyx":1488 + /* "_rnaseq_utils.pyx":1490 * depth_matrix[Cm, pos] += c_weight * else: * depth_matrix[Sm, pos] += s_weight # <<<<<<<<<<<<<< @@ -42709,11 +42735,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost * read.s_tag = False */ /*else*/ { - __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_Sm); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_7 = PyInt_FromSsize_t(__pyx_v_Sm); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_pos); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); @@ -42721,21 +42747,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9); __pyx_t_7 = 0; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = PyFloat_FromDouble(__pyx_v_s_weight); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_7 = PyFloat_FromDouble(__pyx_v_s_weight); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1488, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_10, __pyx_t_8) < 0)) __PYX_ERR(0, 1488, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_10, __pyx_t_8) < 0)) __PYX_ERR(0, 1490, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __pyx_L35:; - /* "_rnaseq_utils.pyx":1484 + /* "_rnaseq_utils.pyx":1486 * if read.s_tag: * pos = read.span[1] - leftmost - 1 * if pos >= 0 and pos < array_length: # <<<<<<<<<<<<<< @@ -42745,7 +42771,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L32; } - /* "_rnaseq_utils.pyx":1490 + /* "_rnaseq_utils.pyx":1492 * depth_matrix[Sm, pos] += s_weight * else: * read.s_tag = False # <<<<<<<<<<<<<< @@ -42757,7 +42783,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __pyx_L32:; - /* "_rnaseq_utils.pyx":1482 + /* "_rnaseq_utils.pyx":1484 * read.e_tag = False * * if read.s_tag: # <<<<<<<<<<<<<< @@ -42766,7 +42792,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ } - /* "_rnaseq_utils.pyx":1465 + /* "_rnaseq_utils.pyx":1467 * else: * read.e_tag = False * elif read.strand == -1: # <<<<<<<<<<<<<< @@ -42776,7 +42802,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost break; default: - /* "_rnaseq_utils.pyx":1492 + /* "_rnaseq_utils.pyx":1494 * read.s_tag = False * else: # The read has no features other than non-stranded coverage * covrow = covn # <<<<<<<<<<<<<< @@ -42787,7 +42813,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost break; } - /* "_rnaseq_utils.pyx":1494 + /* "_rnaseq_utils.pyx":1496 * covrow = covn * * if splice: # <<<<<<<<<<<<<< @@ -42797,7 +42823,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_20 = (__pyx_v_splice != 0); if (__pyx_t_20) { - /* "_rnaseq_utils.pyx":1495 + /* "_rnaseq_utils.pyx":1497 * * if splice: * for span in read.ranges: # <<<<<<<<<<<<<< @@ -42806,22 +42832,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ if (unlikely(__pyx_v_read->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1495, __pyx_L1_error) + __PYX_ERR(0, 1497, __pyx_L1_error) } __pyx_t_10 = __pyx_v_read->ranges; __Pyx_INCREF(__pyx_t_10); __pyx_t_18 = 0; for (;;) { if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_10)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_8 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_8); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_8 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_18); __Pyx_INCREF(__pyx_t_8); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 1497, __pyx_L1_error) #else - __pyx_t_8 = PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(__pyx_t_10, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif - __pyx_t_27 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_27 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_8); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1497, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_span = __pyx_t_27; - /* "_rnaseq_utils.pyx":1496 + /* "_rnaseq_utils.pyx":1498 * if splice: * for span in read.ranges: * l = span[0] - leftmost # <<<<<<<<<<<<<< @@ -42830,7 +42856,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_l = (__pyx_v_span.f0 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1497 + /* "_rnaseq_utils.pyx":1499 * for span in read.ranges: * l = span[0] - leftmost * r = span[1] - leftmost # <<<<<<<<<<<<<< @@ -42839,14 +42865,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_r = (__pyx_v_span.f1 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1498 + /* "_rnaseq_utils.pyx":1500 * l = span[0] - leftmost * r = span[1] - leftmost * depth_matrix[covrow, max(l,0):r] += weight # <<<<<<<<<<<<<< * else: * l = read.span[0] - leftmost */ - __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_covrow); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_8 = PyInt_FromSsize_t(__pyx_v_covrow); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_31 = 0; __pyx_t_29 = __pyx_v_l; @@ -42855,15 +42881,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } else { __pyx_t_30 = __pyx_t_29; } - __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_t_30); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_long(__pyx_t_30); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = PySlice_New(__pyx_t_7, __pyx_t_9, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_6 = PySlice_New(__pyx_t_7, __pyx_t_9, Py_None); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); @@ -42871,19 +42897,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_6); __pyx_t_8 = 0; __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1498, __pyx_L1_error) + __pyx_t_7 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_9, __pyx_t_7) < 0)) __PYX_ERR(0, 1498, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_9, __pyx_t_7) < 0)) __PYX_ERR(0, 1500, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":1495 + /* "_rnaseq_utils.pyx":1497 * * if splice: * for span in read.ranges: # <<<<<<<<<<<<<< @@ -42893,7 +42919,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1494 + /* "_rnaseq_utils.pyx":1496 * covrow = covn * * if splice: # <<<<<<<<<<<<<< @@ -42903,7 +42929,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost goto __pyx_L36; } - /* "_rnaseq_utils.pyx":1500 + /* "_rnaseq_utils.pyx":1502 * depth_matrix[covrow, max(l,0):r] += weight * else: * l = read.span[0] - leftmost # <<<<<<<<<<<<<< @@ -42913,7 +42939,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost /*else*/ { __pyx_v_l = (__pyx_v_read->span.f0 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1501 + /* "_rnaseq_utils.pyx":1503 * else: * l = read.span[0] - leftmost * r = read.span[1] - leftmost # <<<<<<<<<<<<<< @@ -42922,14 +42948,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost */ __pyx_v_r = (__pyx_v_read->span.f1 - __pyx_v_leftmost); - /* "_rnaseq_utils.pyx":1502 + /* "_rnaseq_utils.pyx":1504 * l = read.span[0] - leftmost * r = read.span[1] - leftmost * depth_matrix[covrow, max(l,0):r] += weight # <<<<<<<<<<<<<< * * return depth_matrix, J_plus, J_minus */ - __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_covrow); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_10 = PyInt_FromSsize_t(__pyx_v_covrow); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_30 = 0; __pyx_t_29 = __pyx_v_l; @@ -42938,15 +42964,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } else { __pyx_t_31 = __pyx_t_29; } - __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_31); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_long(__pyx_t_31); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PySlice_New(__pyx_t_9, __pyx_t_7, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_8 = PySlice_New(__pyx_t_9, __pyx_t_7, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); @@ -42954,21 +42980,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_8); __pyx_t_10 = 0; __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_10 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7, __pyx_t_9) < 0)) __PYX_ERR(0, 1502, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_7, __pyx_t_9) < 0)) __PYX_ERR(0, 1504, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __pyx_L36:; - /* "_rnaseq_utils.pyx":1424 + /* "_rnaseq_utils.pyx":1426 * depth_matrix = np.zeros(shape=(9, array_length), dtype=np.float32) * J_plus, J_minus = {}, {} * for read in reads: # <<<<<<<<<<<<<< @@ -42978,7 +43004,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1504 + /* "_rnaseq_utils.pyx":1506 * depth_matrix[covrow, max(l,0):r] += weight * * return depth_matrix, J_plus, J_minus # <<<<<<<<<<<<<< @@ -42986,7 +43012,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost * cpdef str bedgraph(str chrom, int leftmost, np.ndarray depth_matrix, str seqtype='', int strand=0): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_depth_matrix)); __Pyx_GIVEREF(((PyObject *)__pyx_v_depth_matrix)); @@ -43001,7 +43027,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_build_depth_matrix(int __pyx_v_leftmost __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1405 + /* "_rnaseq_utils.pyx":1407 * return source_lookup * * cpdef build_depth_matrix(int leftmost, int rightmost, tuple reads, bint use_attributes=True, bint splice=True): # <<<<<<<<<<<<<< @@ -43081,13 +43107,13 @@ static PyObject *__pyx_pw_13_rnaseq_utils_14build_depth_matrix(PyObject *__pyx_s case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rightmost)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("build_depth_matrix", 0, 3, 5, 1); __PYX_ERR(0, 1405, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("build_depth_matrix", 0, 3, 5, 1); __PYX_ERR(0, 1407, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_reads)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("build_depth_matrix", 0, 3, 5, 2); __PYX_ERR(0, 1405, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("build_depth_matrix", 0, 3, 5, 2); __PYX_ERR(0, 1407, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -43103,7 +43129,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_14build_depth_matrix(PyObject *__pyx_s } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_depth_matrix") < 0)) __PYX_ERR(0, 1405, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_depth_matrix") < 0)) __PYX_ERR(0, 1407, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -43118,29 +43144,29 @@ static PyObject *__pyx_pw_13_rnaseq_utils_14build_depth_matrix(PyObject *__pyx_s default: goto __pyx_L5_argtuple_error; } } - __pyx_v_leftmost = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_leftmost == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1405, __pyx_L3_error) - __pyx_v_rightmost = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_rightmost == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1405, __pyx_L3_error) + __pyx_v_leftmost = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_leftmost == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1407, __pyx_L3_error) + __pyx_v_rightmost = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_rightmost == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1407, __pyx_L3_error) __pyx_v_reads = ((PyObject*)values[2]); if (values[3]) { - __pyx_v_use_attributes = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_use_attributes == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1405, __pyx_L3_error) + __pyx_v_use_attributes = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_use_attributes == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1407, __pyx_L3_error) } else { __pyx_v_use_attributes = ((int)1); } if (values[4]) { - __pyx_v_splice = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_splice == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1405, __pyx_L3_error) + __pyx_v_splice = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_splice == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1407, __pyx_L3_error) } else { __pyx_v_splice = ((int)1); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("build_depth_matrix", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1405, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("build_depth_matrix", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1407, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.build_depth_matrix", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reads), (&PyTuple_Type), 1, "reads", 1))) __PYX_ERR(0, 1405, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reads), (&PyTuple_Type), 1, "reads", 1))) __PYX_ERR(0, 1407, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_13build_depth_matrix(__pyx_self, __pyx_v_leftmost, __pyx_v_rightmost, __pyx_v_reads, __pyx_v_use_attributes, __pyx_v_splice); /* function exit code */ @@ -43165,7 +43191,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13build_depth_matrix(CYTHON_UNUSED PyO __pyx_t_2.__pyx_n = 2; __pyx_t_2.use_attributes = __pyx_v_use_attributes; __pyx_t_2.splice = __pyx_v_splice; - __pyx_t_1 = __pyx_f_13_rnaseq_utils_build_depth_matrix(__pyx_v_leftmost, __pyx_v_rightmost, __pyx_v_reads, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_build_depth_matrix(__pyx_v_leftmost, __pyx_v_rightmost, __pyx_v_reads, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -43182,7 +43208,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_13build_depth_matrix(CYTHON_UNUSED PyO return __pyx_r; } -/* "_rnaseq_utils.pyx":1506 +/* "_rnaseq_utils.pyx":1508 * return depth_matrix, J_plus, J_minus * * cpdef str bedgraph(str chrom, int leftmost, np.ndarray depth_matrix, str seqtype='', int strand=0): # <<<<<<<<<<<<<< @@ -43234,7 +43260,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } } - /* "_rnaseq_utils.pyx":1511 + /* "_rnaseq_utils.pyx":1513 * int p, lastp * float v, lastv * str output = '' # <<<<<<<<<<<<<< @@ -43244,14 +43270,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_INCREF(__pyx_kp_u__7); __pyx_v_output = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":1515 + /* "_rnaseq_utils.pyx":1517 * bint contiguous * * if seqtype.upper() == 'COV' or seqtype == '': # <<<<<<<<<<<<<< * contiguous = True * if strand == 1: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1515, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -43265,23 +43291,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1515, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_COV, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1515, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_COV, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1517, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_5) { } else { __pyx_t_1 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_seqtype, __pyx_kp_u__7, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1515, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_seqtype, __pyx_kp_u__7, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1517, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_1 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":1516 + /* "_rnaseq_utils.pyx":1518 * * if seqtype.upper() == 'COV' or seqtype == '': * contiguous = True # <<<<<<<<<<<<<< @@ -43290,7 +43316,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ */ __pyx_v_contiguous = 1; - /* "_rnaseq_utils.pyx":1517 + /* "_rnaseq_utils.pyx":1519 * if seqtype.upper() == 'COV' or seqtype == '': * contiguous = True * if strand == 1: # <<<<<<<<<<<<<< @@ -43300,20 +43326,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":1518 + /* "_rnaseq_utils.pyx":1520 * contiguous = True * if strand == 1: * coverage = depth_matrix[-3,:] # <<<<<<<<<<<<<< * elif strand == -1: * coverage = depth_matrix[-2,:] */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__45); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1518, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__45); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1518, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1520, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1517 + /* "_rnaseq_utils.pyx":1519 * if seqtype.upper() == 'COV' or seqtype == '': * contiguous = True * if strand == 1: # <<<<<<<<<<<<<< @@ -43323,20 +43349,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; case -1L: - /* "_rnaseq_utils.pyx":1520 + /* "_rnaseq_utils.pyx":1522 * coverage = depth_matrix[-3,:] * elif strand == -1: * coverage = depth_matrix[-2,:] # <<<<<<<<<<<<<< * else: * coverage = np.sum(depth_matrix[-3:,:], axis=0) */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__46); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__46); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1520, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1522, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1519 + /* "_rnaseq_utils.pyx":1521 * if strand == 1: * coverage = depth_matrix[-3,:] * elif strand == -1: # <<<<<<<<<<<<<< @@ -43346,40 +43372,40 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; default: - /* "_rnaseq_utils.pyx":1522 + /* "_rnaseq_utils.pyx":1524 * coverage = depth_matrix[-2,:] * else: * coverage = np.sum(depth_matrix[-3:,:], axis=0) # <<<<<<<<<<<<<< * elif seqtype.upper() == '5P': * contiguous = False */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1522, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__48); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__48); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1522, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1522, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1524, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1522, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1524, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; break; } - /* "_rnaseq_utils.pyx":1515 + /* "_rnaseq_utils.pyx":1517 * bint contiguous * * if seqtype.upper() == 'COV' or seqtype == '': # <<<<<<<<<<<<<< @@ -43389,14 +43415,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1523 + /* "_rnaseq_utils.pyx":1525 * else: * coverage = np.sum(depth_matrix[-3:,:], axis=0) * elif seqtype.upper() == '5P': # <<<<<<<<<<<<<< * contiguous = False * if strand == 1: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -43410,14 +43436,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1523, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u_5P, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_kp_u_5P, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":1524 + /* "_rnaseq_utils.pyx":1526 * coverage = np.sum(depth_matrix[-3:,:], axis=0) * elif seqtype.upper() == '5P': * contiguous = False # <<<<<<<<<<<<<< @@ -43426,7 +43452,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ */ __pyx_v_contiguous = 0; - /* "_rnaseq_utils.pyx":1525 + /* "_rnaseq_utils.pyx":1527 * elif seqtype.upper() == '5P': * contiguous = False * if strand == 1: # <<<<<<<<<<<<<< @@ -43436,19 +43462,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":1526 + /* "_rnaseq_utils.pyx":1528 * contiguous = False * if strand == 1: * coverage = np.sum(depth_matrix[[0,4],:], axis=0) # <<<<<<<<<<<<<< * elif strand == -1: * coverage = np.sum(depth_matrix[[2,5],:], axis=0) */ - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1526, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_np); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_sum); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_7 = PyList_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); @@ -43456,7 +43482,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); PyList_SET_ITEM(__pyx_t_7, 1, __pyx_int_4); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); @@ -43464,27 +43490,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_GIVEREF(__pyx_slice__44); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_slice__44); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1526, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1526, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1526, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1528, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1525 + /* "_rnaseq_utils.pyx":1527 * elif seqtype.upper() == '5P': * contiguous = False * if strand == 1: # <<<<<<<<<<<<<< @@ -43494,19 +43520,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; case -1L: - /* "_rnaseq_utils.pyx":1528 + /* "_rnaseq_utils.pyx":1530 * coverage = np.sum(depth_matrix[[0,4],:], axis=0) * elif strand == -1: * coverage = np.sum(depth_matrix[[2,5],:], axis=0) # <<<<<<<<<<<<<< * else: * coverage = np.sum(depth_matrix[[0,4],:], axis=0) - np.sum(depth_matrix[[2,5],:], axis=0) */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_sum); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); @@ -43514,7 +43540,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); PyList_SET_ITEM(__pyx_t_3, 1, __pyx_int_5); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -43522,27 +43548,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_GIVEREF(__pyx_slice__44); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_slice__44); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1528, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1528, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1528, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1530, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1527 + /* "_rnaseq_utils.pyx":1529 * if strand == 1: * coverage = np.sum(depth_matrix[[0,4],:], axis=0) * elif strand == -1: # <<<<<<<<<<<<<< @@ -43552,19 +43578,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; default: - /* "_rnaseq_utils.pyx":1530 + /* "_rnaseq_utils.pyx":1532 * coverage = np.sum(depth_matrix[[2,5],:], axis=0) * else: * coverage = np.sum(depth_matrix[[0,4],:], axis=0) - np.sum(depth_matrix[[2,5],:], axis=0) # <<<<<<<<<<<<<< * elif seqtype.upper() == 'S': * contiguous = False */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sum); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_0); __Pyx_GIVEREF(__pyx_int_0); @@ -43572,7 +43598,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_INCREF(__pyx_int_4); __Pyx_GIVEREF(__pyx_int_4); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_4); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -43580,28 +43606,28 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_GIVEREF(__pyx_slice__44); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_slice__44); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1530, __pyx_L1_error) - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1530, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1532, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_np); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_sum); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_2); __Pyx_GIVEREF(__pyx_int_2); @@ -43609,7 +43635,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_INCREF(__pyx_int_5); __Pyx_GIVEREF(__pyx_int_5); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_5); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -43617,33 +43643,33 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_GIVEREF(__pyx_slice__44); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_slice__44); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1530, __pyx_L1_error) - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1530, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_axis, __pyx_int_0) < 0) __PYX_ERR(0, 1532, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1530, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1532, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; break; } - /* "_rnaseq_utils.pyx":1523 + /* "_rnaseq_utils.pyx":1525 * else: * coverage = np.sum(depth_matrix[-3:,:], axis=0) * elif seqtype.upper() == '5P': # <<<<<<<<<<<<<< @@ -43653,14 +43679,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1531 + /* "_rnaseq_utils.pyx":1533 * else: * coverage = np.sum(depth_matrix[[0,4],:], axis=0) - np.sum(depth_matrix[[2,5],:], axis=0) * elif seqtype.upper() == 'S': # <<<<<<<<<<<<<< * contiguous = False * if strand == 1: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -43674,14 +43700,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1531, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1531, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":1532 + /* "_rnaseq_utils.pyx":1534 * coverage = np.sum(depth_matrix[[0,4],:], axis=0) - np.sum(depth_matrix[[2,5],:], axis=0) * elif seqtype.upper() == 'S': * contiguous = False # <<<<<<<<<<<<<< @@ -43690,7 +43716,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ */ __pyx_v_contiguous = 0; - /* "_rnaseq_utils.pyx":1533 + /* "_rnaseq_utils.pyx":1535 * elif seqtype.upper() == 'S': * contiguous = False * if strand == 1: # <<<<<<<<<<<<<< @@ -43700,20 +43726,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":1534 + /* "_rnaseq_utils.pyx":1536 * contiguous = False * if strand == 1: * coverage = depth_matrix[0,:] # <<<<<<<<<<<<<< * elif strand == -1: * coverage = depth_matrix[2,:] */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__49); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__49); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1534, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1536, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1533 + /* "_rnaseq_utils.pyx":1535 * elif seqtype.upper() == 'S': * contiguous = False * if strand == 1: # <<<<<<<<<<<<<< @@ -43723,20 +43749,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; case -1L: - /* "_rnaseq_utils.pyx":1536 + /* "_rnaseq_utils.pyx":1538 * coverage = depth_matrix[0,:] * elif strand == -1: * coverage = depth_matrix[2,:] # <<<<<<<<<<<<<< * else: * coverage = depth_matrix[0,:] - depth_matrix[2,:] */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__50); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1536, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__50); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1536, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1538, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1535 + /* "_rnaseq_utils.pyx":1537 * if strand == 1: * coverage = depth_matrix[0,:] * elif strand == -1: # <<<<<<<<<<<<<< @@ -43746,28 +43772,28 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; default: - /* "_rnaseq_utils.pyx":1538 + /* "_rnaseq_utils.pyx":1540 * coverage = depth_matrix[2,:] * else: * coverage = depth_matrix[0,:] - depth_matrix[2,:] # <<<<<<<<<<<<<< * elif seqtype.upper() == 'C': * contiguous = False */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__49); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__49); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__50); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__50); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyNumber_Subtract(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_7 = PyNumber_Subtract(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1538, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1540, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; break; } - /* "_rnaseq_utils.pyx":1531 + /* "_rnaseq_utils.pyx":1533 * else: * coverage = np.sum(depth_matrix[[0,4],:], axis=0) - np.sum(depth_matrix[[2,5],:], axis=0) * elif seqtype.upper() == 'S': # <<<<<<<<<<<<<< @@ -43777,14 +43803,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1539 + /* "_rnaseq_utils.pyx":1541 * else: * coverage = depth_matrix[0,:] - depth_matrix[2,:] * elif seqtype.upper() == 'C': # <<<<<<<<<<<<<< * contiguous = False * if strand == 1: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_2 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -43798,14 +43824,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1539, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1539, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":1540 + /* "_rnaseq_utils.pyx":1542 * coverage = depth_matrix[0,:] - depth_matrix[2,:] * elif seqtype.upper() == 'C': * contiguous = False # <<<<<<<<<<<<<< @@ -43814,7 +43840,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ */ __pyx_v_contiguous = 0; - /* "_rnaseq_utils.pyx":1541 + /* "_rnaseq_utils.pyx":1543 * elif seqtype.upper() == 'C': * contiguous = False * if strand == 1: # <<<<<<<<<<<<<< @@ -43824,20 +43850,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":1542 + /* "_rnaseq_utils.pyx":1544 * contiguous = False * if strand == 1: * coverage = depth_matrix[4,:] # <<<<<<<<<<<<<< * elif strand == -1: * coverage = depth_matrix[5,:] */ - __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__51); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1542, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__51); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1542, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1544, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1541 + /* "_rnaseq_utils.pyx":1543 * elif seqtype.upper() == 'C': * contiguous = False * if strand == 1: # <<<<<<<<<<<<<< @@ -43847,20 +43873,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; case -1L: - /* "_rnaseq_utils.pyx":1544 + /* "_rnaseq_utils.pyx":1546 * coverage = depth_matrix[4,:] * elif strand == -1: * coverage = depth_matrix[5,:] # <<<<<<<<<<<<<< * else: * coverage = depth_matrix[4,:] - depth_matrix[5,:] */ - __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__52); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__52); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1544, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1546, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":1543 + /* "_rnaseq_utils.pyx":1545 * if strand == 1: * coverage = depth_matrix[4,:] * elif strand == -1: # <<<<<<<<<<<<<< @@ -43870,28 +43896,28 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; default: - /* "_rnaseq_utils.pyx":1546 + /* "_rnaseq_utils.pyx":1548 * coverage = depth_matrix[5,:] * else: * coverage = depth_matrix[4,:] - depth_matrix[5,:] # <<<<<<<<<<<<<< * elif seqtype.upper() in ['E', '3P']: * contiguous = False */ - __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__51); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__51); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__52); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__52); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1546, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1548, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; break; } - /* "_rnaseq_utils.pyx":1539 + /* "_rnaseq_utils.pyx":1541 * else: * coverage = depth_matrix[0,:] - depth_matrix[2,:] * elif seqtype.upper() == 'C': # <<<<<<<<<<<<<< @@ -43901,14 +43927,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1547 + /* "_rnaseq_utils.pyx":1549 * else: * coverage = depth_matrix[4,:] - depth_matrix[5,:] * elif seqtype.upper() in ['E', '3P']: # <<<<<<<<<<<<<< * contiguous = False * if strand == 1: */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_seqtype, __pyx_n_s_upper); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -43922,23 +43948,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_8); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1549, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1549, __pyx_L1_error) if (!__pyx_t_6) { } else { __pyx_t_1 = __pyx_t_6; goto __pyx_L6_bool_binop_done; } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_3P, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_2, __pyx_kp_u_3P, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1549, __pyx_L1_error) __pyx_t_1 = __pyx_t_6; __pyx_L6_bool_binop_done:; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = (__pyx_t_1 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1548 + /* "_rnaseq_utils.pyx":1550 * coverage = depth_matrix[4,:] - depth_matrix[5,:] * elif seqtype.upper() in ['E', '3P']: * contiguous = False # <<<<<<<<<<<<<< @@ -43947,7 +43973,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ */ __pyx_v_contiguous = 0; - /* "_rnaseq_utils.pyx":1549 + /* "_rnaseq_utils.pyx":1551 * elif seqtype.upper() in ['E', '3P']: * contiguous = False * if strand == 1: # <<<<<<<<<<<<<< @@ -43957,20 +43983,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":1550 + /* "_rnaseq_utils.pyx":1552 * contiguous = False * if strand == 1: * coverage = depth_matrix[1,:] # <<<<<<<<<<<<<< * elif strand == -1: * coverage = depth_matrix[3,:] */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__53); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__53); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1550, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1552, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1549 + /* "_rnaseq_utils.pyx":1551 * elif seqtype.upper() in ['E', '3P']: * contiguous = False * if strand == 1: # <<<<<<<<<<<<<< @@ -43980,20 +44006,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; case -1L: - /* "_rnaseq_utils.pyx":1552 + /* "_rnaseq_utils.pyx":1554 * coverage = depth_matrix[1,:] * elif strand == -1: * coverage = depth_matrix[3,:] # <<<<<<<<<<<<<< * else: * coverage = depth_matrix[1,:] - depth_matrix[3,:] */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__54); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__54); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1552, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1554, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1551 + /* "_rnaseq_utils.pyx":1553 * if strand == 1: * coverage = depth_matrix[1,:] * elif strand == -1: # <<<<<<<<<<<<<< @@ -44003,28 +44029,28 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ break; default: - /* "_rnaseq_utils.pyx":1554 + /* "_rnaseq_utils.pyx":1556 * coverage = depth_matrix[3,:] * else: * coverage = depth_matrix[1,:] - depth_matrix[3,:] # <<<<<<<<<<<<<< * * positions = np.where(np.append(coverage[0],np.diff(coverage)) != 0)[0] */ - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__53); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__53); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__54); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_depth_matrix), __pyx_tuple__54); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = PyNumber_Subtract(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1554, __pyx_L1_error) + __pyx_t_7 = PyNumber_Subtract(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1554, __pyx_L1_error) + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1556, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_7); __pyx_t_7 = 0; break; } - /* "_rnaseq_utils.pyx":1547 + /* "_rnaseq_utils.pyx":1549 * else: * coverage = depth_matrix[4,:] - depth_matrix[5,:] * elif seqtype.upper() in ['E', '3P']: # <<<<<<<<<<<<<< @@ -44034,32 +44060,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } __pyx_L3:; - /* "_rnaseq_utils.pyx":1556 + /* "_rnaseq_utils.pyx":1558 * coverage = depth_matrix[1,:] - depth_matrix[3,:] * * positions = np.where(np.append(coverage[0],np.diff(coverage)) != 0)[0] # <<<<<<<<<<<<<< * values = coverage[positions] * lastp, lastv = -1, 0 */ - __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1556, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_np); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_where); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_where); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_np); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_append); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_v_coverage)) { __Pyx_RaiseUnboundLocalError("coverage"); __PYX_ERR(0, 1556, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_coverage), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) + if (unlikely(!__pyx_v_coverage)) { __Pyx_RaiseUnboundLocalError("coverage"); __PYX_ERR(0, 1558, __pyx_L1_error) } + __pyx_t_3 = __Pyx_GetItemInt(((PyObject *)__pyx_v_coverage), 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1556, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_10, __pyx_n_s_np); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_diff); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_diff); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_v_coverage)) { __Pyx_RaiseUnboundLocalError("coverage"); __PYX_ERR(0, 1556, __pyx_L1_error) } + if (unlikely(!__pyx_v_coverage)) { __Pyx_RaiseUnboundLocalError("coverage"); __PYX_ERR(0, 1558, __pyx_L1_error) } __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) { __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11); @@ -44072,7 +44098,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } __pyx_t_9 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_11, __pyx_t_10, ((PyObject *)__pyx_v_coverage)) : __Pyx_PyObject_CallOneArg(__pyx_t_11, ((PyObject *)__pyx_v_coverage)); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1556, __pyx_L1_error) + if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_11 = NULL; @@ -44090,7 +44116,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_3, __pyx_t_9}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -44100,7 +44126,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_3, __pyx_t_9}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -44108,7 +44134,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_11) { __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); __pyx_t_11 = NULL; @@ -44119,12 +44145,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_12, __pyx_t_9); __pyx_t_3 = 0; __pyx_t_9 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_8, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_t_8, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = NULL; @@ -44140,31 +44166,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __pyx_t_7 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_8, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1556, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1556, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1558, __pyx_L1_error) __pyx_v_positions = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1557 + /* "_rnaseq_utils.pyx":1559 * * positions = np.where(np.append(coverage[0],np.diff(coverage)) != 0)[0] * values = coverage[positions] # <<<<<<<<<<<<<< * lastp, lastv = -1, 0 * for p,v in zip(positions, values): */ - if (unlikely(!__pyx_v_coverage)) { __Pyx_RaiseUnboundLocalError("coverage"); __PYX_ERR(0, 1557, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_coverage), ((PyObject *)__pyx_v_positions)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1557, __pyx_L1_error) + if (unlikely(!__pyx_v_coverage)) { __Pyx_RaiseUnboundLocalError("coverage"); __PYX_ERR(0, 1559, __pyx_L1_error) } + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_coverage), ((PyObject *)__pyx_v_positions)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1557, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1559, __pyx_L1_error) __pyx_v_values = ((PyArrayObject *)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1558 + /* "_rnaseq_utils.pyx":1560 * positions = np.where(np.append(coverage[0],np.diff(coverage)) != 0)[0] * values = coverage[positions] * lastp, lastv = -1, 0 # <<<<<<<<<<<<<< @@ -44176,14 +44202,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __pyx_v_lastp = __pyx_t_12; __pyx_v_lastv = __pyx_t_13; - /* "_rnaseq_utils.pyx":1559 + /* "_rnaseq_utils.pyx":1561 * values = coverage[positions] * lastp, lastv = -1, 0 * for p,v in zip(positions, values): # <<<<<<<<<<<<<< * if lastp >= 0 and lastv != 0: * output += '{}\t{}\t{}\t{}\n'.format(chrom, lastp+leftmost, [lastp+1, p][contiguous]+leftmost, lastv) */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(((PyObject *)__pyx_v_positions)); __Pyx_GIVEREF(((PyObject *)__pyx_v_positions)); @@ -44191,16 +44217,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_INCREF(((PyObject *)__pyx_v_values)); __Pyx_GIVEREF(((PyObject *)__pyx_v_values)); PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_values)); - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (likely(PyList_CheckExact(__pyx_t_7)) || PyTuple_CheckExact(__pyx_t_7)) { __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_14 = 0; __pyx_t_15 = NULL; } else { - __pyx_t_14 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_14 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1561, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { @@ -44208,17 +44234,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ if (likely(PyList_CheckExact(__pyx_t_2))) { if (__pyx_t_14 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 1561, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } else { if (__pyx_t_14 >= PyTuple_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_14); __Pyx_INCREF(__pyx_t_7); __pyx_t_14++; if (unlikely(0 < 0)) __PYX_ERR(0, 1561, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_14); __pyx_t_14++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif } @@ -44228,7 +44254,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1559, __pyx_L1_error) + else __PYX_ERR(0, 1561, __pyx_L1_error) } break; } @@ -44240,7 +44266,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1559, __pyx_L1_error) + __PYX_ERR(0, 1561, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -44253,15 +44279,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); #endif __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } else { Py_ssize_t index = -1; - __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_10 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_10)->tp_iternext; @@ -44269,7 +44295,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_8 = __pyx_t_16(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1559, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_10), 2) < 0) __PYX_ERR(0, 1561, __pyx_L1_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L11_unpacking_done; @@ -44277,17 +44303,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1559, __pyx_L1_error) + __PYX_ERR(0, 1561, __pyx_L1_error) __pyx_L11_unpacking_done:; } - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_8); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_13 = __pyx_PyFloat_AsFloat(__pyx_t_8); if (unlikely((__pyx_t_13 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1561, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_p = __pyx_t_12; __pyx_v_v = __pyx_t_13; - /* "_rnaseq_utils.pyx":1560 + /* "_rnaseq_utils.pyx":1562 * lastp, lastv = -1, 0 * for p,v in zip(positions, values): * if lastp >= 0 and lastv != 0: # <<<<<<<<<<<<<< @@ -44305,22 +44331,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __pyx_L13_bool_binop_done:; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1561 + /* "_rnaseq_utils.pyx":1563 * for p,v in zip(positions, values): * if lastp >= 0 and lastv != 0: * output += '{}\t{}\t{}\t{}\n'.format(chrom, lastp+leftmost, [lastp+1, p][contiguous]+leftmost, lastv) # <<<<<<<<<<<<<< * * lastp, lastv = p, v */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__55, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__55, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_lastp + __pyx_v_leftmost)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_lastp + __pyx_v_leftmost)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_lastp + 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_long((__pyx_v_lastp + 1)); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_p); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_3 = PyList_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_10); PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); @@ -44328,16 +44354,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ PyList_SET_ITEM(__pyx_t_3, 1, __pyx_t_9); __pyx_t_10 = 0; __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_t_3, __pyx_v_contiguous, int, 1, __Pyx_PyBool_FromLong, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_t_3, __pyx_v_contiguous, int, 1, __Pyx_PyBool_FromLong, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_leftmost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_leftmost); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = PyNumber_Add(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_10 = PyNumber_Add(__pyx_t_9, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lastv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_lastv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_9 = NULL; __pyx_t_12 = 0; @@ -44354,7 +44380,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_chrom, __pyx_t_4, __pyx_t_10, __pyx_t_3}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -44365,7 +44391,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_9, __pyx_v_chrom, __pyx_t_4, __pyx_t_10, __pyx_t_3}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -44374,7 +44400,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } else #endif { - __pyx_t_11 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); if (__pyx_t_9) { __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL; @@ -44391,19 +44417,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __pyx_t_4 = 0; __pyx_t_10 = 0; __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_output, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1561, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_output, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1561, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_output, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "_rnaseq_utils.pyx":1560 + /* "_rnaseq_utils.pyx":1562 * lastp, lastv = -1, 0 * for p,v in zip(positions, values): * if lastp >= 0 and lastv != 0: # <<<<<<<<<<<<<< @@ -44412,7 +44438,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ */ } - /* "_rnaseq_utils.pyx":1563 + /* "_rnaseq_utils.pyx":1565 * output += '{}\t{}\t{}\t{}\n'.format(chrom, lastp+leftmost, [lastp+1, p][contiguous]+leftmost, lastv) * * lastp, lastv = p, v # <<<<<<<<<<<<<< @@ -44424,7 +44450,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __pyx_v_lastp = __pyx_t_12; __pyx_v_lastv = __pyx_t_13; - /* "_rnaseq_utils.pyx":1559 + /* "_rnaseq_utils.pyx":1561 * values = coverage[positions] * lastp, lastv = -1, 0 * for p,v in zip(positions, values): # <<<<<<<<<<<<<< @@ -44434,7 +44460,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1566 + /* "_rnaseq_utils.pyx":1568 * * * if lastv != 0 and lastp >= 0: # <<<<<<<<<<<<<< @@ -44452,23 +44478,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __pyx_L16_bool_binop_done:; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1567 + /* "_rnaseq_utils.pyx":1569 * * if lastv != 0 and lastp >= 0: * output += '{}\t{}\t{}\t{}\n'.format(chrom, lastp+leftmost, [lastp+1, coverage.shape[0]][contiguous]+leftmost, lastv) # <<<<<<<<<<<<<< * * return output */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__55, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__55, __pyx_n_s_format); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_lastp + __pyx_v_leftmost)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_lastp + __pyx_v_leftmost)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_lastp + 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_From_long((__pyx_v_lastp + 1)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - if (unlikely(!__pyx_v_coverage)) { __Pyx_RaiseUnboundLocalError("coverage"); __PYX_ERR(0, 1567, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_coverage->dimensions[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error) + if (unlikely(!__pyx_v_coverage)) { __Pyx_RaiseUnboundLocalError("coverage"); __PYX_ERR(0, 1569, __pyx_L1_error) } + __pyx_t_3 = __Pyx_PyInt_From_Py_intptr_t((__pyx_v_coverage->dimensions[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_11); PyList_SET_ITEM(__pyx_t_10, 0, __pyx_t_11); @@ -44476,16 +44502,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_3); __pyx_t_11 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_t_10, __pyx_v_contiguous, int, 1, __Pyx_PyBool_FromLong, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_t_10, __pyx_v_contiguous, int, 1, __Pyx_PyBool_FromLong, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_leftmost); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_leftmost); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = PyNumber_Add(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_11 = PyNumber_Add(__pyx_t_3, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = PyFloat_FromDouble(__pyx_v_lastv); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_10 = PyFloat_FromDouble(__pyx_v_lastv); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_t_3 = NULL; __pyx_t_12 = 0; @@ -44502,7 +44528,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_chrom, __pyx_t_7, __pyx_t_11, __pyx_t_10}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -44513,7 +44539,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { PyObject *__pyx_temp[5] = {__pyx_t_3, __pyx_v_chrom, __pyx_t_7, __pyx_t_11, __pyx_t_10}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_12, 4+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -44522,7 +44548,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ } else #endif { - __pyx_t_4 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(4+__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (__pyx_t_3) { __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; @@ -44539,19 +44565,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __pyx_t_7 = 0; __pyx_t_11 = 0; __pyx_t_10 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_output, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_output, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1567, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1569, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_output, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "_rnaseq_utils.pyx":1566 + /* "_rnaseq_utils.pyx":1568 * * * if lastv != 0 and lastp >= 0: # <<<<<<<<<<<<<< @@ -44560,7 +44586,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ */ } - /* "_rnaseq_utils.pyx":1569 + /* "_rnaseq_utils.pyx":1571 * output += '{}\t{}\t{}\t{}\n'.format(chrom, lastp+leftmost, [lastp+1, coverage.shape[0]][contiguous]+leftmost, lastv) * * return output # <<<<<<<<<<<<<< @@ -44572,7 +44598,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_bedgraph(PyObject *__pyx_v_chrom, int _ __pyx_r = __pyx_v_output; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1506 + /* "_rnaseq_utils.pyx":1508 * return depth_matrix, J_plus, J_minus * * cpdef str bedgraph(str chrom, int leftmost, np.ndarray depth_matrix, str seqtype='', int strand=0): # <<<<<<<<<<<<<< @@ -44647,13 +44673,13 @@ static PyObject *__pyx_pw_13_rnaseq_utils_16bedgraph(PyObject *__pyx_self, PyObj case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_leftmost)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("bedgraph", 0, 3, 5, 1); __PYX_ERR(0, 1506, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("bedgraph", 0, 3, 5, 1); __PYX_ERR(0, 1508, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_depth_matrix)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("bedgraph", 0, 3, 5, 2); __PYX_ERR(0, 1506, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("bedgraph", 0, 3, 5, 2); __PYX_ERR(0, 1508, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -44669,7 +44695,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_16bedgraph(PyObject *__pyx_self, PyObj } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bedgraph") < 0)) __PYX_ERR(0, 1506, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "bedgraph") < 0)) __PYX_ERR(0, 1508, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -44685,26 +44711,26 @@ static PyObject *__pyx_pw_13_rnaseq_utils_16bedgraph(PyObject *__pyx_self, PyObj } } __pyx_v_chrom = ((PyObject*)values[0]); - __pyx_v_leftmost = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_leftmost == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L3_error) + __pyx_v_leftmost = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_leftmost == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1508, __pyx_L3_error) __pyx_v_depth_matrix = ((PyArrayObject *)values[2]); __pyx_v_seqtype = ((PyObject*)values[3]); if (values[4]) { - __pyx_v_strand = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_strand == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1506, __pyx_L3_error) + __pyx_v_strand = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_strand == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1508, __pyx_L3_error) } else { __pyx_v_strand = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("bedgraph", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1506, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("bedgraph", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1508, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.bedgraph", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1506, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_depth_matrix), __pyx_ptype_5numpy_ndarray, 1, "depth_matrix", 0))) __PYX_ERR(0, 1506, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seqtype), (&PyUnicode_Type), 1, "seqtype", 1))) __PYX_ERR(0, 1506, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1508, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_depth_matrix), __pyx_ptype_5numpy_ndarray, 1, "depth_matrix", 0))) __PYX_ERR(0, 1508, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seqtype), (&PyUnicode_Type), 1, "seqtype", 1))) __PYX_ERR(0, 1508, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_15bedgraph(__pyx_self, __pyx_v_chrom, __pyx_v_leftmost, __pyx_v_depth_matrix, __pyx_v_seqtype, __pyx_v_strand); /* function exit code */ @@ -44729,7 +44755,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_15bedgraph(CYTHON_UNUSED PyObject *__p __pyx_t_2.__pyx_n = 2; __pyx_t_2.seqtype = __pyx_v_seqtype; __pyx_t_2.strand = __pyx_v_strand; - __pyx_t_1 = __pyx_f_13_rnaseq_utils_bedgraph(__pyx_v_chrom, __pyx_v_leftmost, __pyx_v_depth_matrix, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1506, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_bedgraph(__pyx_v_chrom, __pyx_v_leftmost, __pyx_v_depth_matrix, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -44746,7 +44772,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_15bedgraph(CYTHON_UNUSED PyObject *__p return __pyx_r; } -/* "_rnaseq_utils.pyx":1571 +/* "_rnaseq_utils.pyx":1573 * return output * * cdef str span_to_string((int, int) span): # <<<<<<<<<<<<<< @@ -44769,7 +44795,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_span_to_string(__pyx_ctuple_int__and_in int __pyx_clineno = 0; __Pyx_RefNannySetupContext("span_to_string", 0); - /* "_rnaseq_utils.pyx":1573 + /* "_rnaseq_utils.pyx":1575 * cdef str span_to_string((int, int) span): * """Converts a tuple of two ints to a string connected by ':'""" * return '{}:{}'.format(span[0], span[1]) # <<<<<<<<<<<<<< @@ -44777,11 +44803,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_span_to_string(__pyx_ctuple_int__and_in * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__56, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u__56, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_span.f0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_span.f0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_span.f1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_span.f1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; __pyx_t_6 = 0; @@ -44798,7 +44824,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_span_to_string(__pyx_ctuple_int__and_in #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -44808,7 +44834,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_span_to_string(__pyx_ctuple_int__and_in #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -44816,7 +44842,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_span_to_string(__pyx_ctuple_int__and_in } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -44827,17 +44853,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_span_to_string(__pyx_ctuple_int__and_in PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1573, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1573, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1575, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1571 + /* "_rnaseq_utils.pyx":1573 * return output * * cdef str span_to_string((int, int) span): # <<<<<<<<<<<<<< @@ -44861,7 +44887,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_span_to_string(__pyx_ctuple_int__and_in return __pyx_r; } -/* "_rnaseq_utils.pyx":1576 +/* "_rnaseq_utils.pyx":1578 * * * cdef (int, int) string_to_span(str string): # <<<<<<<<<<<<<< @@ -44883,7 +44909,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_string_to_span(PyObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("string_to_span", 0); - /* "_rnaseq_utils.pyx":1578 + /* "_rnaseq_utils.pyx":1580 * cdef (int, int) string_to_span(str string): * """Converts a string from span_to_string() back into a span""" * cdef list splitstring = string.split(':') # <<<<<<<<<<<<<< @@ -44892,14 +44918,14 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_string_to_span(PyObject */ if (unlikely(__pyx_v_string == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split"); - __PYX_ERR(0, 1578, __pyx_L1_error) + __PYX_ERR(0, 1580, __pyx_L1_error) } - __pyx_t_1 = PyUnicode_Split(__pyx_v_string, __pyx_kp_u__30, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_1 = PyUnicode_Split(__pyx_v_string, __pyx_kp_u__30, -1L); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_splitstring = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1579 + /* "_rnaseq_utils.pyx":1581 * """Converts a string from span_to_string() back into a span""" * cdef list splitstring = string.split(':') * return (int(splitstring[0]), int(splitstring[1])) # <<<<<<<<<<<<<< @@ -44908,32 +44934,32 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_string_to_span(PyObject */ if (unlikely(__pyx_v_splitstring == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1579, __pyx_L1_error) + __PYX_ERR(0, 1581, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_splitstring, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_splitstring, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (unlikely(__pyx_v_splitstring == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1579, __pyx_L1_error) + __PYX_ERR(0, 1581, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_splitstring, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_splitstring, 1, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1579, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1581, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_5.f0 = __pyx_t_3; __pyx_t_5.f1 = __pyx_t_4; __pyx_r = __pyx_t_5; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1576 + /* "_rnaseq_utils.pyx":1578 * * * cdef (int, int) string_to_span(str string): # <<<<<<<<<<<<<< @@ -44953,7 +44979,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_string_to_span(PyObject return __pyx_r; } -/* "_rnaseq_utils.pyx":1582 +/* "_rnaseq_utils.pyx":1584 * * * cdef parse_BED_line(bed_line, chrom_dict, source_dict, source_string=None, s_tag=False, e_tag=False, capped=False, gaps_are_junctions=False, keep_readname=False): # <<<<<<<<<<<<<< @@ -45045,14 +45071,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(__pyx_v_e_tag); __Pyx_INCREF(__pyx_v_capped); - /* "_rnaseq_utils.pyx":1590 + /* "_rnaseq_utils.pyx":1592 * cdef str first, last * cdef bint condensed * bed_elements = bed_line.rstrip().split('\t') # <<<<<<<<<<<<<< * if len(bed_elements) == 15: * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts, weight, source_string, label = bed_elements */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_bed_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1590, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_bed_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -45066,10 +45092,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1590, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1590, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -45084,24 +45110,24 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u__13) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__13); __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_bed_elements = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1591 + /* "_rnaseq_utils.pyx":1593 * cdef bint condensed * bed_elements = bed_line.rstrip().split('\t') * if len(bed_elements) == 15: # <<<<<<<<<<<<<< * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts, weight, source_string, label = bed_elements * elif len(bed_elements) == 12: */ - __pyx_t_5 = PyObject_Length(__pyx_v_bed_elements); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1591, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_v_bed_elements); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1593, __pyx_L1_error) __pyx_t_6 = ((__pyx_t_5 == 15) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1592 + /* "_rnaseq_utils.pyx":1594 * bed_elements = bed_line.rstrip().split('\t') * if len(bed_elements) == 15: * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts, weight, source_string, label = bed_elements # <<<<<<<<<<<<<< @@ -45114,7 +45140,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li if (unlikely(size != 15)) { if (size > 15) __Pyx_RaiseTooManyValuesError(15); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1592, __pyx_L1_error) + __PYX_ERR(0, 1594, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -45170,7 +45196,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li Py_ssize_t i; PyObject** temps[15] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_2,&__pyx_t_4,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12,&__pyx_t_13,&__pyx_t_14,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17}; for (i=0; i < 15; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1592, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -45179,7 +45205,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } else { Py_ssize_t index = -1; PyObject** temps[15] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_2,&__pyx_t_4,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12,&__pyx_t_13,&__pyx_t_14,&__pyx_t_15,&__pyx_t_16,&__pyx_t_17}; - __pyx_t_18 = PyObject_GetIter(__pyx_v_bed_elements); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1592, __pyx_L1_error) + __pyx_t_18 = PyObject_GetIter(__pyx_v_bed_elements); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 1594, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); __pyx_t_19 = Py_TYPE(__pyx_t_18)->tp_iternext; for (index=0; index < 15; index++) { @@ -45187,7 +45213,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 15) < 0) __PYX_ERR(0, 1592, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 15) < 0) __PYX_ERR(0, 1594, __pyx_L1_error) __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; goto __pyx_L5_unpacking_done; @@ -45195,7 +45221,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1592, __pyx_L1_error) + __PYX_ERR(0, 1594, __pyx_L1_error) __pyx_L5_unpacking_done:; } __pyx_v_chrom_string = __pyx_t_1; @@ -45229,7 +45255,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_v_label = __pyx_t_17; __pyx_t_17 = 0; - /* "_rnaseq_utils.pyx":1591 + /* "_rnaseq_utils.pyx":1593 * cdef bint condensed * bed_elements = bed_line.rstrip().split('\t') * if len(bed_elements) == 15: # <<<<<<<<<<<<<< @@ -45239,18 +45265,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1593 + /* "_rnaseq_utils.pyx":1595 * if len(bed_elements) == 15: * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts, weight, source_string, label = bed_elements * elif len(bed_elements) == 12: # <<<<<<<<<<<<<< * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts = bed_elements * try: */ - __pyx_t_5 = PyObject_Length(__pyx_v_bed_elements); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1593, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_v_bed_elements); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1595, __pyx_L1_error) __pyx_t_6 = ((__pyx_t_5 == 12) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1594 + /* "_rnaseq_utils.pyx":1596 * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts, weight, source_string, label = bed_elements * elif len(bed_elements) == 12: * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts = bed_elements # <<<<<<<<<<<<<< @@ -45263,7 +45289,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li if (unlikely(size != 12)) { if (size > 12) __Pyx_RaiseTooManyValuesError(12); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1594, __pyx_L1_error) + __PYX_ERR(0, 1596, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -45310,7 +45336,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li Py_ssize_t i; PyObject** temps[12] = {&__pyx_t_17,&__pyx_t_16,&__pyx_t_15,&__pyx_t_14,&__pyx_t_13,&__pyx_t_12,&__pyx_t_11,&__pyx_t_10,&__pyx_t_9,&__pyx_t_8,&__pyx_t_7,&__pyx_t_4}; for (i=0; i < 12; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1594, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -45319,7 +45345,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } else { Py_ssize_t index = -1; PyObject** temps[12] = {&__pyx_t_17,&__pyx_t_16,&__pyx_t_15,&__pyx_t_14,&__pyx_t_13,&__pyx_t_12,&__pyx_t_11,&__pyx_t_10,&__pyx_t_9,&__pyx_t_8,&__pyx_t_7,&__pyx_t_4}; - __pyx_t_2 = PyObject_GetIter(__pyx_v_bed_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1594, __pyx_L1_error) + __pyx_t_2 = PyObject_GetIter(__pyx_v_bed_elements); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_19 = Py_TYPE(__pyx_t_2)->tp_iternext; for (index=0; index < 12; index++) { @@ -45327,7 +45353,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_2), 12) < 0) __PYX_ERR(0, 1594, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_2), 12) < 0) __PYX_ERR(0, 1596, __pyx_L1_error) __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L7_unpacking_done; @@ -45335,7 +45361,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1594, __pyx_L1_error) + __PYX_ERR(0, 1596, __pyx_L1_error) __pyx_L7_unpacking_done:; } __pyx_v_chrom_string = __pyx_t_17; @@ -45363,7 +45389,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_v_blockStarts = __pyx_t_4; __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":1595 + /* "_rnaseq_utils.pyx":1597 * elif len(bed_elements) == 12: * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts = bed_elements * try: # <<<<<<<<<<<<<< @@ -45379,19 +45405,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_XGOTREF(__pyx_t_22); /*try:*/ { - /* "_rnaseq_utils.pyx":1596 + /* "_rnaseq_utils.pyx":1598 * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts = bed_elements * try: * weight = float(score) # <<<<<<<<<<<<<< * except: * weight = float(1) */ - __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_v_score); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1596, __pyx_L8_error) + __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_v_score); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1598, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_weight = __pyx_t_4; __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":1595 + /* "_rnaseq_utils.pyx":1597 * elif len(bed_elements) == 12: * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts = bed_elements * try: # <<<<<<<<<<<<<< @@ -45421,7 +45447,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":1597 + /* "_rnaseq_utils.pyx":1599 * try: * weight = float(score) * except: # <<<<<<<<<<<<<< @@ -45430,19 +45456,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ /*except:*/ { __Pyx_AddTraceback("_rnaseq_utils.parse_BED_line", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 1597, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 1599, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); - /* "_rnaseq_utils.pyx":1598 + /* "_rnaseq_utils.pyx":1600 * weight = float(score) * except: * weight = float(1) # <<<<<<<<<<<<<< * * label = None */ - __pyx_t_9 = __Pyx_PyNumber_Float(__pyx_int_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1598, __pyx_L10_except_error) + __pyx_t_9 = __Pyx_PyNumber_Float(__pyx_int_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1600, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF_SET(__pyx_v_weight, __pyx_t_9); __pyx_t_9 = 0; @@ -45453,7 +45479,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L10_except_error:; - /* "_rnaseq_utils.pyx":1595 + /* "_rnaseq_utils.pyx":1597 * elif len(bed_elements) == 12: * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts = bed_elements * try: # <<<<<<<<<<<<<< @@ -45473,7 +45499,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_L13_try_end:; } - /* "_rnaseq_utils.pyx":1600 + /* "_rnaseq_utils.pyx":1602 * weight = float(1) * * label = None # <<<<<<<<<<<<<< @@ -45483,7 +45509,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_None); __pyx_v_label = Py_None; - /* "_rnaseq_utils.pyx":1593 + /* "_rnaseq_utils.pyx":1595 * if len(bed_elements) == 15: * chrom_string, chromStart, end, readname, score, bed_strand, mmnum, mmorder, rgb, blocknum, blockSizes, blockStarts, weight, source_string, label = bed_elements * elif len(bed_elements) == 12: # <<<<<<<<<<<<<< @@ -45493,18 +45519,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1601 + /* "_rnaseq_utils.pyx":1603 * * label = None * elif len(bed_elements) == 6: # <<<<<<<<<<<<<< * chrom_string, chromStart, end, readname, score, bed_strand = bed_elements * blockSizes = str(int(end)-int(chromStart)) */ - __pyx_t_5 = PyObject_Length(__pyx_v_bed_elements); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1601, __pyx_L1_error) + __pyx_t_5 = PyObject_Length(__pyx_v_bed_elements); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1603, __pyx_L1_error) __pyx_t_6 = ((__pyx_t_5 == 6) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1602 + /* "_rnaseq_utils.pyx":1604 * label = None * elif len(bed_elements) == 6: * chrom_string, chromStart, end, readname, score, bed_strand = bed_elements # <<<<<<<<<<<<<< @@ -45517,7 +45543,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li if (unlikely(size != 6)) { if (size > 6) __Pyx_RaiseTooManyValuesError(6); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1602, __pyx_L1_error) + __PYX_ERR(0, 1604, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -45546,7 +45572,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li Py_ssize_t i; PyObject** temps[6] = {&__pyx_t_8,&__pyx_t_7,&__pyx_t_4,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11}; for (i=0; i < 6; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1602, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -45555,7 +45581,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } else { Py_ssize_t index = -1; PyObject** temps[6] = {&__pyx_t_8,&__pyx_t_7,&__pyx_t_4,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11}; - __pyx_t_12 = PyObject_GetIter(__pyx_v_bed_elements); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1602, __pyx_L1_error) + __pyx_t_12 = PyObject_GetIter(__pyx_v_bed_elements); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_19 = Py_TYPE(__pyx_t_12)->tp_iternext; for (index=0; index < 6; index++) { @@ -45563,7 +45589,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_12), 6) < 0) __PYX_ERR(0, 1602, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_12), 6) < 0) __PYX_ERR(0, 1604, __pyx_L1_error) __pyx_t_19 = NULL; __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L17_unpacking_done; @@ -45571,7 +45597,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_19 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1602, __pyx_L1_error) + __PYX_ERR(0, 1604, __pyx_L1_error) __pyx_L17_unpacking_done:; } __pyx_v_chrom_string = __pyx_t_8; @@ -45587,28 +45613,28 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_v_bed_strand = __pyx_t_11; __pyx_t_11 = 0; - /* "_rnaseq_utils.pyx":1603 + /* "_rnaseq_utils.pyx":1605 * elif len(bed_elements) == 6: * chrom_string, chromStart, end, readname, score, bed_strand = bed_elements * blockSizes = str(int(end)-int(chromStart)) # <<<<<<<<<<<<<< * blockStarts = '0' * label = None */ - __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_v_end); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1603, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyNumber_Int(__pyx_v_end); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = __Pyx_PyNumber_Int(__pyx_v_chromStart); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1603, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyNumber_Int(__pyx_v_chromStart); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = PyNumber_Subtract(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1603, __pyx_L1_error) + __pyx_t_9 = PyNumber_Subtract(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1603, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1605, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_v_blockSizes = __pyx_t_10; __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1604 + /* "_rnaseq_utils.pyx":1606 * chrom_string, chromStart, end, readname, score, bed_strand = bed_elements * blockSizes = str(int(end)-int(chromStart)) * blockStarts = '0' # <<<<<<<<<<<<<< @@ -45618,7 +45644,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(__pyx_kp_u_0); __pyx_v_blockStarts = __pyx_kp_u_0; - /* "_rnaseq_utils.pyx":1605 + /* "_rnaseq_utils.pyx":1607 * blockSizes = str(int(end)-int(chromStart)) * blockStarts = '0' * label = None # <<<<<<<<<<<<<< @@ -45628,7 +45654,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_None); __pyx_v_label = Py_None; - /* "_rnaseq_utils.pyx":1606 + /* "_rnaseq_utils.pyx":1608 * blockStarts = '0' * label = None * try: # <<<<<<<<<<<<<< @@ -45644,19 +45670,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_XGOTREF(__pyx_t_20); /*try:*/ { - /* "_rnaseq_utils.pyx":1607 + /* "_rnaseq_utils.pyx":1609 * label = None * try: * weight = float(score) # <<<<<<<<<<<<<< * except: * weight = float(1) */ - __pyx_t_10 = __Pyx_PyNumber_Float(__pyx_v_score); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1607, __pyx_L18_error) + __pyx_t_10 = __Pyx_PyNumber_Float(__pyx_v_score); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1609, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_10); __pyx_v_weight = __pyx_t_10; __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1606 + /* "_rnaseq_utils.pyx":1608 * blockStarts = '0' * label = None * try: # <<<<<<<<<<<<<< @@ -45686,7 +45712,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":1608 + /* "_rnaseq_utils.pyx":1610 * try: * weight = float(score) * except: # <<<<<<<<<<<<<< @@ -45695,19 +45721,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ /*except:*/ { __Pyx_AddTraceback("_rnaseq_utils.parse_BED_line", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_11) < 0) __PYX_ERR(0, 1608, __pyx_L20_except_error) + if (__Pyx_GetException(&__pyx_t_10, &__pyx_t_9, &__pyx_t_11) < 0) __PYX_ERR(0, 1610, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_11); - /* "_rnaseq_utils.pyx":1609 + /* "_rnaseq_utils.pyx":1611 * weight = float(score) * except: * weight = float(1) # <<<<<<<<<<<<<< * * if bed_strand == '+': */ - __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_int_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1609, __pyx_L20_except_error) + __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_int_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1611, __pyx_L20_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_weight, __pyx_t_4); __pyx_t_4 = 0; @@ -45718,7 +45744,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L20_except_error:; - /* "_rnaseq_utils.pyx":1606 + /* "_rnaseq_utils.pyx":1608 * blockStarts = '0' * label = None * try: # <<<<<<<<<<<<<< @@ -45738,7 +45764,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_L23_try_end:; } - /* "_rnaseq_utils.pyx":1601 + /* "_rnaseq_utils.pyx":1603 * * label = None * elif len(bed_elements) == 6: # <<<<<<<<<<<<<< @@ -45748,18 +45774,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L3:; - /* "_rnaseq_utils.pyx":1611 + /* "_rnaseq_utils.pyx":1613 * weight = float(1) * * if bed_strand == '+': # <<<<<<<<<<<<<< * strand = 1 * elif bed_strand == '-': */ - if (unlikely(!__pyx_v_bed_strand)) { __Pyx_RaiseUnboundLocalError("bed_strand"); __PYX_ERR(0, 1611, __pyx_L1_error) } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_bed_strand, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1611, __pyx_L1_error) + if (unlikely(!__pyx_v_bed_strand)) { __Pyx_RaiseUnboundLocalError("bed_strand"); __PYX_ERR(0, 1613, __pyx_L1_error) } + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_bed_strand, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1613, __pyx_L1_error) if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1612 + /* "_rnaseq_utils.pyx":1614 * * if bed_strand == '+': * strand = 1 # <<<<<<<<<<<<<< @@ -45768,7 +45794,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ __pyx_v_strand = 1; - /* "_rnaseq_utils.pyx":1611 + /* "_rnaseq_utils.pyx":1613 * weight = float(1) * * if bed_strand == '+': # <<<<<<<<<<<<<< @@ -45778,18 +45804,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L26; } - /* "_rnaseq_utils.pyx":1613 + /* "_rnaseq_utils.pyx":1615 * if bed_strand == '+': * strand = 1 * elif bed_strand == '-': # <<<<<<<<<<<<<< * strand = -1 * else: */ - if (unlikely(!__pyx_v_bed_strand)) { __Pyx_RaiseUnboundLocalError("bed_strand"); __PYX_ERR(0, 1613, __pyx_L1_error) } - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_bed_strand, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1613, __pyx_L1_error) + if (unlikely(!__pyx_v_bed_strand)) { __Pyx_RaiseUnboundLocalError("bed_strand"); __PYX_ERR(0, 1615, __pyx_L1_error) } + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_bed_strand, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1615, __pyx_L1_error) if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1614 + /* "_rnaseq_utils.pyx":1616 * strand = 1 * elif bed_strand == '-': * strand = -1 # <<<<<<<<<<<<<< @@ -45798,7 +45824,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ __pyx_v_strand = -1L; - /* "_rnaseq_utils.pyx":1613 + /* "_rnaseq_utils.pyx":1615 * if bed_strand == '+': * strand = 1 * elif bed_strand == '-': # <<<<<<<<<<<<<< @@ -45808,7 +45834,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L26; } - /* "_rnaseq_utils.pyx":1616 + /* "_rnaseq_utils.pyx":1618 * strand = -1 * else: * strand = 0 # <<<<<<<<<<<<<< @@ -45820,7 +45846,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L26:; - /* "_rnaseq_utils.pyx":1618 + /* "_rnaseq_utils.pyx":1620 * strand = 0 * * condensed = False # <<<<<<<<<<<<<< @@ -45829,47 +45855,47 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ __pyx_v_condensed = 0; - /* "_rnaseq_utils.pyx":1619 + /* "_rnaseq_utils.pyx":1621 * * condensed = False * ranges = get_block_ranges(chromStart, blockStarts, blockSizes) # <<<<<<<<<<<<<< * if label is not None: # Determine what kind of end labels exist based on the label * first, last = label[0].upper(), label[-1].upper() */ - if (unlikely(!__pyx_v_chromStart)) { __Pyx_RaiseUnboundLocalError("chromStart"); __PYX_ERR(0, 1619, __pyx_L1_error) } - if (!(likely(PyUnicode_CheckExact(__pyx_v_chromStart))||((__pyx_v_chromStart) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_chromStart)->tp_name), 0))) __PYX_ERR(0, 1619, __pyx_L1_error) - if (unlikely(!__pyx_v_blockStarts)) { __Pyx_RaiseUnboundLocalError("blockStarts"); __PYX_ERR(0, 1619, __pyx_L1_error) } - if (!(likely(PyUnicode_CheckExact(__pyx_v_blockStarts))||((__pyx_v_blockStarts) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_blockStarts)->tp_name), 0))) __PYX_ERR(0, 1619, __pyx_L1_error) - if (unlikely(!__pyx_v_blockSizes)) { __Pyx_RaiseUnboundLocalError("blockSizes"); __PYX_ERR(0, 1619, __pyx_L1_error) } - if (!(likely(PyUnicode_CheckExact(__pyx_v_blockSizes))||((__pyx_v_blockSizes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_blockSizes)->tp_name), 0))) __PYX_ERR(0, 1619, __pyx_L1_error) - __pyx_t_11 = __pyx_f_13_rnaseq_utils_get_block_ranges(((PyObject*)__pyx_v_chromStart), ((PyObject*)__pyx_v_blockStarts), ((PyObject*)__pyx_v_blockSizes)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1619, __pyx_L1_error) + if (unlikely(!__pyx_v_chromStart)) { __Pyx_RaiseUnboundLocalError("chromStart"); __PYX_ERR(0, 1621, __pyx_L1_error) } + if (!(likely(PyUnicode_CheckExact(__pyx_v_chromStart))||((__pyx_v_chromStart) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_chromStart)->tp_name), 0))) __PYX_ERR(0, 1621, __pyx_L1_error) + if (unlikely(!__pyx_v_blockStarts)) { __Pyx_RaiseUnboundLocalError("blockStarts"); __PYX_ERR(0, 1621, __pyx_L1_error) } + if (!(likely(PyUnicode_CheckExact(__pyx_v_blockStarts))||((__pyx_v_blockStarts) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_blockStarts)->tp_name), 0))) __PYX_ERR(0, 1621, __pyx_L1_error) + if (unlikely(!__pyx_v_blockSizes)) { __Pyx_RaiseUnboundLocalError("blockSizes"); __PYX_ERR(0, 1621, __pyx_L1_error) } + if (!(likely(PyUnicode_CheckExact(__pyx_v_blockSizes))||((__pyx_v_blockSizes) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_blockSizes)->tp_name), 0))) __PYX_ERR(0, 1621, __pyx_L1_error) + __pyx_t_11 = __pyx_f_13_rnaseq_utils_get_block_ranges(((PyObject*)__pyx_v_chromStart), ((PyObject*)__pyx_v_blockStarts), ((PyObject*)__pyx_v_blockSizes)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1621, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __pyx_v_ranges = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; - /* "_rnaseq_utils.pyx":1620 + /* "_rnaseq_utils.pyx":1622 * condensed = False * ranges = get_block_ranges(chromStart, blockStarts, blockSizes) * if label is not None: # Determine what kind of end labels exist based on the label # <<<<<<<<<<<<<< * first, last = label[0].upper(), label[-1].upper() * condensed = first != label[0] or last != label[-1] */ - if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1620, __pyx_L1_error) } + if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1622, __pyx_L1_error) } __pyx_t_6 = (__pyx_v_label != Py_None); __pyx_t_23 = (__pyx_t_6 != 0); if (__pyx_t_23) { - /* "_rnaseq_utils.pyx":1621 + /* "_rnaseq_utils.pyx":1623 * ranges = get_block_ranges(chromStart, blockStarts, blockSizes) * if label is not None: # Determine what kind of end labels exist based on the label * first, last = label[0].upper(), label[-1].upper() # <<<<<<<<<<<<<< * condensed = first != label[0] or last != label[-1] * s_tag = e_tag = capped = False */ - if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1621, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_label, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1621, __pyx_L1_error) + if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1623, __pyx_L1_error) } + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_label, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_upper); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1621, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_upper); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -45884,14 +45910,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_t_11 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_10); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1621, __pyx_L1_error) + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_11)->tp_name), 0))) __PYX_ERR(0, 1621, __pyx_L1_error) - if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1621, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_label, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1621, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_11)->tp_name), 0))) __PYX_ERR(0, 1623, __pyx_L1_error) + if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1623, __pyx_L1_error) } + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_label, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1621, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; @@ -45906,42 +45932,42 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_t_10 = (__pyx_t_9) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1621, __pyx_L1_error) + if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1623, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 1621, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 1623, __pyx_L1_error) __pyx_v_first = ((PyObject*)__pyx_t_11); __pyx_t_11 = 0; __pyx_v_last = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1622 + /* "_rnaseq_utils.pyx":1624 * if label is not None: # Determine what kind of end labels exist based on the label * first, last = label[0].upper(), label[-1].upper() * condensed = first != label[0] or last != label[-1] # <<<<<<<<<<<<<< * s_tag = e_tag = capped = False * if strand == 1: */ - if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1622, __pyx_L1_error) } - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_label, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1622, __pyx_L1_error) + if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1624, __pyx_L1_error) } + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_label, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_t_10, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1622, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_t_10, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (!__pyx_t_6) { } else { __pyx_t_23 = __pyx_t_6; goto __pyx_L28_bool_binop_done; } - if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1622, __pyx_L1_error) } - __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_label, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1622, __pyx_L1_error) + if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1624, __pyx_L1_error) } + __pyx_t_10 = __Pyx_GetItemInt(__pyx_v_label, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_t_10, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1622, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_t_10, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1624, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_23 = __pyx_t_6; __pyx_L28_bool_binop_done:; __pyx_v_condensed = __pyx_t_23; - /* "_rnaseq_utils.pyx":1623 + /* "_rnaseq_utils.pyx":1625 * first, last = label[0].upper(), label[-1].upper() * condensed = first != label[0] or last != label[-1] * s_tag = e_tag = capped = False # <<<<<<<<<<<<<< @@ -45955,7 +45981,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_capped, Py_False); - /* "_rnaseq_utils.pyx":1624 + /* "_rnaseq_utils.pyx":1626 * condensed = first != label[0] or last != label[-1] * s_tag = e_tag = capped = False * if strand == 1: # <<<<<<<<<<<<<< @@ -45965,18 +45991,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":1625 + /* "_rnaseq_utils.pyx":1627 * s_tag = e_tag = capped = False * if strand == 1: * if first == 'C': # <<<<<<<<<<<<<< * s_tag = capped = True * elif first == 'S': */ - __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1625, __pyx_L1_error) + __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1627, __pyx_L1_error) __pyx_t_6 = (__pyx_t_23 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1626 + /* "_rnaseq_utils.pyx":1628 * if strand == 1: * if first == 'C': * s_tag = capped = True # <<<<<<<<<<<<<< @@ -45988,7 +46014,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_capped, Py_True); - /* "_rnaseq_utils.pyx":1625 + /* "_rnaseq_utils.pyx":1627 * s_tag = e_tag = capped = False * if strand == 1: * if first == 'C': # <<<<<<<<<<<<<< @@ -45998,18 +46024,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L30; } - /* "_rnaseq_utils.pyx":1627 + /* "_rnaseq_utils.pyx":1629 * if first == 'C': * s_tag = capped = True * elif first == 'S': # <<<<<<<<<<<<<< * s_tag = True * */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1627, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1629, __pyx_L1_error) __pyx_t_23 = (__pyx_t_6 != 0); if (__pyx_t_23) { - /* "_rnaseq_utils.pyx":1628 + /* "_rnaseq_utils.pyx":1630 * s_tag = capped = True * elif first == 'S': * s_tag = True # <<<<<<<<<<<<<< @@ -46019,7 +46045,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_s_tag, Py_True); - /* "_rnaseq_utils.pyx":1627 + /* "_rnaseq_utils.pyx":1629 * if first == 'C': * s_tag = capped = True * elif first == 'S': # <<<<<<<<<<<<<< @@ -46029,18 +46055,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L30:; - /* "_rnaseq_utils.pyx":1630 + /* "_rnaseq_utils.pyx":1632 * s_tag = True * * if last == 'E': # <<<<<<<<<<<<<< * e_tag = True * */ - __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1630, __pyx_L1_error) + __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1632, __pyx_L1_error) __pyx_t_6 = (__pyx_t_23 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1631 + /* "_rnaseq_utils.pyx":1633 * * if last == 'E': * e_tag = True # <<<<<<<<<<<<<< @@ -46050,7 +46076,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_e_tag, Py_True); - /* "_rnaseq_utils.pyx":1630 + /* "_rnaseq_utils.pyx":1632 * s_tag = True * * if last == 'E': # <<<<<<<<<<<<<< @@ -46059,7 +46085,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ } - /* "_rnaseq_utils.pyx":1633 + /* "_rnaseq_utils.pyx":1635 * e_tag = True * * splice = [True if i=='D' else False for i in label[1:-1:2]] # <<<<<<<<<<<<<< @@ -46067,18 +46093,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li * if last == 'C': */ { /* enter inner scope */ - __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1633, __pyx_L34_error) + __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1635, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_10); - if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1633, __pyx_L34_error) } - __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_label, __pyx_slice__57); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1633, __pyx_L34_error) + if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1635, __pyx_L34_error) } + __pyx_t_11 = __Pyx_PyObject_GetItem(__pyx_v_label, __pyx_slice__57); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1635, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_11); if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) { __pyx_t_4 = __pyx_t_11; __Pyx_INCREF(__pyx_t_4); __pyx_t_5 = 0; __pyx_t_24 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1633, __pyx_L34_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1635, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_24 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1633, __pyx_L34_error) + __pyx_t_24 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1635, __pyx_L34_error) } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; for (;;) { @@ -46086,17 +46112,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li if (likely(PyList_CheckExact(__pyx_t_4))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1633, __pyx_L34_error) + __pyx_t_11 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1635, __pyx_L34_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1633, __pyx_L34_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1635, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_11); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1633, __pyx_L34_error) + __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_11); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1635, __pyx_L34_error) #else - __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1633, __pyx_L34_error) + __pyx_t_11 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1635, __pyx_L34_error) __Pyx_GOTREF(__pyx_t_11); #endif } @@ -46106,7 +46132,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1633, __pyx_L34_error) + else __PYX_ERR(0, 1635, __pyx_L34_error) } break; } @@ -46114,7 +46140,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __Pyx_XDECREF_SET(__pyx_9genexpr40__pyx_v_i, __pyx_t_11); __pyx_t_11 = 0; - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_9genexpr40__pyx_v_i, __pyx_n_u_D, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1633, __pyx_L34_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_9genexpr40__pyx_v_i, __pyx_n_u_D, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1635, __pyx_L34_error) if (__pyx_t_6) { __Pyx_INCREF(Py_True); __pyx_t_11 = Py_True; @@ -46122,7 +46148,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_False); __pyx_t_11 = Py_False; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1633, __pyx_L34_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1635, __pyx_L34_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -46136,7 +46162,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_v_splice = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1624 + /* "_rnaseq_utils.pyx":1626 * condensed = first != label[0] or last != label[-1] * s_tag = e_tag = capped = False * if strand == 1: # <<<<<<<<<<<<<< @@ -46146,18 +46172,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li break; case -1L: - /* "_rnaseq_utils.pyx":1635 + /* "_rnaseq_utils.pyx":1637 * splice = [True if i=='D' else False for i in label[1:-1:2]] * elif strand == -1: * if last == 'C': # <<<<<<<<<<<<<< * s_tag = capped = True * elif last == 'S': */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1635, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_C, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1637, __pyx_L1_error) __pyx_t_23 = (__pyx_t_6 != 0); if (__pyx_t_23) { - /* "_rnaseq_utils.pyx":1636 + /* "_rnaseq_utils.pyx":1638 * elif strand == -1: * if last == 'C': * s_tag = capped = True # <<<<<<<<<<<<<< @@ -46169,7 +46195,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_capped, Py_True); - /* "_rnaseq_utils.pyx":1635 + /* "_rnaseq_utils.pyx":1637 * splice = [True if i=='D' else False for i in label[1:-1:2]] * elif strand == -1: * if last == 'C': # <<<<<<<<<<<<<< @@ -46179,18 +46205,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L38; } - /* "_rnaseq_utils.pyx":1637 + /* "_rnaseq_utils.pyx":1639 * if last == 'C': * s_tag = capped = True * elif last == 'S': # <<<<<<<<<<<<<< * s_tag = True * */ - __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1637, __pyx_L1_error) + __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_v_last, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1639, __pyx_L1_error) __pyx_t_6 = (__pyx_t_23 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1638 + /* "_rnaseq_utils.pyx":1640 * s_tag = capped = True * elif last == 'S': * s_tag = True # <<<<<<<<<<<<<< @@ -46200,7 +46226,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_s_tag, Py_True); - /* "_rnaseq_utils.pyx":1637 + /* "_rnaseq_utils.pyx":1639 * if last == 'C': * s_tag = capped = True * elif last == 'S': # <<<<<<<<<<<<<< @@ -46210,18 +46236,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L38:; - /* "_rnaseq_utils.pyx":1640 + /* "_rnaseq_utils.pyx":1642 * s_tag = True * * if first == 'E': # <<<<<<<<<<<<<< * e_tag = True * */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1640, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_first, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1642, __pyx_L1_error) __pyx_t_23 = (__pyx_t_6 != 0); if (__pyx_t_23) { - /* "_rnaseq_utils.pyx":1641 + /* "_rnaseq_utils.pyx":1643 * * if first == 'E': * e_tag = True # <<<<<<<<<<<<<< @@ -46231,7 +46257,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_True); __Pyx_DECREF_SET(__pyx_v_e_tag, Py_True); - /* "_rnaseq_utils.pyx":1640 + /* "_rnaseq_utils.pyx":1642 * s_tag = True * * if first == 'E': # <<<<<<<<<<<<<< @@ -46240,7 +46266,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ } - /* "_rnaseq_utils.pyx":1643 + /* "_rnaseq_utils.pyx":1645 * e_tag = True * * splice = [True if i=='A' else False for i in label[1:-1:2]] # <<<<<<<<<<<<<< @@ -46248,18 +46274,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li * splice = [False]*(len(ranges)-1) */ { /* enter inner scope */ - __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1643, __pyx_L42_error) + __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1645, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_10); - if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1643, __pyx_L42_error) } - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_label, __pyx_slice__57); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L42_error) + if (unlikely(!__pyx_v_label)) { __Pyx_RaiseUnboundLocalError("label"); __PYX_ERR(0, 1645, __pyx_L42_error) } + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_label, __pyx_slice__57); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1645, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_4); if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) { __pyx_t_11 = __pyx_t_4; __Pyx_INCREF(__pyx_t_11); __pyx_t_5 = 0; __pyx_t_24 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1643, __pyx_L42_error) + __pyx_t_5 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1645, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_24 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1643, __pyx_L42_error) + __pyx_t_24 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 1645, __pyx_L42_error) } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { @@ -46267,17 +46293,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li if (likely(PyList_CheckExact(__pyx_t_11))) { if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1643, __pyx_L42_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1645, __pyx_L42_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L42_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1645, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_11)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1643, __pyx_L42_error) + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1645, __pyx_L42_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1643, __pyx_L42_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_11, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1645, __pyx_L42_error) __Pyx_GOTREF(__pyx_t_4); #endif } @@ -46287,7 +46313,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1643, __pyx_L42_error) + else __PYX_ERR(0, 1645, __pyx_L42_error) } break; } @@ -46295,7 +46321,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __Pyx_XDECREF_SET(__pyx_9genexpr41__pyx_v_i, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_9genexpr41__pyx_v_i, __pyx_n_u_A, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1643, __pyx_L42_error) + __pyx_t_23 = (__Pyx_PyUnicode_Equals(__pyx_9genexpr41__pyx_v_i, __pyx_n_u_A, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1645, __pyx_L42_error) if (__pyx_t_23) { __Pyx_INCREF(Py_True); __pyx_t_4 = Py_True; @@ -46303,7 +46329,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __Pyx_INCREF(Py_False); __pyx_t_4 = Py_False; } - if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1643, __pyx_L42_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_10, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1645, __pyx_L42_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; @@ -46317,7 +46343,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_v_splice = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1634 + /* "_rnaseq_utils.pyx":1636 * * splice = [True if i=='D' else False for i in label[1:-1:2]] * elif strand == -1: # <<<<<<<<<<<<<< @@ -46327,7 +46353,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li break; default: - /* "_rnaseq_utils.pyx":1645 + /* "_rnaseq_utils.pyx":1647 * splice = [True if i=='A' else False for i in label[1:-1:2]] * else: * splice = [False]*(len(ranges)-1) # <<<<<<<<<<<<<< @@ -46336,10 +46362,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1645, __pyx_L1_error) + __PYX_ERR(0, 1647, __pyx_L1_error) } - __pyx_t_5 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1645, __pyx_L1_error) - __pyx_t_10 = PyList_New(1 * (((__pyx_t_5 - 1)<0) ? 0:(__pyx_t_5 - 1))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1645, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_10 = PyList_New(1 * (((__pyx_t_5 - 1)<0) ? 0:(__pyx_t_5 - 1))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1647, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (__pyx_t_5 - 1); __pyx_temp++) { @@ -46353,7 +46379,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li break; } - /* "_rnaseq_utils.pyx":1620 + /* "_rnaseq_utils.pyx":1622 * condensed = False * ranges = get_block_ranges(chromStart, blockStarts, blockSizes) * if label is not None: # Determine what kind of end labels exist based on the label # <<<<<<<<<<<<<< @@ -46363,7 +46389,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L27; } - /* "_rnaseq_utils.pyx":1647 + /* "_rnaseq_utils.pyx":1649 * splice = [False]*(len(ranges)-1) * else: * if gaps_are_junctions: # <<<<<<<<<<<<<< @@ -46371,10 +46397,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li * else: */ /*else*/ { - __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_v_gaps_are_junctions); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1647, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyObject_IsTrue(__pyx_v_gaps_are_junctions); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1649, __pyx_L1_error) if (__pyx_t_23) { - /* "_rnaseq_utils.pyx":1648 + /* "_rnaseq_utils.pyx":1650 * else: * if gaps_are_junctions: * splice = [True]*(len(ranges)-1) # <<<<<<<<<<<<<< @@ -46383,10 +46409,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1648, __pyx_L1_error) + __PYX_ERR(0, 1650, __pyx_L1_error) } - __pyx_t_5 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1648, __pyx_L1_error) - __pyx_t_10 = PyList_New(1 * (((__pyx_t_5 - 1)<0) ? 0:(__pyx_t_5 - 1))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1648, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1650, __pyx_L1_error) + __pyx_t_10 = PyList_New(1 * (((__pyx_t_5 - 1)<0) ? 0:(__pyx_t_5 - 1))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1650, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (__pyx_t_5 - 1); __pyx_temp++) { @@ -46398,7 +46424,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_v_splice = ((PyObject*)__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1647 + /* "_rnaseq_utils.pyx":1649 * splice = [False]*(len(ranges)-1) * else: * if gaps_are_junctions: # <<<<<<<<<<<<<< @@ -46408,7 +46434,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L46; } - /* "_rnaseq_utils.pyx":1650 + /* "_rnaseq_utils.pyx":1652 * splice = [True]*(len(ranges)-1) * else: * splice = [False]*(len(ranges)-1) # <<<<<<<<<<<<<< @@ -46418,10 +46444,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li /*else*/ { if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1650, __pyx_L1_error) + __PYX_ERR(0, 1652, __pyx_L1_error) } - __pyx_t_5 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1650, __pyx_L1_error) - __pyx_t_10 = PyList_New(1 * (((__pyx_t_5 - 1)<0) ? 0:(__pyx_t_5 - 1))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1650, __pyx_L1_error) + __pyx_t_5 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1652, __pyx_L1_error) + __pyx_t_10 = PyList_New(1 * (((__pyx_t_5 - 1)<0) ? 0:(__pyx_t_5 - 1))); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1652, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); { Py_ssize_t __pyx_temp; for (__pyx_temp=0; __pyx_temp < (__pyx_t_5 - 1); __pyx_temp++) { @@ -46437,32 +46463,32 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L27:; - /* "_rnaseq_utils.pyx":1652 + /* "_rnaseq_utils.pyx":1654 * splice = [False]*(len(ranges)-1) * * if chrom_string in chrom_dict: # <<<<<<<<<<<<<< * chrom = chrom_dict[chrom_string] * else: */ - if (unlikely(!__pyx_v_chrom_string)) { __Pyx_RaiseUnboundLocalError("chrom_string"); __PYX_ERR(0, 1652, __pyx_L1_error) } - __pyx_t_23 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom_string, __pyx_v_chrom_dict, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1652, __pyx_L1_error) + if (unlikely(!__pyx_v_chrom_string)) { __Pyx_RaiseUnboundLocalError("chrom_string"); __PYX_ERR(0, 1654, __pyx_L1_error) } + __pyx_t_23 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom_string, __pyx_v_chrom_dict, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1654, __pyx_L1_error) __pyx_t_6 = (__pyx_t_23 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1653 + /* "_rnaseq_utils.pyx":1655 * * if chrom_string in chrom_dict: * chrom = chrom_dict[chrom_string] # <<<<<<<<<<<<<< * else: * chrom = chrom_string */ - if (unlikely(!__pyx_v_chrom_string)) { __Pyx_RaiseUnboundLocalError("chrom_string"); __PYX_ERR(0, 1653, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_chrom_dict, __pyx_v_chrom_string); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1653, __pyx_L1_error) + if (unlikely(!__pyx_v_chrom_string)) { __Pyx_RaiseUnboundLocalError("chrom_string"); __PYX_ERR(0, 1655, __pyx_L1_error) } + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_chrom_dict, __pyx_v_chrom_string); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1655, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_v_chrom = __pyx_t_10; __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1652 + /* "_rnaseq_utils.pyx":1654 * splice = [False]*(len(ranges)-1) * * if chrom_string in chrom_dict: # <<<<<<<<<<<<<< @@ -46472,7 +46498,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L47; } - /* "_rnaseq_utils.pyx":1655 + /* "_rnaseq_utils.pyx":1657 * chrom = chrom_dict[chrom_string] * else: * chrom = chrom_string # <<<<<<<<<<<<<< @@ -46480,13 +46506,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li * if source_string is not None: */ /*else*/ { - if (unlikely(!__pyx_v_chrom_string)) { __Pyx_RaiseUnboundLocalError("chrom_string"); __PYX_ERR(0, 1655, __pyx_L1_error) } + if (unlikely(!__pyx_v_chrom_string)) { __Pyx_RaiseUnboundLocalError("chrom_string"); __PYX_ERR(0, 1657, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_chrom_string); __pyx_v_chrom = __pyx_v_chrom_string; } __pyx_L47:; - /* "_rnaseq_utils.pyx":1657 + /* "_rnaseq_utils.pyx":1659 * chrom = chrom_string * * if source_string is not None: # <<<<<<<<<<<<<< @@ -46497,30 +46523,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_t_23 = (__pyx_t_6 != 0); if (__pyx_t_23) { - /* "_rnaseq_utils.pyx":1658 + /* "_rnaseq_utils.pyx":1660 * * if source_string is not None: * if source_string in source_dict: # <<<<<<<<<<<<<< * source = source_dict[source_string] * else: */ - __pyx_t_23 = (__Pyx_PySequence_ContainsTF(__pyx_v_source_string, __pyx_v_source_dict, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1658, __pyx_L1_error) + __pyx_t_23 = (__Pyx_PySequence_ContainsTF(__pyx_v_source_string, __pyx_v_source_dict, Py_EQ)); if (unlikely(__pyx_t_23 < 0)) __PYX_ERR(0, 1660, __pyx_L1_error) __pyx_t_6 = (__pyx_t_23 != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1659 + /* "_rnaseq_utils.pyx":1661 * if source_string is not None: * if source_string in source_dict: * source = source_dict[source_string] # <<<<<<<<<<<<<< * else: * source = source_string */ - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_source_dict, __pyx_v_source_string); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1659, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_v_source_dict, __pyx_v_source_string); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1661, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __pyx_v_source = __pyx_t_10; __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":1658 + /* "_rnaseq_utils.pyx":1660 * * if source_string is not None: * if source_string in source_dict: # <<<<<<<<<<<<<< @@ -46530,7 +46556,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L49; } - /* "_rnaseq_utils.pyx":1661 + /* "_rnaseq_utils.pyx":1663 * source = source_dict[source_string] * else: * source = source_string # <<<<<<<<<<<<<< @@ -46543,7 +46569,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L49:; - /* "_rnaseq_utils.pyx":1657 + /* "_rnaseq_utils.pyx":1659 * chrom = chrom_string * * if source_string is not None: # <<<<<<<<<<<<<< @@ -46553,7 +46579,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li goto __pyx_L48; } - /* "_rnaseq_utils.pyx":1663 + /* "_rnaseq_utils.pyx":1665 * source = source_string * else: * source = 0 # <<<<<<<<<<<<<< @@ -46566,7 +46592,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } __pyx_L48:; - /* "_rnaseq_utils.pyx":1666 + /* "_rnaseq_utils.pyx":1668 * * # chrom source strand ranges splice s_tag e_tag capped weight * return ELdata(chrom, source, strand, ranges, splice, s_tag, e_tag, capped, weight, condensed) # <<<<<<<<<<<<<< @@ -46574,12 +46600,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li * cpdef RNAseqMapping elr_to_readobject(elr_line): */ __Pyx_XDECREF(__pyx_r); - __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_ELdata); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1666, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_11, __pyx_n_s_ELdata); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (unlikely(!__pyx_v_weight)) { __Pyx_RaiseUnboundLocalError("weight"); __PYX_ERR(0, 1666, __pyx_L1_error) } - __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_condensed); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1666, __pyx_L1_error) + if (unlikely(!__pyx_v_weight)) { __Pyx_RaiseUnboundLocalError("weight"); __PYX_ERR(0, 1668, __pyx_L1_error) } + __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_condensed); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_7 = NULL; __pyx_t_25 = 0; @@ -46596,7 +46622,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[11] = {__pyx_t_7, __pyx_v_chrom, __pyx_v_source, __pyx_t_4, __pyx_v_ranges, __pyx_v_splice, __pyx_v_s_tag, __pyx_v_e_tag, __pyx_v_capped, __pyx_v_weight, __pyx_t_9}; - __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_25, 10+__pyx_t_25); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_25, 10+__pyx_t_25); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -46606,7 +46632,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) { PyObject *__pyx_temp[11] = {__pyx_t_7, __pyx_v_chrom, __pyx_v_source, __pyx_t_4, __pyx_v_ranges, __pyx_v_splice, __pyx_v_s_tag, __pyx_v_e_tag, __pyx_v_capped, __pyx_v_weight, __pyx_t_9}; - __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_25, 10+__pyx_t_25); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_25, 10+__pyx_t_25); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -46614,7 +46640,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li } else #endif { - __pyx_t_8 = PyTuple_New(10+__pyx_t_25); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(10+__pyx_t_25); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -46649,7 +46675,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li PyTuple_SET_ITEM(__pyx_t_8, 9+__pyx_t_25, __pyx_t_9); __pyx_t_4 = 0; __pyx_t_9 = 0; - __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1666, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } @@ -46658,7 +46684,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li __pyx_t_10 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1582 + /* "_rnaseq_utils.pyx":1584 * * * cdef parse_BED_line(bed_line, chrom_dict, source_dict, source_string=None, s_tag=False, e_tag=False, capped=False, gaps_are_junctions=False, keep_readname=False): # <<<<<<<<<<<<<< @@ -46719,7 +46745,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_BED_line(PyObject *__pyx_v_bed_li return __pyx_r; } -/* "_rnaseq_utils.pyx":1668 +/* "_rnaseq_utils.pyx":1670 * return ELdata(chrom, source, strand, ranges, splice, s_tag, e_tag, capped, weight, condensed) * * cpdef RNAseqMapping elr_to_readobject(elr_line): # <<<<<<<<<<<<<< @@ -46739,32 +46765,32 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_e int __pyx_clineno = 0; __Pyx_RefNannySetupContext("elr_to_readobject", 0); - /* "_rnaseq_utils.pyx":1671 + /* "_rnaseq_utils.pyx":1673 * """Converts an ELR line to an RNAseqMapping object * """ * cdef input_data = parse_ELR_line(elr_line) # <<<<<<<<<<<<<< * cdef RNAseqMapping output_object = RNAseqMapping(input_data) * return output_object */ - if (!(likely(PyUnicode_CheckExact(__pyx_v_elr_line))||((__pyx_v_elr_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_elr_line)->tp_name), 0))) __PYX_ERR(0, 1671, __pyx_L1_error) - __pyx_t_1 = __pyx_f_13_rnaseq_utils_parse_ELR_line(((PyObject*)__pyx_v_elr_line)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1671, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_elr_line))||((__pyx_v_elr_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_elr_line)->tp_name), 0))) __PYX_ERR(0, 1673, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_parse_ELR_line(((PyObject*)__pyx_v_elr_line)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_input_data = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1672 + /* "_rnaseq_utils.pyx":1674 * """ * cdef input_data = parse_ELR_line(elr_line) * cdef RNAseqMapping output_object = RNAseqMapping(input_data) # <<<<<<<<<<<<<< * return output_object * */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_v_input_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1672, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_v_input_data); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1674, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_output_object = ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1673 + /* "_rnaseq_utils.pyx":1675 * cdef input_data = parse_ELR_line(elr_line) * cdef RNAseqMapping output_object = RNAseqMapping(input_data) * return output_object # <<<<<<<<<<<<<< @@ -46776,7 +46802,7 @@ static struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_f_13_rnaseq_utils_e __pyx_r = __pyx_v_output_object; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1668 + /* "_rnaseq_utils.pyx":1670 * return ELdata(chrom, source, strand, ranges, splice, s_tag, e_tag, capped, weight, condensed) * * cpdef RNAseqMapping elr_to_readobject(elr_line): # <<<<<<<<<<<<<< @@ -46820,7 +46846,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17elr_to_readobject(CYTHON_UNUSED PyOb int __pyx_clineno = 0; __Pyx_RefNannySetupContext("elr_to_readobject", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_elr_to_readobject(__pyx_v_elr_line, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_elr_to_readobject(__pyx_v_elr_line, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1670, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -46837,7 +46863,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_17elr_to_readobject(CYTHON_UNUSED PyOb return __pyx_r; } -/* "_rnaseq_utils.pyx":1681 +/* "_rnaseq_utils.pyx":1683 * ##################################### * # A set of functions for generating an RNAseqMapping object from one or more lines of a SAM file * cpdef (int, int) range_of_reads(list reads): # <<<<<<<<<<<<<< @@ -46867,7 +46893,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject int __pyx_clineno = 0; __Pyx_RefNannySetupContext("range_of_reads", 0); - /* "_rnaseq_utils.pyx":1688 + /* "_rnaseq_utils.pyx":1690 * int leftmost, rightmost * * leftmost, rightmost = reads[0].span # <<<<<<<<<<<<<< @@ -46876,11 +46902,11 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject */ if (unlikely(__pyx_v_reads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1688, __pyx_L1_error) + __PYX_ERR(0, 1690, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_reads, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_reads, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_span); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { @@ -46889,7 +46915,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1688, __pyx_L1_error) + __PYX_ERR(0, 1690, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -46902,15 +46928,15 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(__pyx_t_3); #else - __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else { Py_ssize_t index = -1; - __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_4 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1690, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; @@ -46918,7 +46944,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject __Pyx_GOTREF(__pyx_t_1); index = 1; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(__pyx_t_3); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1688, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 2) < 0) __PYX_ERR(0, 1690, __pyx_L1_error) __pyx_t_5 = NULL; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L4_unpacking_done; @@ -46926,17 +46952,17 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_5 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1688, __pyx_L1_error) + __PYX_ERR(0, 1690, __pyx_L1_error) __pyx_L4_unpacking_done:; } - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1688, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_7 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1690, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_leftmost = __pyx_t_6; __pyx_v_rightmost = __pyx_t_7; - /* "_rnaseq_utils.pyx":1689 + /* "_rnaseq_utils.pyx":1691 * * leftmost, rightmost = reads[0].span * for read in reads: # <<<<<<<<<<<<<< @@ -46945,22 +46971,22 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject */ if (unlikely(__pyx_v_reads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1689, __pyx_L1_error) + __PYX_ERR(0, 1691, __pyx_L1_error) } __pyx_t_2 = __pyx_v_reads; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1689, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_3); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1691, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1689, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1691, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1689, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1691, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1690 + /* "_rnaseq_utils.pyx":1692 * leftmost, rightmost = reads[0].span * for read in reads: * if read.span[1] > rightmost: # <<<<<<<<<<<<<< @@ -46970,7 +46996,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject __pyx_t_9 = ((__pyx_v_read->span.f1 > __pyx_v_rightmost) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":1691 + /* "_rnaseq_utils.pyx":1693 * for read in reads: * if read.span[1] > rightmost: * rightmost = read.span[1] # <<<<<<<<<<<<<< @@ -46979,7 +47005,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject */ __pyx_v_rightmost = __pyx_v_read->span.f1; - /* "_rnaseq_utils.pyx":1690 + /* "_rnaseq_utils.pyx":1692 * leftmost, rightmost = reads[0].span * for read in reads: * if read.span[1] > rightmost: # <<<<<<<<<<<<<< @@ -46988,7 +47014,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject */ } - /* "_rnaseq_utils.pyx":1689 + /* "_rnaseq_utils.pyx":1691 * * leftmost, rightmost = reads[0].span * for read in reads: # <<<<<<<<<<<<<< @@ -46998,7 +47024,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1693 + /* "_rnaseq_utils.pyx":1695 * rightmost = read.span[1] * * return (leftmost, rightmost) # <<<<<<<<<<<<<< @@ -47010,7 +47036,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_range_of_reads(PyObject __pyx_r = __pyx_t_10; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1681 + /* "_rnaseq_utils.pyx":1683 * ##################################### * # A set of functions for generating an RNAseqMapping object from one or more lines of a SAM file * cpdef (int, int) range_of_reads(list reads): # <<<<<<<<<<<<<< @@ -47042,7 +47068,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_20range_of_reads(PyObject *__pyx_self, PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("range_of_reads (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reads), (&PyList_Type), 1, "reads", 1))) __PYX_ERR(0, 1681, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reads), (&PyList_Type), 1, "reads", 1))) __PYX_ERR(0, 1683, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_19range_of_reads(__pyx_self, ((PyObject*)__pyx_v_reads)); /* function exit code */ @@ -47063,7 +47089,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_19range_of_reads(CYTHON_UNUSED PyObjec int __pyx_clineno = 0; __Pyx_RefNannySetupContext("range_of_reads", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_f_13_rnaseq_utils_range_of_reads(__pyx_v_reads, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1681, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_f_13_rnaseq_utils_range_of_reads(__pyx_v_reads, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1683, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -47080,7 +47106,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_19range_of_reads(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "_rnaseq_utils.pyx":1695 +/* "_rnaseq_utils.pyx":1697 * return (leftmost, rightmost) * * cpdef np.ndarray calculate_coverage(list reads, int left, int right): # <<<<<<<<<<<<<< @@ -47112,7 +47138,7 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx int __pyx_clineno = 0; __Pyx_RefNannySetupContext("calculate_coverage", 0); - /* "_rnaseq_utils.pyx":1705 + /* "_rnaseq_utils.pyx":1707 * * # Iterate over reads to populate a coverage numpy array * array_length = right-left # <<<<<<<<<<<<<< @@ -47121,44 +47147,44 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx */ __pyx_v_array_length = (__pyx_v_right - __pyx_v_left); - /* "_rnaseq_utils.pyx":1706 + /* "_rnaseq_utils.pyx":1708 * # Iterate over reads to populate a coverage numpy array * array_length = right-left * coverage = np.zeros(array_length, dtype=np.float32) # <<<<<<<<<<<<<< * for read in reads: * for span in read.ranges: */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1706, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_np); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_array_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_array_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1706, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_np); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_float32); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1706, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_dtype, __pyx_t_5) < 0) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1706, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1706, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 1708, __pyx_L1_error) __pyx_v_coverage = ((PyArrayObject *)__pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":1707 + /* "_rnaseq_utils.pyx":1709 * array_length = right-left * coverage = np.zeros(array_length, dtype=np.float32) * for read in reads: # <<<<<<<<<<<<<< @@ -47167,22 +47193,22 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx */ if (unlikely(__pyx_v_reads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1707, __pyx_L1_error) + __PYX_ERR(0, 1709, __pyx_L1_error) } __pyx_t_5 = __pyx_v_reads; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0; for (;;) { if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1707, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1709, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1707, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1707, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 1709, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1708 + /* "_rnaseq_utils.pyx":1710 * coverage = np.zeros(array_length, dtype=np.float32) * for read in reads: * for span in read.ranges: # <<<<<<<<<<<<<< @@ -47191,22 +47217,22 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx */ if (unlikely(__pyx_v_read->ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1708, __pyx_L1_error) + __PYX_ERR(0, 1710, __pyx_L1_error) } __pyx_t_1 = __pyx_v_read->ranges; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; for (;;) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1708, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1710, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1708, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif - __pyx_t_8 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1708, __pyx_L1_error) + __pyx_t_8 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_3); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1710, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_span = __pyx_t_8; - /* "_rnaseq_utils.pyx":1709 + /* "_rnaseq_utils.pyx":1711 * for read in reads: * for span in read.ranges: * l = span[0]-left # <<<<<<<<<<<<<< @@ -47215,7 +47241,7 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx */ __pyx_v_l = (__pyx_v_span.f0 - __pyx_v_left); - /* "_rnaseq_utils.pyx":1710 + /* "_rnaseq_utils.pyx":1712 * for span in read.ranges: * l = span[0]-left * r = span[1]-left # <<<<<<<<<<<<<< @@ -47224,34 +47250,34 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx */ __pyx_v_r = (__pyx_v_span.f1 - __pyx_v_left); - /* "_rnaseq_utils.pyx":1711 + /* "_rnaseq_utils.pyx":1713 * l = span[0]-left * r = span[1]-left * coverage[l:r] += read.weight # <<<<<<<<<<<<<< * * return coverage */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_l); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PySlice_New(__pyx_t_3, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_t_4 = PySlice_New(__pyx_t_3, __pyx_t_2, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_coverage), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(((PyObject *)__pyx_v_coverage), __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_read->weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_read->weight); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1711, __pyx_L1_error) + __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_coverage), __pyx_t_4, __pyx_t_9) < 0)) __PYX_ERR(0, 1711, __pyx_L1_error) + if (unlikely(PyObject_SetItem(((PyObject *)__pyx_v_coverage), __pyx_t_4, __pyx_t_9) < 0)) __PYX_ERR(0, 1713, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":1708 + /* "_rnaseq_utils.pyx":1710 * coverage = np.zeros(array_length, dtype=np.float32) * for read in reads: * for span in read.ranges: # <<<<<<<<<<<<<< @@ -47261,7 +47287,7 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1707 + /* "_rnaseq_utils.pyx":1709 * array_length = right-left * coverage = np.zeros(array_length, dtype=np.float32) * for read in reads: # <<<<<<<<<<<<<< @@ -47271,7 +47297,7 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":1713 + /* "_rnaseq_utils.pyx":1715 * coverage[l:r] += read.weight * * return coverage # <<<<<<<<<<<<<< @@ -47283,7 +47309,7 @@ static PyArrayObject *__pyx_f_13_rnaseq_utils_calculate_coverage(PyObject *__pyx __pyx_r = __pyx_v_coverage; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1695 + /* "_rnaseq_utils.pyx":1697 * return (leftmost, rightmost) * * cpdef np.ndarray calculate_coverage(list reads, int left, int right): # <<<<<<<<<<<<<< @@ -47347,17 +47373,17 @@ static PyObject *__pyx_pw_13_rnaseq_utils_22calculate_coverage(PyObject *__pyx_s case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_left)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("calculate_coverage", 1, 3, 3, 1); __PYX_ERR(0, 1695, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("calculate_coverage", 1, 3, 3, 1); __PYX_ERR(0, 1697, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_right)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("calculate_coverage", 1, 3, 3, 2); __PYX_ERR(0, 1695, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("calculate_coverage", 1, 3, 3, 2); __PYX_ERR(0, 1697, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculate_coverage") < 0)) __PYX_ERR(0, 1695, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "calculate_coverage") < 0)) __PYX_ERR(0, 1697, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { goto __pyx_L5_argtuple_error; @@ -47367,18 +47393,18 @@ static PyObject *__pyx_pw_13_rnaseq_utils_22calculate_coverage(PyObject *__pyx_s values[2] = PyTuple_GET_ITEM(__pyx_args, 2); } __pyx_v_reads = ((PyObject*)values[0]); - __pyx_v_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error) - __pyx_v_right = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_right == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1695, __pyx_L3_error) + __pyx_v_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1697, __pyx_L3_error) + __pyx_v_right = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_right == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1697, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("calculate_coverage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1695, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("calculate_coverage", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1697, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.calculate_coverage", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reads), (&PyList_Type), 1, "reads", 1))) __PYX_ERR(0, 1695, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_reads), (&PyList_Type), 1, "reads", 1))) __PYX_ERR(0, 1697, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_21calculate_coverage(__pyx_self, __pyx_v_reads, __pyx_v_left, __pyx_v_right); /* function exit code */ @@ -47399,7 +47425,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_21calculate_coverage(CYTHON_UNUSED PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("calculate_coverage", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_calculate_coverage(__pyx_v_reads, __pyx_v_left, __pyx_v_right, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1695, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_f_13_rnaseq_utils_calculate_coverage(__pyx_v_reads, __pyx_v_left, __pyx_v_right, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -47416,7 +47442,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_21calculate_coverage(CYTHON_UNUSED PyO return __pyx_r; } -/* "_rnaseq_utils.pyx":1715 +/* "_rnaseq_utils.pyx":1717 * return coverage * * cpdef str get_flank(dict genome, str chrom, int pos, int strand, str label_type, int label_len): # <<<<<<<<<<<<<< @@ -47442,30 +47468,30 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_flank", 0); - /* "_rnaseq_utils.pyx":1720 + /* "_rnaseq_utils.pyx":1722 * cdef str flank * cdef int range_start, range_end * flank = 'X'*label_len # <<<<<<<<<<<<<< * if (label_type == 'S' and strand == 1) or (label_type == 'E' and strand == -1): * range_start = pos - label_len */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_label_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1720, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_label_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyNumber_Multiply(__pyx_n_u_X, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1720, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_n_u_X, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1722, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1720, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1722, __pyx_L1_error) __pyx_v_flank = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1721 + /* "_rnaseq_utils.pyx":1723 * cdef int range_start, range_end * flank = 'X'*label_len * if (label_type == 'S' and strand == 1) or (label_type == 'E' and strand == -1): # <<<<<<<<<<<<<< * range_start = pos - label_len * range_end = pos */ - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_label_type, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1721, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_label_type, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1723, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { goto __pyx_L5_next_or; @@ -47478,7 +47504,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO goto __pyx_L4_bool_binop_done; } __pyx_L5_next_or:; - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_label_type, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1721, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_label_type, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1723, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { } else { @@ -47490,7 +47516,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":1722 + /* "_rnaseq_utils.pyx":1724 * flank = 'X'*label_len * if (label_type == 'S' and strand == 1) or (label_type == 'E' and strand == -1): * range_start = pos - label_len # <<<<<<<<<<<<<< @@ -47499,7 +47525,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO */ __pyx_v_range_start = (__pyx_v_pos - __pyx_v_label_len); - /* "_rnaseq_utils.pyx":1723 + /* "_rnaseq_utils.pyx":1725 * if (label_type == 'S' and strand == 1) or (label_type == 'E' and strand == -1): * range_start = pos - label_len * range_end = pos # <<<<<<<<<<<<<< @@ -47508,7 +47534,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO */ __pyx_v_range_end = __pyx_v_pos; - /* "_rnaseq_utils.pyx":1721 + /* "_rnaseq_utils.pyx":1723 * cdef int range_start, range_end * flank = 'X'*label_len * if (label_type == 'S' and strand == 1) or (label_type == 'E' and strand == -1): # <<<<<<<<<<<<<< @@ -47518,7 +47544,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1725 + /* "_rnaseq_utils.pyx":1727 * range_end = pos * else: * range_start = pos + 1 # <<<<<<<<<<<<<< @@ -47528,7 +47554,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO /*else*/ { __pyx_v_range_start = (__pyx_v_pos + 1); - /* "_rnaseq_utils.pyx":1726 + /* "_rnaseq_utils.pyx":1728 * else: * range_start = pos + 1 * range_end = pos + 1 + label_len # <<<<<<<<<<<<<< @@ -47539,7 +47565,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO } __pyx_L3:; - /* "_rnaseq_utils.pyx":1728 + /* "_rnaseq_utils.pyx":1730 * range_end = pos + 1 + label_len * * flank = genome[chrom][range_start:range_end].upper() # <<<<<<<<<<<<<< @@ -47548,14 +47574,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO */ if (unlikely(__pyx_v_genome == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1728, __pyx_L1_error) + __PYX_ERR(0, 1730, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_genome, __pyx_v_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_genome, __pyx_v_chrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_1, __pyx_v_range_start, __pyx_v_range_end, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1728, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_1, __pyx_v_range_start, __pyx_v_range_end, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1728, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -47570,14 +47596,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO } __pyx_t_2 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_1); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1728, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1728, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1730, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_flank, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1729 + /* "_rnaseq_utils.pyx":1731 * * flank = genome[chrom][range_start:range_end].upper() * if strand == -1: # <<<<<<<<<<<<<< @@ -47587,16 +47613,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO __pyx_t_3 = ((__pyx_v_strand == -1L) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":1730 + /* "_rnaseq_utils.pyx":1732 * flank = genome[chrom][range_start:range_end].upper() * if strand == -1: * flank = fu.rc(flank) # <<<<<<<<<<<<<< * * return flank */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1730, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_fu); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_rc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1730, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_rc); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = NULL; @@ -47611,14 +47637,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO } __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_v_flank) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_flank); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1730, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1730, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1732, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_flank, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1729 + /* "_rnaseq_utils.pyx":1731 * * flank = genome[chrom][range_start:range_end].upper() * if strand == -1: # <<<<<<<<<<<<<< @@ -47627,19 +47653,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_flank(PyObject *__pyx_v_genome, PyO */ } - /* "_rnaseq_utils.pyx":1732 + /* "_rnaseq_utils.pyx":1734 * flank = fu.rc(flank) * * return flank # <<<<<<<<<<<<<< * - * #TODO: Fix shift_junction for ONT reads + * cdef int motif_strand(dict genome, str chrom, int left, int right): */ __Pyx_XDECREF(__pyx_r); __Pyx_INCREF(__pyx_v_flank); __pyx_r = __pyx_v_flank; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1715 + /* "_rnaseq_utils.pyx":1717 * return coverage * * cpdef str get_flank(dict genome, str chrom, int pos, int strand, str label_type, int label_len): # <<<<<<<<<<<<<< @@ -47708,35 +47734,35 @@ static PyObject *__pyx_pw_13_rnaseq_utils_24get_flank(PyObject *__pyx_self, PyOb case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 1); __PYX_ERR(0, 1715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 1); __PYX_ERR(0, 1717, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_pos)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 2); __PYX_ERR(0, 1715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 2); __PYX_ERR(0, 1717, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strand)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 3); __PYX_ERR(0, 1715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 3); __PYX_ERR(0, 1717, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_label_type)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 4); __PYX_ERR(0, 1715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 4); __PYX_ERR(0, 1717, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_label_len)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 5); __PYX_ERR(0, 1715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, 5); __PYX_ERR(0, 1717, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_flank") < 0)) __PYX_ERR(0, 1715, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_flank") < 0)) __PYX_ERR(0, 1717, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 6) { goto __pyx_L5_argtuple_error; @@ -47750,22 +47776,22 @@ static PyObject *__pyx_pw_13_rnaseq_utils_24get_flank(PyObject *__pyx_self, PyOb } __pyx_v_genome = ((PyObject*)values[0]); __pyx_v_chrom = ((PyObject*)values[1]); - __pyx_v_pos = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1715, __pyx_L3_error) - __pyx_v_strand = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_strand == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1715, __pyx_L3_error) + __pyx_v_pos = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L3_error) + __pyx_v_strand = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_strand == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L3_error) __pyx_v_label_type = ((PyObject*)values[4]); - __pyx_v_label_len = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_label_len == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1715, __pyx_L3_error) + __pyx_v_label_len = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_label_len == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1717, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1715, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_flank", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1717, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.get_flank", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_genome), (&PyDict_Type), 1, "genome", 1))) __PYX_ERR(0, 1715, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1715, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_label_type), (&PyUnicode_Type), 1, "label_type", 1))) __PYX_ERR(0, 1715, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_genome), (&PyDict_Type), 1, "genome", 1))) __PYX_ERR(0, 1717, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1717, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_label_type), (&PyUnicode_Type), 1, "label_type", 1))) __PYX_ERR(0, 1717, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_23get_flank(__pyx_self, __pyx_v_genome, __pyx_v_chrom, __pyx_v_pos, __pyx_v_strand, __pyx_v_label_type, __pyx_v_label_len); /* function exit code */ @@ -47786,7 +47812,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_23get_flank(CYTHON_UNUSED PyObject *__ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_flank", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_flank(__pyx_v_genome, __pyx_v_chrom, __pyx_v_pos, __pyx_v_strand, __pyx_v_label_type, __pyx_v_label_len, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1715, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_flank(__pyx_v_genome, __pyx_v_chrom, __pyx_v_pos, __pyx_v_strand, __pyx_v_label_type, __pyx_v_label_len, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1717, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -47803,842 +47829,18 @@ static PyObject *__pyx_pf_13_rnaseq_utils_23get_flank(CYTHON_UNUSED PyObject *__ return __pyx_r; } -/* "_rnaseq_utils.pyx":1735 - * - * #TODO: Fix shift_junction for ONT reads - * cdef (int, int) shift_junction(set junctions, str chrom, int left, int right, int strand, int max_shift): # <<<<<<<<<<<<<< - * """Allow the junction boundaries to be remapped by up to max_shift if a canonical splice junction - * motif is nearby.""" - */ - -static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_shift_junction(PyObject *__pyx_v_junctions, PyObject *__pyx_v_chrom, int __pyx_v_left, int __pyx_v_right, int __pyx_v_strand, int __pyx_v_max_shift) { - int __pyx_v_newleft; - int __pyx_v_newright; - int __pyx_v_shift; - PyObject *__pyx_v_old_junction = 0; - PyObject *__pyx_v_shifted_junction = 0; - __pyx_ctuple_int__and_int __pyx_r; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; - int __pyx_t_6; - int __pyx_t_7; - int __pyx_t_8; - int __pyx_t_9; - __pyx_ctuple_int__and_int __pyx_t_10; - long __pyx_t_11; - long __pyx_t_12; - int __pyx_t_13; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("shift_junction", 0); - - /* "_rnaseq_utils.pyx":1741 - * cdef int newleft, newright, shift, delta - * cdef tuple old_junction, shifted_junction - * old_junction = (chrom, left, right, strand) # <<<<<<<<<<<<<< - * if max_shift == 0 or old_junction in junctions: - * return (old_junction[1], old_junction[2]) - */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_left); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_right); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_chrom); - __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); - __pyx_t_1 = 0; - __pyx_t_2 = 0; - __pyx_t_3 = 0; - __pyx_v_old_junction = ((PyObject*)__pyx_t_4); - __pyx_t_4 = 0; - - /* "_rnaseq_utils.pyx":1742 - * cdef tuple old_junction, shifted_junction - * old_junction = (chrom, left, right, strand) - * if max_shift == 0 or old_junction in junctions: # <<<<<<<<<<<<<< - * return (old_junction[1], old_junction[2]) - * else: - */ - __pyx_t_6 = ((__pyx_v_max_shift == 0) != 0); - if (!__pyx_t_6) { - } else { - __pyx_t_5 = __pyx_t_6; - goto __pyx_L4_bool_binop_done; - } - if (unlikely(__pyx_v_junctions == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1742, __pyx_L1_error) - } - __pyx_t_6 = (__Pyx_PySet_ContainsTF(__pyx_v_old_junction, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1742, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_6 != 0); - __pyx_t_5 = __pyx_t_7; - __pyx_L4_bool_binop_done:; - if (__pyx_t_5) { - - /* "_rnaseq_utils.pyx":1743 - * old_junction = (chrom, left, right, strand) - * if max_shift == 0 or old_junction in junctions: - * return (old_junction[1], old_junction[2]) # <<<<<<<<<<<<<< - * else: - * for shift in range(1,max_shift+1): - */ - __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_old_junction, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1743, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1743, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt_Tuple(__pyx_v_old_junction, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1743, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1743, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_10.f0 = __pyx_t_8; - __pyx_t_10.f1 = __pyx_t_9; - __pyx_r = __pyx_t_10; - goto __pyx_L0; - - /* "_rnaseq_utils.pyx":1742 - * cdef tuple old_junction, shifted_junction - * old_junction = (chrom, left, right, strand) - * if max_shift == 0 or old_junction in junctions: # <<<<<<<<<<<<<< - * return (old_junction[1], old_junction[2]) - * else: - */ - } - - /* "_rnaseq_utils.pyx":1745 - * return (old_junction[1], old_junction[2]) - * else: - * for shift in range(1,max_shift+1): # <<<<<<<<<<<<<< - * newleft, newright = left+shift, right+shift - * shifted_junction = (chrom, newleft, newright, strand) - */ - /*else*/ { - __pyx_t_11 = (__pyx_v_max_shift + 1); - __pyx_t_12 = __pyx_t_11; - for (__pyx_t_9 = 1; __pyx_t_9 < __pyx_t_12; __pyx_t_9+=1) { - __pyx_v_shift = __pyx_t_9; - - /* "_rnaseq_utils.pyx":1746 - * else: - * for shift in range(1,max_shift+1): - * newleft, newright = left+shift, right+shift # <<<<<<<<<<<<<< - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - */ - __pyx_t_8 = (__pyx_v_left + __pyx_v_shift); - __pyx_t_13 = (__pyx_v_right + __pyx_v_shift); - __pyx_v_newleft = __pyx_t_8; - __pyx_v_newright = __pyx_t_13; - - /* "_rnaseq_utils.pyx":1747 - * for shift in range(1,max_shift+1): - * newleft, newright = left+shift, right+shift - * shifted_junction = (chrom, newleft, newright, strand) # <<<<<<<<<<<<<< - * if shifted_junction in junctions: - * print("Shifted l+{}r+{}".format(shift)) - */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_newleft); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_newright); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1747, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_chrom); - __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2); - __pyx_t_4 = 0; - __pyx_t_3 = 0; - __pyx_t_2 = 0; - __Pyx_XDECREF_SET(__pyx_v_shifted_junction, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "_rnaseq_utils.pyx":1748 - * newleft, newright = left+shift, right+shift - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted l+{}r+{}".format(shift)) - * return newleft, newright - */ - if (unlikely(__pyx_v_junctions == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1748, __pyx_L1_error) - } - __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_v_shifted_junction, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1748, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_5 != 0); - if (__pyx_t_7) { - - /* "_rnaseq_utils.pyx":1749 - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - * print("Shifted l+{}r+{}".format(shift)) # <<<<<<<<<<<<<< - * return newleft, newright - * - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Shifted_l_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_shift); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "_rnaseq_utils.pyx":1750 - * if shifted_junction in junctions: - * print("Shifted l+{}r+{}".format(shift)) - * return newleft, newright # <<<<<<<<<<<<<< - * - * newleft, newright = left-shift, right-shift - */ - __pyx_t_10.f0 = __pyx_v_newleft; - __pyx_t_10.f1 = __pyx_v_newright; - __pyx_r = __pyx_t_10; - goto __pyx_L0; - - /* "_rnaseq_utils.pyx":1748 - * newleft, newright = left+shift, right+shift - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted l+{}r+{}".format(shift)) - * return newleft, newright - */ - } - - /* "_rnaseq_utils.pyx":1752 - * return newleft, newright - * - * newleft, newright = left-shift, right-shift # <<<<<<<<<<<<<< - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - */ - __pyx_t_13 = (__pyx_v_left - __pyx_v_shift); - __pyx_t_8 = (__pyx_v_right - __pyx_v_shift); - __pyx_v_newleft = __pyx_t_13; - __pyx_v_newright = __pyx_t_8; - - /* "_rnaseq_utils.pyx":1753 - * - * newleft, newright = left-shift, right-shift - * shifted_junction = (chrom, newleft, newright, strand) # <<<<<<<<<<<<<< - * if shifted_junction in junctions: - * print("Shifted l-{}r-{}".format(shift)) - */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_newleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_newright); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1753, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_chrom); - __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); - __pyx_t_2 = 0; - __pyx_t_1 = 0; - __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_shifted_junction, ((PyObject*)__pyx_t_4)); - __pyx_t_4 = 0; - - /* "_rnaseq_utils.pyx":1754 - * newleft, newright = left-shift, right-shift - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted l-{}r-{}".format(shift)) - * return newleft, newright - */ - if (unlikely(__pyx_v_junctions == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1754, __pyx_L1_error) - } - __pyx_t_7 = (__Pyx_PySet_ContainsTF(__pyx_v_shifted_junction, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1754, __pyx_L1_error) - __pyx_t_5 = (__pyx_t_7 != 0); - if (__pyx_t_5) { - - /* "_rnaseq_utils.pyx":1755 - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - * print("Shifted l-{}r-{}".format(shift)) # <<<<<<<<<<<<<< - * return newleft, newright - * - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Shifted_l_r_2, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_shift); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "_rnaseq_utils.pyx":1756 - * if shifted_junction in junctions: - * print("Shifted l-{}r-{}".format(shift)) - * return newleft, newright # <<<<<<<<<<<<<< - * - * newleft, newright = left+shift, right - */ - __pyx_t_10.f0 = __pyx_v_newleft; - __pyx_t_10.f1 = __pyx_v_newright; - __pyx_r = __pyx_t_10; - goto __pyx_L0; - - /* "_rnaseq_utils.pyx":1754 - * newleft, newright = left-shift, right-shift - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted l-{}r-{}".format(shift)) - * return newleft, newright - */ - } - - /* "_rnaseq_utils.pyx":1758 - * return newleft, newright - * - * newleft, newright = left+shift, right # <<<<<<<<<<<<<< - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - */ - __pyx_t_8 = (__pyx_v_left + __pyx_v_shift); - __pyx_t_13 = __pyx_v_right; - __pyx_v_newleft = __pyx_t_8; - __pyx_v_newright = __pyx_t_13; - - /* "_rnaseq_utils.pyx":1759 - * - * newleft, newright = left+shift, right - * shifted_junction = (chrom, newleft, newright, strand) # <<<<<<<<<<<<<< - * if shifted_junction in junctions: - * print("Shifted l+{}".format(shift)) - */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_newleft); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1759, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_newright); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1759, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1759, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1759, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_chrom); - __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_t_1); - __pyx_t_3 = 0; - __pyx_t_4 = 0; - __pyx_t_1 = 0; - __Pyx_DECREF_SET(__pyx_v_shifted_junction, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; - - /* "_rnaseq_utils.pyx":1760 - * newleft, newright = left+shift, right - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted l+{}".format(shift)) - * return newleft, newright - */ - if (unlikely(__pyx_v_junctions == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1760, __pyx_L1_error) - } - __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_v_shifted_junction, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1760, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_5 != 0); - if (__pyx_t_7) { - - /* "_rnaseq_utils.pyx":1761 - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - * print("Shifted l+{}".format(shift)) # <<<<<<<<<<<<<< - * return newleft, newright - * - */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Shifted_l, __pyx_n_s_format); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_shift); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1761, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_3)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_1, function); - } - } - __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_1, __pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1761, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1761, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - - /* "_rnaseq_utils.pyx":1762 - * if shifted_junction in junctions: - * print("Shifted l+{}".format(shift)) - * return newleft, newright # <<<<<<<<<<<<<< - * - * newleft, newright = left-shift, right - */ - __pyx_t_10.f0 = __pyx_v_newleft; - __pyx_t_10.f1 = __pyx_v_newright; - __pyx_r = __pyx_t_10; - goto __pyx_L0; - - /* "_rnaseq_utils.pyx":1760 - * newleft, newright = left+shift, right - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted l+{}".format(shift)) - * return newleft, newright - */ - } - - /* "_rnaseq_utils.pyx":1764 - * return newleft, newright - * - * newleft, newright = left-shift, right # <<<<<<<<<<<<<< - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - */ - __pyx_t_13 = (__pyx_v_left - __pyx_v_shift); - __pyx_t_8 = __pyx_v_right; - __pyx_v_newleft = __pyx_t_13; - __pyx_v_newright = __pyx_t_8; - - /* "_rnaseq_utils.pyx":1765 - * - * newleft, newright = left-shift, right - * shifted_junction = (chrom, newleft, newright, strand) # <<<<<<<<<<<<<< - * if shifted_junction in junctions: - * print("Shifted l-{}".format(shift)) - */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_newleft); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1765, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_newright); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1765, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1765, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1765, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_v_chrom); - __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4); - __pyx_t_1 = 0; - __pyx_t_2 = 0; - __pyx_t_4 = 0; - __Pyx_DECREF_SET(__pyx_v_shifted_junction, ((PyObject*)__pyx_t_3)); - __pyx_t_3 = 0; - - /* "_rnaseq_utils.pyx":1766 - * newleft, newright = left-shift, right - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted l-{}".format(shift)) - * return newleft, newright - */ - if (unlikely(__pyx_v_junctions == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1766, __pyx_L1_error) - } - __pyx_t_7 = (__Pyx_PySet_ContainsTF(__pyx_v_shifted_junction, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1766, __pyx_L1_error) - __pyx_t_5 = (__pyx_t_7 != 0); - if (__pyx_t_5) { - - /* "_rnaseq_utils.pyx":1767 - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - * print("Shifted l-{}".format(shift)) # <<<<<<<<<<<<<< - * return newleft, newright - * - */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Shifted_l_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1767, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_shift); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1767, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_1); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - } - } - __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_1, __pyx_t_2) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1767, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1767, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - - /* "_rnaseq_utils.pyx":1768 - * if shifted_junction in junctions: - * print("Shifted l-{}".format(shift)) - * return newleft, newright # <<<<<<<<<<<<<< - * - * newleft, newright = left, right+shift - */ - __pyx_t_10.f0 = __pyx_v_newleft; - __pyx_t_10.f1 = __pyx_v_newright; - __pyx_r = __pyx_t_10; - goto __pyx_L0; - - /* "_rnaseq_utils.pyx":1766 - * newleft, newright = left-shift, right - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted l-{}".format(shift)) - * return newleft, newright - */ - } - - /* "_rnaseq_utils.pyx":1770 - * return newleft, newright - * - * newleft, newright = left, right+shift # <<<<<<<<<<<<<< - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - */ - __pyx_t_8 = __pyx_v_left; - __pyx_t_13 = (__pyx_v_right + __pyx_v_shift); - __pyx_v_newleft = __pyx_t_8; - __pyx_v_newright = __pyx_t_13; - - /* "_rnaseq_utils.pyx":1771 - * - * newleft, newright = left, right+shift - * shifted_junction = (chrom, newleft, newright, strand) # <<<<<<<<<<<<<< - * if shifted_junction in junctions: - * print("Shifted r+{}".format(shift)) - */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_newleft); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1771, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_newright); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1771, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1771, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1771, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(__pyx_v_chrom); - __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_2); - __pyx_t_4 = 0; - __pyx_t_3 = 0; - __pyx_t_2 = 0; - __Pyx_DECREF_SET(__pyx_v_shifted_junction, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; - - /* "_rnaseq_utils.pyx":1772 - * newleft, newright = left, right+shift - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted r+{}".format(shift)) - * return newleft, newright - */ - if (unlikely(__pyx_v_junctions == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1772, __pyx_L1_error) - } - __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_v_shifted_junction, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1772, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_5 != 0); - if (__pyx_t_7) { - - /* "_rnaseq_utils.pyx":1773 - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - * print("Shifted r+{}".format(shift)) # <<<<<<<<<<<<<< - * return newleft, newright - * - */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Shifted_r, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1773, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_shift); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1773, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_4)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_4); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1773, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1773, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "_rnaseq_utils.pyx":1774 - * if shifted_junction in junctions: - * print("Shifted r+{}".format(shift)) - * return newleft, newright # <<<<<<<<<<<<<< - * - * newleft, newright = left, right-shift - */ - __pyx_t_10.f0 = __pyx_v_newleft; - __pyx_t_10.f1 = __pyx_v_newright; - __pyx_r = __pyx_t_10; - goto __pyx_L0; - - /* "_rnaseq_utils.pyx":1772 - * newleft, newright = left, right+shift - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted r+{}".format(shift)) - * return newleft, newright - */ - } - - /* "_rnaseq_utils.pyx":1776 - * return newleft, newright - * - * newleft, newright = left, right-shift # <<<<<<<<<<<<<< - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - */ - __pyx_t_13 = __pyx_v_left; - __pyx_t_8 = (__pyx_v_right - __pyx_v_shift); - __pyx_v_newleft = __pyx_t_13; - __pyx_v_newright = __pyx_t_8; - - /* "_rnaseq_utils.pyx":1777 - * - * newleft, newright = left, right-shift - * shifted_junction = (chrom, newleft, newright, strand) # <<<<<<<<<<<<<< - * if shifted_junction in junctions: - * print("Shifted r-{}".format(shift)) - */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_newleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1777, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_newright); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1777, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1777, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1777, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_INCREF(__pyx_v_chrom); - __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_t_3); - __pyx_t_2 = 0; - __pyx_t_1 = 0; - __pyx_t_3 = 0; - __Pyx_DECREF_SET(__pyx_v_shifted_junction, ((PyObject*)__pyx_t_4)); - __pyx_t_4 = 0; - - /* "_rnaseq_utils.pyx":1778 - * newleft, newright = left, right-shift - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted r-{}".format(shift)) - * return newleft, newright - */ - if (unlikely(__pyx_v_junctions == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1778, __pyx_L1_error) - } - __pyx_t_7 = (__Pyx_PySet_ContainsTF(__pyx_v_shifted_junction, __pyx_v_junctions, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1778, __pyx_L1_error) - __pyx_t_5 = (__pyx_t_7 != 0); - if (__pyx_t_5) { - - /* "_rnaseq_utils.pyx":1779 - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: - * print("Shifted r-{}".format(shift)) # <<<<<<<<<<<<<< - * return newleft, newright - * - */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_Shifted_r_2, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_shift); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1779, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3); - if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); - __Pyx_INCREF(__pyx_t_2); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_3, function); - } - } - __pyx_t_4 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1779, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_print, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1779, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - - /* "_rnaseq_utils.pyx":1780 - * if shifted_junction in junctions: - * print("Shifted r-{}".format(shift)) - * return newleft, newright # <<<<<<<<<<<<<< - * - * return (left, right) - */ - __pyx_t_10.f0 = __pyx_v_newleft; - __pyx_t_10.f1 = __pyx_v_newright; - __pyx_r = __pyx_t_10; - goto __pyx_L0; - - /* "_rnaseq_utils.pyx":1778 - * newleft, newright = left, right-shift - * shifted_junction = (chrom, newleft, newright, strand) - * if shifted_junction in junctions: # <<<<<<<<<<<<<< - * print("Shifted r-{}".format(shift)) - * return newleft, newright - */ - } - } - - /* "_rnaseq_utils.pyx":1782 - * return newleft, newright - * - * return (left, right) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_10.f0 = __pyx_v_left; - __pyx_t_10.f1 = __pyx_v_right; - __pyx_r = __pyx_t_10; - goto __pyx_L0; - } - - /* "_rnaseq_utils.pyx":1735 - * - * #TODO: Fix shift_junction for ONT reads - * cdef (int, int) shift_junction(set junctions, str chrom, int left, int right, int strand, int max_shift): # <<<<<<<<<<<<<< - * """Allow the junction boundaries to be remapped by up to max_shift if a canonical splice junction - * motif is nearby.""" - */ - - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_WriteUnraisable("_rnaseq_utils.shift_junction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); - __Pyx_pretend_to_initialize(&__pyx_r); - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_old_junction); - __Pyx_XDECREF(__pyx_v_shifted_junction); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "_rnaseq_utils.pyx":1785 - * +/* "_rnaseq_utils.pyx":1736 + * return flank * - * cdef bint junction_is_canonical(dict genome, str chrom, int left, int right, int strand): # <<<<<<<<<<<<<< - * """ Returns 1(+), -1(-), or 0(.) for a left/right - * pair of splice junction positions based + * cdef int motif_strand(dict genome, str chrom, int left, int right): # <<<<<<<<<<<<<< + * """pair of splice junction positions based + * on the flanking genomic sequence """ */ -static int __pyx_f_13_rnaseq_utils_junction_is_canonical(PyObject *__pyx_v_genome, PyObject *__pyx_v_chrom, int __pyx_v_left, int __pyx_v_right, int __pyx_v_strand) { +static int __pyx_f_13_rnaseq_utils_motif_strand(PyObject *__pyx_v_genome, PyObject *__pyx_v_chrom, int __pyx_v_left, int __pyx_v_right) { PyObject *__pyx_v_flanking_sequence = 0; + PyObject *__pyx_v_canonical_plus = 0; + PyObject *__pyx_v_canonical_minus = 0; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -48646,34 +47848,61 @@ static int __pyx_f_13_rnaseq_utils_junction_is_canonical(PyObject *__pyx_v_genom int __pyx_t_3; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("junction_is_canonical", 0); + __Pyx_RefNannySetupContext("motif_strand", 0); - /* "_rnaseq_utils.pyx":1790 + /* "_rnaseq_utils.pyx":1740 * on the flanking genomic sequence """ * cdef str flanking_sequence - * if chrom not in genome.keys(): # <<<<<<<<<<<<<< + * cdef set canonical_plus = set(['GTAG','GCAG','ATAC','GAAG']) # <<<<<<<<<<<<<< + * cdef set canonical_minus = set(['CTAC','CTGC','GTAT','CTTC']) + * if chrom not in genome: + */ + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PySet_Add(__pyx_t_1, __pyx_n_u_GTAG) < 0) __PYX_ERR(0, 1740, __pyx_L1_error) + if (PySet_Add(__pyx_t_1, __pyx_n_u_GCAG) < 0) __PYX_ERR(0, 1740, __pyx_L1_error) + if (PySet_Add(__pyx_t_1, __pyx_n_u_ATAC) < 0) __PYX_ERR(0, 1740, __pyx_L1_error) + if (PySet_Add(__pyx_t_1, __pyx_n_u_GAAG) < 0) __PYX_ERR(0, 1740, __pyx_L1_error) + __pyx_v_canonical_plus = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_rnaseq_utils.pyx":1741 + * cdef str flanking_sequence + * cdef set canonical_plus = set(['GTAG','GCAG','ATAC','GAAG']) + * cdef set canonical_minus = set(['CTAC','CTGC','GTAT','CTTC']) # <<<<<<<<<<<<<< + * if chrom not in genome: + * return 0 + */ + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1741, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PySet_Add(__pyx_t_1, __pyx_n_u_CTAC) < 0) __PYX_ERR(0, 1741, __pyx_L1_error) + if (PySet_Add(__pyx_t_1, __pyx_n_u_CTGC) < 0) __PYX_ERR(0, 1741, __pyx_L1_error) + if (PySet_Add(__pyx_t_1, __pyx_n_u_GTAT) < 0) __PYX_ERR(0, 1741, __pyx_L1_error) + if (PySet_Add(__pyx_t_1, __pyx_n_u_CTTC) < 0) __PYX_ERR(0, 1741, __pyx_L1_error) + __pyx_v_canonical_minus = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; + + /* "_rnaseq_utils.pyx":1742 + * cdef set canonical_plus = set(['GTAG','GCAG','ATAC','GAAG']) + * cdef set canonical_minus = set(['CTAC','CTGC','GTAT','CTTC']) + * if chrom not in genome: # <<<<<<<<<<<<<< * return 0 * */ if (unlikely(__pyx_v_genome == Py_None)) { - PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 1790, __pyx_L1_error) + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 1742, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_v_genome); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1790, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_v_chrom, __pyx_t_1, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1790, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = (__Pyx_PyDict_ContainsTF(__pyx_v_chrom, __pyx_v_genome, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1742, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":1791 - * cdef str flanking_sequence - * if chrom not in genome.keys(): + /* "_rnaseq_utils.pyx":1743 + * cdef set canonical_minus = set(['CTAC','CTGC','GTAT','CTTC']) + * if chrom not in genome: * return 0 # <<<<<<<<<<<<<< * * flanking_sequence = get_flank(genome, chrom, left-1, 1, 'E', 2) + get_flank(genome, chrom, right, 1, 'S', 2) @@ -48681,41 +47910,41 @@ static int __pyx_f_13_rnaseq_utils_junction_is_canonical(PyObject *__pyx_v_genom __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1790 - * on the flanking genomic sequence """ - * cdef str flanking_sequence - * if chrom not in genome.keys(): # <<<<<<<<<<<<<< + /* "_rnaseq_utils.pyx":1742 + * cdef set canonical_plus = set(['GTAG','GCAG','ATAC','GAAG']) + * cdef set canonical_minus = set(['CTAC','CTGC','GTAT','CTTC']) + * if chrom not in genome: # <<<<<<<<<<<<<< * return 0 * */ } - /* "_rnaseq_utils.pyx":1793 + /* "_rnaseq_utils.pyx":1745 * return 0 * * flanking_sequence = get_flank(genome, chrom, left-1, 1, 'E', 2) + get_flank(genome, chrom, right, 1, 'S', 2) # <<<<<<<<<<<<<< * flanking_sequence = flanking_sequence.upper() - * if strand == 1: + * if flanking_sequence in canonical_plus: */ - __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_flank(__pyx_v_genome, __pyx_v_chrom, (__pyx_v_left - 1), 1, __pyx_n_u_E, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1793, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_flank(__pyx_v_genome, __pyx_v_chrom, (__pyx_v_left - 1), 1, __pyx_n_u_E, 2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __pyx_f_13_rnaseq_utils_get_flank(__pyx_v_genome, __pyx_v_chrom, __pyx_v_right, 1, __pyx_n_u_S, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1793, __pyx_L1_error) + __pyx_t_4 = __pyx_f_13_rnaseq_utils_get_flank(__pyx_v_genome, __pyx_v_chrom, __pyx_v_right, 1, __pyx_n_u_S, 2, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1793, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1745, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_flanking_sequence = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":1794 + /* "_rnaseq_utils.pyx":1746 * * flanking_sequence = get_flank(genome, chrom, left-1, 1, 'E', 2) + get_flank(genome, chrom, right, 1, 'S', 2) * flanking_sequence = flanking_sequence.upper() # <<<<<<<<<<<<<< - * if strand == 1: - * return flanking_sequence in ['GTAG','GCAG','ATAC'] + * if flanking_sequence in canonical_plus: + * return 1 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_flanking_sequence, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_flanking_sequence, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -48729,122 +47958,91 @@ static int __pyx_f_13_rnaseq_utils_junction_is_canonical(PyObject *__pyx_v_genom } __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1794, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1746, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_flanking_sequence, ((PyObject*)__pyx_t_5)); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":1795 + /* "_rnaseq_utils.pyx":1747 * flanking_sequence = get_flank(genome, chrom, left-1, 1, 'E', 2) + get_flank(genome, chrom, right, 1, 'S', 2) * flanking_sequence = flanking_sequence.upper() - * if strand == 1: # <<<<<<<<<<<<<< - * return flanking_sequence in ['GTAG','GCAG','ATAC'] - * elif strand == -1: + * if flanking_sequence in canonical_plus: # <<<<<<<<<<<<<< + * return 1 + * elif flanking_sequence in canonical_minus: */ - switch (__pyx_v_strand) { - case 1: + __pyx_t_3 = (__Pyx_PySet_ContainsTF(__pyx_v_flanking_sequence, __pyx_v_canonical_plus, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1747, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 != 0); + if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":1796 + /* "_rnaseq_utils.pyx":1748 * flanking_sequence = flanking_sequence.upper() - * if strand == 1: - * return flanking_sequence in ['GTAG','GCAG','ATAC'] # <<<<<<<<<<<<<< - * elif strand == -1: - * return flanking_sequence in ['CTAC','CTGC','GTAT'] - */ - __Pyx_INCREF(__pyx_v_flanking_sequence); - __pyx_t_6 = __pyx_v_flanking_sequence; - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_GTAG, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1796, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_2 != 0); - if (!__pyx_t_7) { - } else { - __pyx_t_3 = __pyx_t_7; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_GCAG, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1796, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_7 != 0); - if (!__pyx_t_2) { - } else { - __pyx_t_3 = __pyx_t_2; - goto __pyx_L4_bool_binop_done; - } - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_ATAC, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1796, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_2 != 0); - __pyx_t_3 = __pyx_t_7; - __pyx_L4_bool_binop_done:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_r = __pyx_t_3; + * if flanking_sequence in canonical_plus: + * return 1 # <<<<<<<<<<<<<< + * elif flanking_sequence in canonical_minus: + * return -1 + */ + __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1795 + /* "_rnaseq_utils.pyx":1747 * flanking_sequence = get_flank(genome, chrom, left-1, 1, 'E', 2) + get_flank(genome, chrom, right, 1, 'S', 2) * flanking_sequence = flanking_sequence.upper() - * if strand == 1: # <<<<<<<<<<<<<< - * return flanking_sequence in ['GTAG','GCAG','ATAC'] - * elif strand == -1: + * if flanking_sequence in canonical_plus: # <<<<<<<<<<<<<< + * return 1 + * elif flanking_sequence in canonical_minus: */ - break; - case -1L: + } - /* "_rnaseq_utils.pyx":1798 - * return flanking_sequence in ['GTAG','GCAG','ATAC'] - * elif strand == -1: - * return flanking_sequence in ['CTAC','CTGC','GTAT'] # <<<<<<<<<<<<<< - * - * return False + /* "_rnaseq_utils.pyx":1749 + * if flanking_sequence in canonical_plus: + * return 1 + * elif flanking_sequence in canonical_minus: # <<<<<<<<<<<<<< + * return -1 + * else: */ - __Pyx_INCREF(__pyx_v_flanking_sequence); - __pyx_t_6 = __pyx_v_flanking_sequence; - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_CTAC, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1798, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_7 != 0); - if (!__pyx_t_2) { - } else { - __pyx_t_3 = __pyx_t_2; - goto __pyx_L7_bool_binop_done; - } - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_CTGC, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1798, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_2 != 0); - if (!__pyx_t_7) { - } else { - __pyx_t_3 = __pyx_t_7; - goto __pyx_L7_bool_binop_done; - } - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_n_u_GTAT, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1798, __pyx_L1_error) - __pyx_t_2 = (__pyx_t_7 != 0); - __pyx_t_3 = __pyx_t_2; - __pyx_L7_bool_binop_done:; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_r = __pyx_t_3; + __pyx_t_2 = (__Pyx_PySet_ContainsTF(__pyx_v_flanking_sequence, __pyx_v_canonical_minus, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1749, __pyx_L1_error) + __pyx_t_3 = (__pyx_t_2 != 0); + if (__pyx_t_3) { + + /* "_rnaseq_utils.pyx":1750 + * return 1 + * elif flanking_sequence in canonical_minus: + * return -1 # <<<<<<<<<<<<<< + * else: + * return 0 + */ + __pyx_r = -1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1797 - * if strand == 1: - * return flanking_sequence in ['GTAG','GCAG','ATAC'] - * elif strand == -1: # <<<<<<<<<<<<<< - * return flanking_sequence in ['CTAC','CTGC','GTAT'] - * + /* "_rnaseq_utils.pyx":1749 + * if flanking_sequence in canonical_plus: + * return 1 + * elif flanking_sequence in canonical_minus: # <<<<<<<<<<<<<< + * return -1 + * else: */ - break; - default: break; } - /* "_rnaseq_utils.pyx":1800 - * return flanking_sequence in ['CTAC','CTGC','GTAT'] - * - * return False # <<<<<<<<<<<<<< + /* "_rnaseq_utils.pyx":1752 + * return -1 + * else: + * return 0 # <<<<<<<<<<<<<< * * def parse_MD_string(str mdstring): */ - __pyx_r = 0; - goto __pyx_L0; + /*else*/ { + __pyx_r = 0; + goto __pyx_L0; + } - /* "_rnaseq_utils.pyx":1785 - * + /* "_rnaseq_utils.pyx":1736 + * return flank * - * cdef bint junction_is_canonical(dict genome, str chrom, int left, int right, int strand): # <<<<<<<<<<<<<< - * """ Returns 1(+), -1(-), or 0(.) for a left/right - * pair of splice junction positions based + * cdef int motif_strand(dict genome, str chrom, int left, int right): # <<<<<<<<<<<<<< + * """pair of splice junction positions based + * on the flanking genomic sequence """ */ /* function exit code */ @@ -48852,18 +48050,19 @@ static int __pyx_f_13_rnaseq_utils_junction_is_canonical(PyObject *__pyx_v_genom __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_WriteUnraisable("_rnaseq_utils.junction_is_canonical", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __Pyx_WriteUnraisable("_rnaseq_utils.motif_strand", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; __Pyx_XDECREF(__pyx_v_flanking_sequence); + __Pyx_XDECREF(__pyx_v_canonical_plus); + __Pyx_XDECREF(__pyx_v_canonical_minus); __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_rnaseq_utils.pyx":1802 - * return False +/* "_rnaseq_utils.pyx":1754 + * return 0 * * def parse_MD_string(str mdstring): # <<<<<<<<<<<<<< * """Creates a generator object to yield the elements @@ -48881,7 +48080,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_26parse_MD_string(PyObject *__pyx_self PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("parse_MD_string (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mdstring), (&PyUnicode_Type), 1, "mdstring", 1))) __PYX_ERR(0, 1802, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mdstring), (&PyUnicode_Type), 1, "mdstring", 1))) __PYX_ERR(0, 1754, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_25parse_MD_string(__pyx_self, ((PyObject*)__pyx_v_mdstring)); /* function exit code */ @@ -48905,7 +48104,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_25parse_MD_string(CYTHON_UNUSED PyObje if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_4_parse_MD_string *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 1802, __pyx_L1_error) + __PYX_ERR(0, 1754, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -48913,7 +48112,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_25parse_MD_string(CYTHON_UNUSED PyObje __Pyx_INCREF(__pyx_cur_scope->__pyx_v_mdstring); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_mdstring); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_27generator2, __pyx_codeobj__58, (PyObject *) __pyx_cur_scope, __pyx_n_s_parse_MD_string, __pyx_n_s_parse_MD_string, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 1802, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_27generator2, __pyx_codeobj__58, (PyObject *) __pyx_cur_scope, __pyx_n_s_parse_MD_string, __pyx_n_s_parse_MD_string, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 1754, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -48958,9 +48157,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1802, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1754, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1810 + /* "_rnaseq_utils.pyx":1762 * str current, c * * was_digit = True # <<<<<<<<<<<<<< @@ -48969,7 +48168,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_was_digit = 1; - /* "_rnaseq_utils.pyx":1811 + /* "_rnaseq_utils.pyx":1763 * * was_digit = True * current = '' # <<<<<<<<<<<<<< @@ -48980,7 +48179,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ __Pyx_GIVEREF(__pyx_kp_u__7); __pyx_cur_scope->__pyx_v_current = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":1812 + /* "_rnaseq_utils.pyx":1764 * was_digit = True * current = '' * for c in mdstring: # <<<<<<<<<<<<<< @@ -48989,29 +48188,29 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ */ if (unlikely(__pyx_cur_scope->__pyx_v_mdstring == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' is not iterable"); - __PYX_ERR(0, 1812, __pyx_L1_error) + __PYX_ERR(0, 1764, __pyx_L1_error) } __Pyx_INCREF(__pyx_cur_scope->__pyx_v_mdstring); __pyx_t_1 = __pyx_cur_scope->__pyx_v_mdstring; - __pyx_t_6 = __Pyx_init_unicode_iteration(__pyx_t_1, (&__pyx_t_3), (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1812, __pyx_L1_error) + __pyx_t_6 = __Pyx_init_unicode_iteration(__pyx_t_1, (&__pyx_t_3), (&__pyx_t_4), (&__pyx_t_5)); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 1764, __pyx_L1_error) for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_3; __pyx_t_7++) { __pyx_t_2 = __pyx_t_7; - __pyx_t_8 = PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_5, __pyx_t_4, __pyx_t_2)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1812, __pyx_L1_error) + __pyx_t_8 = PyUnicode_FromOrdinal(__Pyx_PyUnicode_READ(__pyx_t_5, __pyx_t_4, __pyx_t_2)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1812, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_8))||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1764, __pyx_L1_error) __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, ((PyObject*)__pyx_t_8)); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_rnaseq_utils.pyx":1813 + /* "_rnaseq_utils.pyx":1765 * current = '' * for c in mdstring: * is_digit = c.isdigit() # <<<<<<<<<<<<<< * if is_digit != was_digit: # A transition happened * yield current */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1813, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_10 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { @@ -49025,14 +48224,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ } __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10) : __Pyx_PyObject_CallNoArg(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1813, __pyx_L1_error) + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1765, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1813, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1765, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_cur_scope->__pyx_v_is_digit = __pyx_t_11; - /* "_rnaseq_utils.pyx":1814 + /* "_rnaseq_utils.pyx":1766 * for c in mdstring: * is_digit = c.isdigit() * if is_digit != was_digit: # A transition happened # <<<<<<<<<<<<<< @@ -49042,7 +48241,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ __pyx_t_11 = ((__pyx_cur_scope->__pyx_v_is_digit != __pyx_cur_scope->__pyx_v_was_digit) != 0); if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":1815 + /* "_rnaseq_utils.pyx":1767 * is_digit = c.isdigit() * if is_digit != was_digit: # A transition happened * yield current # <<<<<<<<<<<<<< @@ -49073,9 +48272,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ __pyx_t_4 = __pyx_cur_scope->__pyx_t_3; __pyx_t_5 = __pyx_cur_scope->__pyx_t_4; __pyx_t_7 = __pyx_cur_scope->__pyx_t_5; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1815, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1767, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1816 + /* "_rnaseq_utils.pyx":1768 * if is_digit != was_digit: # A transition happened * yield current * current = '' # <<<<<<<<<<<<<< @@ -49087,7 +48286,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_current, __pyx_kp_u__7); __Pyx_GIVEREF(__pyx_kp_u__7); - /* "_rnaseq_utils.pyx":1817 + /* "_rnaseq_utils.pyx":1769 * yield current * current = '' * was_digit = is_digit # <<<<<<<<<<<<<< @@ -49096,7 +48295,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_was_digit = __pyx_cur_scope->__pyx_v_is_digit; - /* "_rnaseq_utils.pyx":1814 + /* "_rnaseq_utils.pyx":1766 * for c in mdstring: * is_digit = c.isdigit() * if is_digit != was_digit: # A transition happened # <<<<<<<<<<<<<< @@ -49105,14 +48304,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ */ } - /* "_rnaseq_utils.pyx":1819 + /* "_rnaseq_utils.pyx":1771 * was_digit = is_digit * * current += c # <<<<<<<<<<<<<< * * yield current */ - __pyx_t_8 = __Pyx_PyUnicode_ConcatSafe(__pyx_cur_scope->__pyx_v_current, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1819, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyUnicode_ConcatSafe(__pyx_cur_scope->__pyx_v_current, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1771, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_current); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_current, ((PyObject*)__pyx_t_8)); @@ -49121,7 +48320,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1821 + /* "_rnaseq_utils.pyx":1773 * current += c * * yield current # <<<<<<<<<<<<<< @@ -49137,11 +48336,11 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L8_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1821, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1773, __pyx_L1_error) CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_rnaseq_utils.pyx":1802 - * return False + /* "_rnaseq_utils.pyx":1754 + * return 0 * * def parse_MD_string(str mdstring): # <<<<<<<<<<<<<< * """Creates a generator object to yield the elements @@ -49168,7 +48367,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_27generator2(__pyx_CoroutineObject *__ return __pyx_r; } -/* "_rnaseq_utils.pyx":1825 +/* "_rnaseq_utils.pyx":1777 * * * cpdef parse_SAM_CIGAR(int pos, list cigartuples, str mdstring, float error_rate=0.1, bint quality_filter=False): # <<<<<<<<<<<<<< @@ -49228,31 +48427,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje } } - /* "_rnaseq_utils.pyx":1841 + /* "_rnaseq_utils.pyx":1793 * cdef bint first_element, jumped * cdef str next_match * ranges = [] # <<<<<<<<<<<<<< * gaps = [] * head = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1793, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_ranges = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1842 + /* "_rnaseq_utils.pyx":1794 * cdef str next_match * ranges = [] * gaps = [] # <<<<<<<<<<<<<< * head = 0 * tail = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_gaps = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1843 + /* "_rnaseq_utils.pyx":1795 * ranges = [] * gaps = [] * head = 0 # <<<<<<<<<<<<<< @@ -49261,7 +48460,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_head = 0; - /* "_rnaseq_utils.pyx":1844 + /* "_rnaseq_utils.pyx":1796 * gaps = [] * head = 0 * tail = 0 # <<<<<<<<<<<<<< @@ -49270,7 +48469,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_tail = 0; - /* "_rnaseq_utils.pyx":1845 + /* "_rnaseq_utils.pyx":1797 * head = 0 * tail = 0 * current_pos = pos # <<<<<<<<<<<<<< @@ -49279,7 +48478,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_current_pos = __pyx_v_pos; - /* "_rnaseq_utils.pyx":1846 + /* "_rnaseq_utils.pyx":1798 * tail = 0 * current_pos = pos * first_element = True # <<<<<<<<<<<<<< @@ -49288,7 +48487,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_first_element = 1; - /* "_rnaseq_utils.pyx":1847 + /* "_rnaseq_utils.pyx":1799 * current_pos = pos * first_element = True * jumped = True # <<<<<<<<<<<<<< @@ -49297,7 +48496,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_jumped = 1; - /* "_rnaseq_utils.pyx":1848 + /* "_rnaseq_utils.pyx":1800 * first_element = True * jumped = True * cigar_len = len(cigartuples) # <<<<<<<<<<<<<< @@ -49306,12 +48505,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ if (unlikely(__pyx_v_cigartuples == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1848, __pyx_L1_error) + __PYX_ERR(0, 1800, __pyx_L1_error) } - __pyx_t_2 = PyList_GET_SIZE(__pyx_v_cigartuples); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1848, __pyx_L1_error) + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_cigartuples); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1800, __pyx_L1_error) __pyx_v_cigar_len = __pyx_t_2; - /* "_rnaseq_utils.pyx":1849 + /* "_rnaseq_utils.pyx":1801 * jumped = True * cigar_len = len(cigartuples) * mismatches = 0 # <<<<<<<<<<<<<< @@ -49321,7 +48520,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __Pyx_INCREF(__pyx_int_0); __pyx_v_mismatches = __pyx_int_0; - /* "_rnaseq_utils.pyx":1850 + /* "_rnaseq_utils.pyx":1802 * cigar_len = len(cigartuples) * mismatches = 0 * exon_size = 0 # <<<<<<<<<<<<<< @@ -49331,7 +48530,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __Pyx_INCREF(__pyx_int_0); __pyx_v_exon_size = __pyx_int_0; - /* "_rnaseq_utils.pyx":1851 + /* "_rnaseq_utils.pyx":1803 * mismatches = 0 * exon_size = 0 * i = 0 # <<<<<<<<<<<<<< @@ -49340,14 +48539,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_i = 0; - /* "_rnaseq_utils.pyx":1852 + /* "_rnaseq_utils.pyx":1804 * exon_size = 0 * i = 0 * mismatch_generator = parse_MD_string(mdstring) # <<<<<<<<<<<<<< * match_count = int(next(mismatch_generator)) * for i in range(cigar_len): */ - __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_parse_MD_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1852, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_parse_MD_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) { @@ -49361,29 +48560,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje } __pyx_t_1 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, __pyx_v_mdstring) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_mdstring); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1852, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_mismatch_generator = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1853 + /* "_rnaseq_utils.pyx":1805 * i = 0 * mismatch_generator = parse_MD_string(mdstring) * match_count = int(next(mismatch_generator)) # <<<<<<<<<<<<<< * for i in range(cigar_len): * operator = cigartuples[i][0] */ - __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_mismatch_generator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1853, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_mismatch_generator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1853, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1853, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1805, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_match_count = __pyx_t_5; - /* "_rnaseq_utils.pyx":1854 + /* "_rnaseq_utils.pyx":1806 * mismatch_generator = parse_MD_string(mdstring) * match_count = int(next(mismatch_generator)) * for i in range(cigar_len): # <<<<<<<<<<<<<< @@ -49395,7 +48594,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje for (__pyx_t_7 = 0; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { __pyx_v_i = __pyx_t_7; - /* "_rnaseq_utils.pyx":1855 + /* "_rnaseq_utils.pyx":1807 * match_count = int(next(mismatch_generator)) * for i in range(cigar_len): * operator = cigartuples[i][0] # <<<<<<<<<<<<<< @@ -49404,18 +48603,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ if (unlikely(__pyx_v_cigartuples == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1855, __pyx_L1_error) + __PYX_ERR(0, 1807, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_cigartuples, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1855, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_cigartuples, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1855, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1807, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1855, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1807, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_operator = __pyx_t_8; - /* "_rnaseq_utils.pyx":1856 + /* "_rnaseq_utils.pyx":1808 * for i in range(cigar_len): * operator = cigartuples[i][0] * o_len = cigartuples[i][1] # <<<<<<<<<<<<<< @@ -49424,18 +48623,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ if (unlikely(__pyx_v_cigartuples == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1856, __pyx_L1_error) + __PYX_ERR(0, 1808, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_cigartuples, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1856, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_cigartuples, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1856, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1808, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1856, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1808, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_o_len = __pyx_t_8; - /* "_rnaseq_utils.pyx":1857 + /* "_rnaseq_utils.pyx":1809 * operator = cigartuples[i][0] * o_len = cigartuples[i][1] * if operator == 4 or operator == 5: # Softclipped ranges are stored in either head or tail # <<<<<<<<<<<<<< @@ -49446,7 +48645,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje case 4: case 5: - /* "_rnaseq_utils.pyx":1858 + /* "_rnaseq_utils.pyx":1810 * o_len = cigartuples[i][1] * if operator == 4 or operator == 5: # Softclipped ranges are stored in either head or tail * if first_element: # <<<<<<<<<<<<<< @@ -49456,7 +48655,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __pyx_t_9 = (__pyx_v_first_element != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":1859 + /* "_rnaseq_utils.pyx":1811 * if operator == 4 or operator == 5: # Softclipped ranges are stored in either head or tail * if first_element: * head = o_len # <<<<<<<<<<<<<< @@ -49465,7 +48664,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_head = __pyx_v_o_len; - /* "_rnaseq_utils.pyx":1858 + /* "_rnaseq_utils.pyx":1810 * o_len = cigartuples[i][1] * if operator == 4 or operator == 5: # Softclipped ranges are stored in either head or tail * if first_element: # <<<<<<<<<<<<<< @@ -49475,7 +48674,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje goto __pyx_L5; } - /* "_rnaseq_utils.pyx":1861 + /* "_rnaseq_utils.pyx":1813 * head = o_len * else: * tail = o_len # <<<<<<<<<<<<<< @@ -49487,7 +48686,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje } __pyx_L5:; - /* "_rnaseq_utils.pyx":1857 + /* "_rnaseq_utils.pyx":1809 * operator = cigartuples[i][0] * o_len = cigartuples[i][1] * if operator == 4 or operator == 5: # Softclipped ranges are stored in either head or tail # <<<<<<<<<<<<<< @@ -49498,7 +48697,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje default: break; } - /* "_rnaseq_utils.pyx":1863 + /* "_rnaseq_utils.pyx":1815 * tail = o_len * * if operator == 0: # Match # <<<<<<<<<<<<<< @@ -49508,7 +48707,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje switch (__pyx_v_operator) { case 0: - /* "_rnaseq_utils.pyx":1864 + /* "_rnaseq_utils.pyx":1816 * * if operator == 0: # Match * if jumped: # The last match was across an intron, dump it # <<<<<<<<<<<<<< @@ -49518,7 +48717,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __pyx_t_9 = (__pyx_v_jumped != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":1865 + /* "_rnaseq_utils.pyx":1817 * if operator == 0: # Match * if jumped: # The last match was across an intron, dump it * jumped = False # <<<<<<<<<<<<<< @@ -49527,7 +48726,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_jumped = 0; - /* "_rnaseq_utils.pyx":1866 + /* "_rnaseq_utils.pyx":1818 * if jumped: # The last match was across an intron, dump it * jumped = False * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold # <<<<<<<<<<<<<< @@ -49540,48 +48739,48 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __pyx_t_9 = __pyx_t_10; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = PyObject_RichCompare(__pyx_v_exon_size, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L1_error) - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_exon_size, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1818, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L8_bool_binop_done; } - __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_mismatches, __pyx_v_exon_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_mismatches, __pyx_v_exon_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_error_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_error_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1866, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1818, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L8_bool_binop_done:; if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":1867 + /* "_rnaseq_utils.pyx":1819 * jumped = False * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold * del ranges[-1] # <<<<<<<<<<<<<< * if len(ranges) == 0: * head = -1 */ - if (unlikely(__Pyx_DelItemInt(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1867, __pyx_L1_error) + if (unlikely(__Pyx_DelItemInt(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1819, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1868 + /* "_rnaseq_utils.pyx":1820 * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold * del ranges[-1] * if len(ranges) == 0: # <<<<<<<<<<<<<< * head = -1 * */ - __pyx_t_2 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1868, __pyx_L1_error) + __pyx_t_2 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1820, __pyx_L1_error) __pyx_t_9 = ((__pyx_t_2 == 0) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":1869 + /* "_rnaseq_utils.pyx":1821 * del ranges[-1] * if len(ranges) == 0: * head = -1 # <<<<<<<<<<<<<< @@ -49590,7 +48789,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_head = -1; - /* "_rnaseq_utils.pyx":1868 + /* "_rnaseq_utils.pyx":1820 * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold * del ranges[-1] * if len(ranges) == 0: # <<<<<<<<<<<<<< @@ -49599,7 +48798,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ } - /* "_rnaseq_utils.pyx":1866 + /* "_rnaseq_utils.pyx":1818 * if jumped: # The last match was across an intron, dump it * jumped = False * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold # <<<<<<<<<<<<<< @@ -49608,18 +48807,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ } - /* "_rnaseq_utils.pyx":1871 + /* "_rnaseq_utils.pyx":1823 * head = -1 * * ranges += [(current_pos,current_pos+o_len)] # <<<<<<<<<<<<<< * mismatches = 0 * exon_size = 0 */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_current_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1871, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_current_pos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_current_pos + __pyx_v_o_len)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_current_pos + __pyx_v_o_len)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1871, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); @@ -49627,18 +48826,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); __pyx_t_4 = 0; __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_ranges, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1871, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_ranges, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1823, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_ranges, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1872 + /* "_rnaseq_utils.pyx":1824 * * ranges += [(current_pos,current_pos+o_len)] * mismatches = 0 # <<<<<<<<<<<<<< @@ -49648,7 +48847,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_mismatches, __pyx_int_0); - /* "_rnaseq_utils.pyx":1873 + /* "_rnaseq_utils.pyx":1825 * ranges += [(current_pos,current_pos+o_len)] * mismatches = 0 * exon_size = 0 # <<<<<<<<<<<<<< @@ -49658,7 +48857,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __Pyx_INCREF(__pyx_int_0); __Pyx_DECREF_SET(__pyx_v_exon_size, __pyx_int_0); - /* "_rnaseq_utils.pyx":1864 + /* "_rnaseq_utils.pyx":1816 * * if operator == 0: # Match * if jumped: # The last match was across an intron, dump it # <<<<<<<<<<<<<< @@ -49668,7 +48867,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje goto __pyx_L6; } - /* "_rnaseq_utils.pyx":1875 + /* "_rnaseq_utils.pyx":1827 * exon_size = 0 * else: # Continuation of exon, update right side * ranges[-1] = (ranges[-1][0], current_pos+o_len) # <<<<<<<<<<<<<< @@ -49676,14 +48875,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje * exon_size += o_len */ /*else*/ { - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1875, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_current_pos + __pyx_v_o_len)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1875, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_current_pos + __pyx_v_o_len)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1875, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -49691,27 +48890,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); __pyx_t_1 = 0; __pyx_t_3 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, -1L, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1875, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, -1L, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1827, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L6:; - /* "_rnaseq_utils.pyx":1877 + /* "_rnaseq_utils.pyx":1829 * ranges[-1] = (ranges[-1][0], current_pos+o_len) * * exon_size += o_len # <<<<<<<<<<<<<< * match_count -= o_len * current_pos += o_len */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_o_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1877, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_o_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_exon_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1877, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_exon_size, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1829, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_exon_size, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1878 + /* "_rnaseq_utils.pyx":1830 * * exon_size += o_len * match_count -= o_len # <<<<<<<<<<<<<< @@ -49720,7 +48919,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_match_count = (__pyx_v_match_count - __pyx_v_o_len); - /* "_rnaseq_utils.pyx":1879 + /* "_rnaseq_utils.pyx":1831 * exon_size += o_len * match_count -= o_len * current_pos += o_len # <<<<<<<<<<<<<< @@ -49729,7 +48928,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_current_pos = (__pyx_v_current_pos + __pyx_v_o_len); - /* "_rnaseq_utils.pyx":1863 + /* "_rnaseq_utils.pyx":1815 * tail = o_len * * if operator == 0: # Match # <<<<<<<<<<<<<< @@ -49739,7 +48938,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje break; case 3: - /* "_rnaseq_utils.pyx":1881 + /* "_rnaseq_utils.pyx":1833 * current_pos += o_len * elif operator == 3: # Skipped region (N) * leftside = current_pos # <<<<<<<<<<<<<< @@ -49748,7 +48947,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_leftside = __pyx_v_current_pos; - /* "_rnaseq_utils.pyx":1882 + /* "_rnaseq_utils.pyx":1834 * elif operator == 3: # Skipped region (N) * leftside = current_pos * current_pos += o_len # <<<<<<<<<<<<<< @@ -49757,7 +48956,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_current_pos = (__pyx_v_current_pos + __pyx_v_o_len); - /* "_rnaseq_utils.pyx":1883 + /* "_rnaseq_utils.pyx":1835 * leftside = current_pos * current_pos += o_len * rightside = current_pos # <<<<<<<<<<<<<< @@ -49766,18 +48965,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_rightside = __pyx_v_current_pos; - /* "_rnaseq_utils.pyx":1884 + /* "_rnaseq_utils.pyx":1836 * current_pos += o_len * rightside = current_pos * gaps += [(leftside,rightside)] # <<<<<<<<<<<<<< * jumped = True * elif operator == 2: # Deletion in query */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_leftside); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1884, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_leftside); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rightside); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rightside); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1884, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); @@ -49785,18 +48984,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_3 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1884, __pyx_L1_error) + __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_gaps, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1884, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_gaps, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1836, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_gaps, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1885 + /* "_rnaseq_utils.pyx":1837 * rightside = current_pos * gaps += [(leftside,rightside)] * jumped = True # <<<<<<<<<<<<<< @@ -49805,7 +49004,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_jumped = 1; - /* "_rnaseq_utils.pyx":1880 + /* "_rnaseq_utils.pyx":1832 * match_count -= o_len * current_pos += o_len * elif operator == 3: # Skipped region (N) # <<<<<<<<<<<<<< @@ -49815,7 +49014,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje break; case 2: - /* "_rnaseq_utils.pyx":1887 + /* "_rnaseq_utils.pyx":1839 * jumped = True * elif operator == 2: # Deletion in query * current_pos += o_len # <<<<<<<<<<<<<< @@ -49824,22 +49023,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_current_pos = (__pyx_v_current_pos + __pyx_v_o_len); - /* "_rnaseq_utils.pyx":1888 + /* "_rnaseq_utils.pyx":1840 * elif operator == 2: # Deletion in query * current_pos += o_len * mismatches += o_len # <<<<<<<<<<<<<< * elif operator == 1: # Insertion in query * mismatches += o_len */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_o_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1888, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_o_len); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mismatches, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1888, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_mismatches, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1840, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_mismatches, __pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":1886 + /* "_rnaseq_utils.pyx":1838 * gaps += [(leftside,rightside)] * jumped = True * elif operator == 2: # Deletion in query # <<<<<<<<<<<<<< @@ -49849,22 +49048,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje break; case 1: - /* "_rnaseq_utils.pyx":1890 + /* "_rnaseq_utils.pyx":1842 * mismatches += o_len * elif operator == 1: # Insertion in query * mismatches += o_len # <<<<<<<<<<<<<< * * while match_count < 0: */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_o_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1890, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_o_len); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_mismatches, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1890, __pyx_L1_error) + __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_mismatches, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1842, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_mismatches, __pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1889 + /* "_rnaseq_utils.pyx":1841 * current_pos += o_len * mismatches += o_len * elif operator == 1: # Insertion in query # <<<<<<<<<<<<<< @@ -49875,7 +49074,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje default: break; } - /* "_rnaseq_utils.pyx":1892 + /* "_rnaseq_utils.pyx":1844 * mismatches += o_len * * while match_count < 0: # <<<<<<<<<<<<<< @@ -49886,7 +49085,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __pyx_t_9 = ((__pyx_v_match_count < 0) != 0); if (!__pyx_t_9) break; - /* "_rnaseq_utils.pyx":1893 + /* "_rnaseq_utils.pyx":1845 * * while match_count < 0: * try: # <<<<<<<<<<<<<< @@ -49902,27 +49101,27 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "_rnaseq_utils.pyx":1894 + /* "_rnaseq_utils.pyx":1846 * while match_count < 0: * try: * next_match = next(mismatch_generator) # <<<<<<<<<<<<<< * if next_match.isdigit(): * match_count += int(next_match) */ - __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_mismatch_generator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1894, __pyx_L14_error) + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_v_mismatch_generator); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1846, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1894, __pyx_L14_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1846, __pyx_L14_error) __Pyx_XDECREF_SET(__pyx_v_next_match, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1895 + /* "_rnaseq_utils.pyx":1847 * try: * next_match = next(mismatch_generator) * if next_match.isdigit(): # <<<<<<<<<<<<<< * match_count += int(next_match) * elif next_match[0] != '^': */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_next_match, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L14_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_next_match, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1847, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -49936,33 +49135,33 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1895, __pyx_L14_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1847, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1895, __pyx_L14_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1847, __pyx_L14_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":1896 + /* "_rnaseq_utils.pyx":1848 * next_match = next(mismatch_generator) * if next_match.isdigit(): * match_count += int(next_match) # <<<<<<<<<<<<<< * elif next_match[0] != '^': * match_count += 1 */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_match_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1896, __pyx_L14_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_match_count); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1848, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_next_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1896, __pyx_L14_error) + __pyx_t_4 = __Pyx_PyNumber_Int(__pyx_v_next_match); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1848, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1896, __pyx_L14_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1848, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1896, __pyx_L14_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1848, __pyx_L14_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_match_count = __pyx_t_8; - /* "_rnaseq_utils.pyx":1895 + /* "_rnaseq_utils.pyx":1847 * try: * next_match = next(mismatch_generator) * if next_match.isdigit(): # <<<<<<<<<<<<<< @@ -49972,18 +49171,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje goto __pyx_L22; } - /* "_rnaseq_utils.pyx":1897 + /* "_rnaseq_utils.pyx":1849 * if next_match.isdigit(): * match_count += int(next_match) * elif next_match[0] != '^': # <<<<<<<<<<<<<< * match_count += 1 * mismatches += 1 */ - __pyx_t_14 = __Pyx_GetItemInt_Unicode(__pyx_v_next_match, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_14 == (Py_UCS4)-1)) __PYX_ERR(0, 1897, __pyx_L14_error) + __pyx_t_14 = __Pyx_GetItemInt_Unicode(__pyx_v_next_match, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_14 == (Py_UCS4)-1)) __PYX_ERR(0, 1849, __pyx_L14_error) __pyx_t_9 = ((__pyx_t_14 != 94) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":1898 + /* "_rnaseq_utils.pyx":1850 * match_count += int(next_match) * elif next_match[0] != '^': * match_count += 1 # <<<<<<<<<<<<<< @@ -49992,19 +49191,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_match_count = (__pyx_v_match_count + 1); - /* "_rnaseq_utils.pyx":1899 + /* "_rnaseq_utils.pyx":1851 * elif next_match[0] != '^': * match_count += 1 * mismatches += 1 # <<<<<<<<<<<<<< * except StopIteration: * print("# RAN OUT") */ - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_mismatches, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1899, __pyx_L14_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_mismatches, __pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1851, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF_SET(__pyx_v_mismatches, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1897 + /* "_rnaseq_utils.pyx":1849 * if next_match.isdigit(): * match_count += int(next_match) * elif next_match[0] != '^': # <<<<<<<<<<<<<< @@ -50014,7 +49213,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje } __pyx_L22:; - /* "_rnaseq_utils.pyx":1893 + /* "_rnaseq_utils.pyx":1845 * * while match_count < 0: * try: # <<<<<<<<<<<<<< @@ -50031,7 +49230,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":1900 + /* "_rnaseq_utils.pyx":1852 * match_count += 1 * mismatches += 1 * except StopIteration: # <<<<<<<<<<<<<< @@ -50041,23 +49240,23 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_8) { __Pyx_AddTraceback("_rnaseq_utils.parse_SAM_CIGAR", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 1900, __pyx_L16_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 1852, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_1); - /* "_rnaseq_utils.pyx":1901 + /* "_rnaseq_utils.pyx":1853 * mismatches += 1 * except StopIteration: * print("# RAN OUT") # <<<<<<<<<<<<<< * match_count = 0 * */ - __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1901, __pyx_L16_except_error) + __pyx_t_15 = __Pyx_PyObject_Call(__pyx_builtin_print, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1853, __pyx_L16_except_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "_rnaseq_utils.pyx":1902 + /* "_rnaseq_utils.pyx":1854 * except StopIteration: * print("# RAN OUT") * match_count = 0 # <<<<<<<<<<<<<< @@ -50073,7 +49272,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje goto __pyx_L16_except_error; __pyx_L16_except_error:; - /* "_rnaseq_utils.pyx":1893 + /* "_rnaseq_utils.pyx":1845 * * while match_count < 0: * try: # <<<<<<<<<<<<<< @@ -50094,7 +49293,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje } } - /* "_rnaseq_utils.pyx":1904 + /* "_rnaseq_utils.pyx":1856 * match_count = 0 * * first_element = False # <<<<<<<<<<<<<< @@ -50104,7 +49303,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __pyx_v_first_element = 0; } - /* "_rnaseq_utils.pyx":1906 + /* "_rnaseq_utils.pyx":1858 * first_element = False * * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold # <<<<<<<<<<<<<< @@ -50117,37 +49316,37 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __pyx_t_9 = __pyx_t_10; goto __pyx_L26_bool_binop_done; } - __pyx_t_1 = PyObject_RichCompare(__pyx_v_exon_size, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error) - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1906, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_v_exon_size, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L26_bool_binop_done; } - __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_mismatches, __pyx_v_exon_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1906, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v_mismatches, __pyx_v_exon_size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyFloat_FromDouble(__pyx_v_error_rate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1906, __pyx_L1_error) + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_error_rate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1858, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1906, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_4, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1906, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1858, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_9 = __pyx_t_10; __pyx_L26_bool_binop_done:; if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":1907 + /* "_rnaseq_utils.pyx":1859 * * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold * del ranges[-1] # <<<<<<<<<<<<<< * tail = -1 * */ - if (unlikely(__Pyx_DelItemInt(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1907, __pyx_L1_error) + if (unlikely(__Pyx_DelItemInt(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 1859, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1908 + /* "_rnaseq_utils.pyx":1860 * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold * del ranges[-1] * tail = -1 # <<<<<<<<<<<<<< @@ -50156,7 +49355,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ __pyx_v_tail = -1; - /* "_rnaseq_utils.pyx":1906 + /* "_rnaseq_utils.pyx":1858 * first_element = False * * if quality_filter and exon_size > 0 and mismatches/exon_size > error_rate: # Last exon didn't pass quality threshold # <<<<<<<<<<<<<< @@ -50165,7 +49364,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje */ } - /* "_rnaseq_utils.pyx":1910 + /* "_rnaseq_utils.pyx":1862 * tail = -1 * * return ranges, gaps, head, tail # <<<<<<<<<<<<<< @@ -50173,11 +49372,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_head); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1910, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_head); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_tail); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1910, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_tail); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1910, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1862, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_ranges); __Pyx_GIVEREF(__pyx_v_ranges); @@ -50195,7 +49394,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(int __pyx_v_pos, PyObje __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1825 + /* "_rnaseq_utils.pyx":1777 * * * cpdef parse_SAM_CIGAR(int pos, list cigartuples, str mdstring, float error_rate=0.1, bint quality_filter=False): # <<<<<<<<<<<<<< @@ -50267,13 +49466,13 @@ static PyObject *__pyx_pw_13_rnaseq_utils_29parse_SAM_CIGAR(PyObject *__pyx_self case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_cigartuples)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("parse_SAM_CIGAR", 0, 3, 5, 1); __PYX_ERR(0, 1825, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse_SAM_CIGAR", 0, 3, 5, 1); __PYX_ERR(0, 1777, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_mdstring)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("parse_SAM_CIGAR", 0, 3, 5, 2); __PYX_ERR(0, 1825, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse_SAM_CIGAR", 0, 3, 5, 2); __PYX_ERR(0, 1777, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -50289,7 +49488,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_29parse_SAM_CIGAR(PyObject *__pyx_self } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_SAM_CIGAR") < 0)) __PYX_ERR(0, 1825, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_SAM_CIGAR") < 0)) __PYX_ERR(0, 1777, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -50304,30 +49503,30 @@ static PyObject *__pyx_pw_13_rnaseq_utils_29parse_SAM_CIGAR(PyObject *__pyx_self default: goto __pyx_L5_argtuple_error; } } - __pyx_v_pos = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1825, __pyx_L3_error) + __pyx_v_pos = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_pos == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1777, __pyx_L3_error) __pyx_v_cigartuples = ((PyObject*)values[1]); __pyx_v_mdstring = ((PyObject*)values[2]); if (values[3]) { - __pyx_v_error_rate = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_error_rate == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1825, __pyx_L3_error) + __pyx_v_error_rate = __pyx_PyFloat_AsFloat(values[3]); if (unlikely((__pyx_v_error_rate == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 1777, __pyx_L3_error) } else { __pyx_v_error_rate = ((float)0.1); } if (values[4]) { - __pyx_v_quality_filter = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_quality_filter == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1825, __pyx_L3_error) + __pyx_v_quality_filter = __Pyx_PyObject_IsTrue(values[4]); if (unlikely((__pyx_v_quality_filter == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1777, __pyx_L3_error) } else { __pyx_v_quality_filter = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parse_SAM_CIGAR", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1825, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse_SAM_CIGAR", 0, 3, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1777, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.parse_SAM_CIGAR", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigartuples), (&PyList_Type), 1, "cigartuples", 1))) __PYX_ERR(0, 1825, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mdstring), (&PyUnicode_Type), 1, "mdstring", 1))) __PYX_ERR(0, 1825, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigartuples), (&PyList_Type), 1, "cigartuples", 1))) __PYX_ERR(0, 1777, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_mdstring), (&PyUnicode_Type), 1, "mdstring", 1))) __PYX_ERR(0, 1777, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_28parse_SAM_CIGAR(__pyx_self, __pyx_v_pos, __pyx_v_cigartuples, __pyx_v_mdstring, __pyx_v_error_rate, __pyx_v_quality_filter); /* function exit code */ @@ -50352,7 +49551,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_28parse_SAM_CIGAR(CYTHON_UNUSED PyObje __pyx_t_2.__pyx_n = 2; __pyx_t_2.error_rate = __pyx_v_error_rate; __pyx_t_2.quality_filter = __pyx_v_quality_filter; - __pyx_t_1 = __pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(__pyx_v_pos, __pyx_v_cigartuples, __pyx_v_mdstring, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1825, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(__pyx_v_pos, __pyx_v_cigartuples, __pyx_v_mdstring, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1777, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -50369,7 +49568,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_28parse_SAM_CIGAR(CYTHON_UNUSED PyObje return __pyx_r; } -/* "_rnaseq_utils.pyx":1913 +/* "_rnaseq_utils.pyx":1865 * * * cdef bint is_homopolymer(str string, float threshold=0.8): # <<<<<<<<<<<<<< @@ -50404,14 +49603,14 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru } __Pyx_INCREF(__pyx_v_string); - /* "_rnaseq_utils.pyx":1919 + /* "_rnaseq_utils.pyx":1871 * cdef int count_n, total_count, string_length, thresh_length * * string = string.upper() # <<<<<<<<<<<<<< * string_length = len(string) * thresh_length = int(round(string_length * threshold)) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1919, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_string, __pyx_n_s_upper); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -50425,14 +49624,14 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru } __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3) : __Pyx_PyObject_CallNoArg(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1919, __pyx_L1_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1919, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1871, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_string, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1920 + /* "_rnaseq_utils.pyx":1872 * * string = string.upper() * string_length = len(string) # <<<<<<<<<<<<<< @@ -50441,31 +49640,31 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru */ if (unlikely(__pyx_v_string == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1920, __pyx_L1_error) + __PYX_ERR(0, 1872, __pyx_L1_error) } - __pyx_t_4 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_string); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1920, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_string); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1872, __pyx_L1_error) __pyx_v_string_length = __pyx_t_4; - /* "_rnaseq_utils.pyx":1921 + /* "_rnaseq_utils.pyx":1873 * string = string.upper() * string_length = len(string) * thresh_length = int(round(string_length * threshold)) # <<<<<<<<<<<<<< * if string_length == 0: * return True */ - __pyx_t_1 = PyFloat_FromDouble((__pyx_v_string_length * __pyx_v_threshold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble((__pyx_v_string_length * __pyx_v_threshold)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_round, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1921, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_round, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1921, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1921, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1873, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_thresh_length = __pyx_t_5; - /* "_rnaseq_utils.pyx":1922 + /* "_rnaseq_utils.pyx":1874 * string_length = len(string) * thresh_length = int(round(string_length * threshold)) * if string_length == 0: # <<<<<<<<<<<<<< @@ -50475,7 +49674,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru __pyx_t_6 = ((__pyx_v_string_length == 0) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1923 + /* "_rnaseq_utils.pyx":1875 * thresh_length = int(round(string_length * threshold)) * if string_length == 0: * return True # <<<<<<<<<<<<<< @@ -50485,7 +49684,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1922 + /* "_rnaseq_utils.pyx":1874 * string_length = len(string) * thresh_length = int(round(string_length * threshold)) * if string_length == 0: # <<<<<<<<<<<<<< @@ -50494,7 +49693,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru */ } - /* "_rnaseq_utils.pyx":1925 + /* "_rnaseq_utils.pyx":1877 * return True * * total_count = 0 # <<<<<<<<<<<<<< @@ -50503,7 +49702,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru */ __pyx_v_total_count = 0; - /* "_rnaseq_utils.pyx":1926 + /* "_rnaseq_utils.pyx":1878 * * total_count = 0 * for n in ['A','T','G','C']: # <<<<<<<<<<<<<< @@ -50514,15 +49713,15 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru for (;;) { if (__pyx_t_4 >= 4) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1926, __pyx_L1_error) + __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1878, __pyx_L1_error) #else - __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error) + __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); #endif __Pyx_XDECREF_SET(__pyx_v_n, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":1927 + /* "_rnaseq_utils.pyx":1879 * total_count = 0 * for n in ['A','T','G','C']: * count_n = string.count(n) # <<<<<<<<<<<<<< @@ -50531,12 +49730,12 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru */ if (unlikely(__pyx_v_string == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "count"); - __PYX_ERR(0, 1927, __pyx_L1_error) + __PYX_ERR(0, 1879, __pyx_L1_error) } - __pyx_t_7 = PyUnicode_Count(__pyx_v_string, __pyx_v_n, 0, PY_SSIZE_T_MAX); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1927, __pyx_L1_error) + __pyx_t_7 = PyUnicode_Count(__pyx_v_string, __pyx_v_n, 0, PY_SSIZE_T_MAX); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1879, __pyx_L1_error) __pyx_v_count_n = __pyx_t_7; - /* "_rnaseq_utils.pyx":1928 + /* "_rnaseq_utils.pyx":1880 * for n in ['A','T','G','C']: * count_n = string.count(n) * if count_n >= thresh_length: # <<<<<<<<<<<<<< @@ -50546,7 +49745,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru __pyx_t_6 = ((__pyx_v_count_n >= __pyx_v_thresh_length) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1929 + /* "_rnaseq_utils.pyx":1881 * count_n = string.count(n) * if count_n >= thresh_length: * return True # <<<<<<<<<<<<<< @@ -50557,7 +49756,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1928 + /* "_rnaseq_utils.pyx":1880 * for n in ['A','T','G','C']: * count_n = string.count(n) * if count_n >= thresh_length: # <<<<<<<<<<<<<< @@ -50566,7 +49765,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru */ } - /* "_rnaseq_utils.pyx":1931 + /* "_rnaseq_utils.pyx":1883 * return True * else: * total_count += count_n # <<<<<<<<<<<<<< @@ -50576,7 +49775,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru /*else*/ { __pyx_v_total_count = (__pyx_v_total_count + __pyx_v_count_n); - /* "_rnaseq_utils.pyx":1932 + /* "_rnaseq_utils.pyx":1884 * else: * total_count += count_n * if total_count > string_length - thresh_length: # <<<<<<<<<<<<<< @@ -50586,7 +49785,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru __pyx_t_6 = ((__pyx_v_total_count > (__pyx_v_string_length - __pyx_v_thresh_length)) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":1934 + /* "_rnaseq_utils.pyx":1886 * if total_count > string_length - thresh_length: * # Enough subthreshold nucleotides were found * return False # <<<<<<<<<<<<<< @@ -50597,7 +49796,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1932 + /* "_rnaseq_utils.pyx":1884 * else: * total_count += count_n * if total_count > string_length - thresh_length: # <<<<<<<<<<<<<< @@ -50607,7 +49806,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru } } - /* "_rnaseq_utils.pyx":1926 + /* "_rnaseq_utils.pyx":1878 * * total_count = 0 * for n in ['A','T','G','C']: # <<<<<<<<<<<<<< @@ -50617,7 +49816,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1936 + /* "_rnaseq_utils.pyx":1888 * return False * * return False # <<<<<<<<<<<<<< @@ -50627,7 +49826,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1913 + /* "_rnaseq_utils.pyx":1865 * * * cdef bint is_homopolymer(str string, float threshold=0.8): # <<<<<<<<<<<<<< @@ -50649,7 +49848,7 @@ static int __pyx_f_13_rnaseq_utils_is_homopolymer(PyObject *__pyx_v_string, stru return __pyx_r; } -/* "_rnaseq_utils.pyx":1939 +/* "_rnaseq_utils.pyx":1891 * * * cdef (bint, bint, int, int) parse_tag(str string, str tagsplit='_TAG='): # <<<<<<<<<<<<<< @@ -50689,7 +49888,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse } } - /* "_rnaseq_utils.pyx":1945 + /* "_rnaseq_utils.pyx":1897 * cdef str ID_string * cdef list ID_length * s_len = 0 # <<<<<<<<<<<<<< @@ -50698,7 +49897,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ __pyx_v_s_len = 0; - /* "_rnaseq_utils.pyx":1946 + /* "_rnaseq_utils.pyx":1898 * cdef list ID_length * s_len = 0 * e_len = 0 # <<<<<<<<<<<<<< @@ -50707,7 +49906,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ __pyx_v_e_len = 0; - /* "_rnaseq_utils.pyx":1947 + /* "_rnaseq_utils.pyx":1899 * s_len = 0 * e_len = 0 * s_tag = False # <<<<<<<<<<<<<< @@ -50716,7 +49915,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ __pyx_v_s_tag = 0; - /* "_rnaseq_utils.pyx":1948 + /* "_rnaseq_utils.pyx":1900 * e_len = 0 * s_tag = False * e_tag = False # <<<<<<<<<<<<<< @@ -50725,7 +49924,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ __pyx_v_e_tag = 0; - /* "_rnaseq_utils.pyx":1949 + /* "_rnaseq_utils.pyx":1901 * s_tag = False * e_tag = False * if tagsplit in string: # If _TAG= exists in the read name, add these TAGS to the readtype # <<<<<<<<<<<<<< @@ -50734,13 +49933,13 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ if (unlikely(__pyx_v_string == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1949, __pyx_L1_error) + __PYX_ERR(0, 1901, __pyx_L1_error) } - __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_tagsplit, __pyx_v_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_v_tagsplit, __pyx_v_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1901, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":1950 + /* "_rnaseq_utils.pyx":1902 * e_tag = False * if tagsplit in string: # If _TAG= exists in the read name, add these TAGS to the readtype * ID_string = string.split(tagsplit)[-1].split('_')[0].upper() # <<<<<<<<<<<<<< @@ -50749,14 +49948,14 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ if (unlikely(__pyx_v_string == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "split"); - __PYX_ERR(0, 1950, __pyx_L1_error) + __PYX_ERR(0, 1902, __pyx_L1_error) } - __pyx_t_5 = PyUnicode_Split(__pyx_v_string, __pyx_v_tagsplit, -1L); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_5 = PyUnicode_Split(__pyx_v_string, __pyx_v_tagsplit, -1L); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_t_5, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_t_5, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -50771,13 +49970,13 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_u__5) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u__5); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1950, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_upper); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -50792,25 +49991,25 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse } __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1950, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1902, __pyx_L1_error) __pyx_v_ID_string = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1951 + /* "_rnaseq_utils.pyx":1903 * if tagsplit in string: # If _TAG= exists in the read name, add these TAGS to the readtype * ID_string = string.split(tagsplit)[-1].split('_')[0].upper() * if ID_string != '': # <<<<<<<<<<<<<< * ID_length = [int(i) for i in ID_string[1:].split('E') if i.isdigit()] * else: */ - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_ID_string, __pyx_kp_u__7, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1951, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_ID_string, __pyx_kp_u__7, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1903, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":1952 + /* "_rnaseq_utils.pyx":1904 * ID_string = string.split(tagsplit)[-1].split('_')[0].upper() * if ID_string != '': * ID_length = [int(i) for i in ID_string[1:].split('E') if i.isdigit()] # <<<<<<<<<<<<<< @@ -50818,15 +50017,15 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse * ID_string = '' */ { /* enter inner scope */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L7_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_3); if (unlikely(__pyx_v_ID_string == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1952, __pyx_L7_error) + __PYX_ERR(0, 1904, __pyx_L7_error) } - __pyx_t_4 = __Pyx_PyUnicode_Substring(__pyx_v_ID_string, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1952, __pyx_L7_error) + __pyx_t_4 = __Pyx_PyUnicode_Substring(__pyx_v_ID_string, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyUnicode_Split(((PyObject*)__pyx_t_4), __pyx_n_u_E, -1L); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1952, __pyx_L7_error) + __pyx_t_5 = PyUnicode_Split(((PyObject*)__pyx_t_4), __pyx_n_u_E, -1L); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0; @@ -50834,14 +50033,14 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse for (;;) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1952, __pyx_L7_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1904, __pyx_L7_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1952, __pyx_L7_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_XDECREF_SET(__pyx_9genexpr42__pyx_v_i, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr42__pyx_v_i, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1952, __pyx_L7_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_9genexpr42__pyx_v_i, __pyx_n_s_isdigit); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -50855,15 +50054,15 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse } __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_8) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1952, __pyx_L7_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1952, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_9genexpr42__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1952, __pyx_L7_error) + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_9genexpr42__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_5); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1952, __pyx_L7_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1904, __pyx_L7_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } } @@ -50878,7 +50077,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse __pyx_v_ID_length = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":1951 + /* "_rnaseq_utils.pyx":1903 * if tagsplit in string: # If _TAG= exists in the read name, add these TAGS to the readtype * ID_string = string.split(tagsplit)[-1].split('_')[0].upper() * if ID_string != '': # <<<<<<<<<<<<<< @@ -50887,7 +50086,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ } - /* "_rnaseq_utils.pyx":1949 + /* "_rnaseq_utils.pyx":1901 * s_tag = False * e_tag = False * if tagsplit in string: # If _TAG= exists in the read name, add these TAGS to the readtype # <<<<<<<<<<<<<< @@ -50897,7 +50096,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse goto __pyx_L3; } - /* "_rnaseq_utils.pyx":1954 + /* "_rnaseq_utils.pyx":1906 * ID_length = [int(i) for i in ID_string[1:].split('E') if i.isdigit()] * else: * ID_string = '' # <<<<<<<<<<<<<< @@ -50908,32 +50107,32 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse __Pyx_INCREF(__pyx_kp_u__7); __pyx_v_ID_string = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":1955 + /* "_rnaseq_utils.pyx":1907 * else: * ID_string = '' * ID_length = [] # <<<<<<<<<<<<<< * * if ID_string != '': */ - __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1955, __pyx_L1_error) + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_v_ID_length = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; } __pyx_L3:; - /* "_rnaseq_utils.pyx":1957 + /* "_rnaseq_utils.pyx":1909 * ID_length = [] * * if ID_string != '': # <<<<<<<<<<<<<< * if 'S' in ID_string or 'C' in ID_string: * s_tag = True */ - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_ID_string, __pyx_kp_u__7, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1957, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_ID_string, __pyx_kp_u__7, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1909, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":1958 + /* "_rnaseq_utils.pyx":1910 * * if ID_string != '': * if 'S' in ID_string or 'C' in ID_string: # <<<<<<<<<<<<<< @@ -50942,9 +50141,9 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ if (unlikely(__pyx_v_ID_string == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1958, __pyx_L1_error) + __PYX_ERR(0, 1910, __pyx_L1_error) } - __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_n_u_S, __pyx_v_ID_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1958, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_n_u_S, __pyx_v_ID_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1910, __pyx_L1_error) __pyx_t_9 = (__pyx_t_1 != 0); if (!__pyx_t_9) { } else { @@ -50953,15 +50152,15 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse } if (unlikely(__pyx_v_ID_string == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1958, __pyx_L1_error) + __PYX_ERR(0, 1910, __pyx_L1_error) } - __pyx_t_9 = (__Pyx_PyUnicode_ContainsTF(__pyx_n_u_C, __pyx_v_ID_string, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1958, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_ContainsTF(__pyx_n_u_C, __pyx_v_ID_string, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1910, __pyx_L1_error) __pyx_t_1 = (__pyx_t_9 != 0); __pyx_t_2 = __pyx_t_1; __pyx_L14_bool_binop_done:; if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":1959 + /* "_rnaseq_utils.pyx":1911 * if ID_string != '': * if 'S' in ID_string or 'C' in ID_string: * s_tag = True # <<<<<<<<<<<<<< @@ -50970,21 +50169,21 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ __pyx_v_s_tag = 1; - /* "_rnaseq_utils.pyx":1960 + /* "_rnaseq_utils.pyx":1912 * if 'S' in ID_string or 'C' in ID_string: * s_tag = True * s_len = ID_length[0] # <<<<<<<<<<<<<< * if 'E' in ID_string: * e_tag = True */ - if (unlikely(!__pyx_v_ID_length)) { __Pyx_RaiseUnboundLocalError("ID_length"); __PYX_ERR(0, 1960, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ID_length, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error) + if (unlikely(!__pyx_v_ID_length)) { __Pyx_RaiseUnboundLocalError("ID_length"); __PYX_ERR(0, 1912, __pyx_L1_error) } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ID_length, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1960, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1912, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_s_len = __pyx_t_10; - /* "_rnaseq_utils.pyx":1961 + /* "_rnaseq_utils.pyx":1913 * s_tag = True * s_len = ID_length[0] * if 'E' in ID_string: # <<<<<<<<<<<<<< @@ -50993,13 +50192,13 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ if (unlikely(__pyx_v_ID_string == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1961, __pyx_L1_error) + __PYX_ERR(0, 1913, __pyx_L1_error) } - __pyx_t_2 = (__Pyx_PyUnicode_ContainsTF(__pyx_n_u_E, __pyx_v_ID_string, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1961, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_ContainsTF(__pyx_n_u_E, __pyx_v_ID_string, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1913, __pyx_L1_error) __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":1962 + /* "_rnaseq_utils.pyx":1914 * s_len = ID_length[0] * if 'E' in ID_string: * e_tag = True # <<<<<<<<<<<<<< @@ -51008,21 +50207,21 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ __pyx_v_e_tag = 1; - /* "_rnaseq_utils.pyx":1963 + /* "_rnaseq_utils.pyx":1915 * if 'E' in ID_string: * e_tag = True * e_len = ID_length[-1] # <<<<<<<<<<<<<< * elif 'E' in ID_string: * e_tag = True */ - if (unlikely(!__pyx_v_ID_length)) { __Pyx_RaiseUnboundLocalError("ID_length"); __PYX_ERR(0, 1963, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ID_length, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1963, __pyx_L1_error) + if (unlikely(!__pyx_v_ID_length)) { __Pyx_RaiseUnboundLocalError("ID_length"); __PYX_ERR(0, 1915, __pyx_L1_error) } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ID_length, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1963, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1915, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_e_len = __pyx_t_10; - /* "_rnaseq_utils.pyx":1961 + /* "_rnaseq_utils.pyx":1913 * s_tag = True * s_len = ID_length[0] * if 'E' in ID_string: # <<<<<<<<<<<<<< @@ -51031,7 +50230,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ } - /* "_rnaseq_utils.pyx":1958 + /* "_rnaseq_utils.pyx":1910 * * if ID_string != '': * if 'S' in ID_string or 'C' in ID_string: # <<<<<<<<<<<<<< @@ -51041,7 +50240,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse goto __pyx_L13; } - /* "_rnaseq_utils.pyx":1964 + /* "_rnaseq_utils.pyx":1916 * e_tag = True * e_len = ID_length[-1] * elif 'E' in ID_string: # <<<<<<<<<<<<<< @@ -51050,13 +50249,13 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ if (unlikely(__pyx_v_ID_string == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1964, __pyx_L1_error) + __PYX_ERR(0, 1916, __pyx_L1_error) } - __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_n_u_E, __pyx_v_ID_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1964, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_ContainsTF(__pyx_n_u_E, __pyx_v_ID_string, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1916, __pyx_L1_error) __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":1965 + /* "_rnaseq_utils.pyx":1917 * e_len = ID_length[-1] * elif 'E' in ID_string: * e_tag = True # <<<<<<<<<<<<<< @@ -51065,21 +50264,21 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ __pyx_v_e_tag = 1; - /* "_rnaseq_utils.pyx":1966 + /* "_rnaseq_utils.pyx":1918 * elif 'E' in ID_string: * e_tag = True * e_len = ID_length[0] # <<<<<<<<<<<<<< * * return s_tag, e_tag, s_len, e_len */ - if (unlikely(!__pyx_v_ID_length)) { __Pyx_RaiseUnboundLocalError("ID_length"); __PYX_ERR(0, 1966, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ID_length, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1966, __pyx_L1_error) + if (unlikely(!__pyx_v_ID_length)) { __Pyx_RaiseUnboundLocalError("ID_length"); __PYX_ERR(0, 1918, __pyx_L1_error) } + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ID_length, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1918, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1966, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1918, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_e_len = __pyx_t_10; - /* "_rnaseq_utils.pyx":1964 + /* "_rnaseq_utils.pyx":1916 * e_tag = True * e_len = ID_length[-1] * elif 'E' in ID_string: # <<<<<<<<<<<<<< @@ -51089,7 +50288,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse } __pyx_L13:; - /* "_rnaseq_utils.pyx":1957 + /* "_rnaseq_utils.pyx":1909 * ID_length = [] * * if ID_string != '': # <<<<<<<<<<<<<< @@ -51098,7 +50297,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse */ } - /* "_rnaseq_utils.pyx":1968 + /* "_rnaseq_utils.pyx":1920 * e_len = ID_length[0] * * return s_tag, e_tag, s_len, e_len # <<<<<<<<<<<<<< @@ -51112,7 +50311,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse __pyx_r = __pyx_t_11; goto __pyx_L0; - /* "_rnaseq_utils.pyx":1939 + /* "_rnaseq_utils.pyx":1891 * * * cdef (bint, bint, int, int) parse_tag(str string, str tagsplit='_TAG='): # <<<<<<<<<<<<<< @@ -51137,7 +50336,7 @@ static __pyx_ctuple_int__and_int__and_int__and_int __pyx_f_13_rnaseq_utils_parse return __pyx_r; } -/* "_rnaseq_utils.pyx":1976 +/* "_rnaseq_utils.pyx":1928 * cdef readonly bint ignore_ends, secondary, remove_noncanonical, quality_filter * cdef readonly int max_headclip, sj_shift * def __init__(self, RNAseqDataset dataset, list input_lines): # <<<<<<<<<<<<<< @@ -51183,11 +50382,11 @@ static int __pyx_pw_13_rnaseq_utils_9BAMobject_1__init__(PyObject *__pyx_v_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_input_lines)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1976, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1928, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1976, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1928, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -51200,14 +50399,14 @@ static int __pyx_pw_13_rnaseq_utils_9BAMobject_1__init__(PyObject *__pyx_v_self, } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1976, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1928, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.BAMobject.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dataset), __pyx_ptype_13_rnaseq_utils_RNAseqDataset, 1, "dataset", 0))) __PYX_ERR(0, 1976, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_lines), (&PyList_Type), 1, "input_lines", 1))) __PYX_ERR(0, 1976, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dataset), __pyx_ptype_13_rnaseq_utils_RNAseqDataset, 1, "dataset", 0))) __PYX_ERR(0, 1928, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_input_lines), (&PyList_Type), 1, "input_lines", 1))) __PYX_ERR(0, 1928, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject___init__(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self), __pyx_v_dataset, __pyx_v_input_lines); /* function exit code */ @@ -51227,7 +50426,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas int __pyx_t_3; __Pyx_RefNannySetupContext("__init__", 0); - /* "_rnaseq_utils.pyx":1985 + /* "_rnaseq_utils.pyx":1937 * 5) False positive template-switching can occur at matching RNA sites of 3+ nucleotides (requires genome) * """ * self.dataset = dataset # <<<<<<<<<<<<<< @@ -51240,7 +50439,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __Pyx_DECREF(((PyObject *)__pyx_v_self->dataset)); __pyx_v_self->dataset = __pyx_v_dataset; - /* "_rnaseq_utils.pyx":1986 + /* "_rnaseq_utils.pyx":1938 * """ * self.dataset = dataset * self.input_lines = input_lines # <<<<<<<<<<<<<< @@ -51253,7 +50452,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __Pyx_DECREF(__pyx_v_self->input_lines); __pyx_v_self->input_lines = __pyx_v_input_lines; - /* "_rnaseq_utils.pyx":1987 + /* "_rnaseq_utils.pyx":1939 * self.dataset = dataset * self.input_lines = input_lines * self.ignore_ends = self.dataset.ignore_ends # <<<<<<<<<<<<<< @@ -51263,7 +50462,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __pyx_t_1 = __pyx_v_self->dataset->ignore_ends; __pyx_v_self->ignore_ends = __pyx_t_1; - /* "_rnaseq_utils.pyx":1988 + /* "_rnaseq_utils.pyx":1940 * self.input_lines = input_lines * self.ignore_ends = self.dataset.ignore_ends * self.secondary = self.dataset.secondary # <<<<<<<<<<<<<< @@ -51273,7 +50472,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __pyx_t_1 = __pyx_v_self->dataset->secondary; __pyx_v_self->secondary = __pyx_t_1; - /* "_rnaseq_utils.pyx":1989 + /* "_rnaseq_utils.pyx":1941 * self.ignore_ends = self.dataset.ignore_ends * self.secondary = self.dataset.secondary * self.remove_noncanonical = self.dataset.remove_noncanonical # <<<<<<<<<<<<<< @@ -51283,7 +50482,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __pyx_t_1 = __pyx_v_self->dataset->remove_noncanonical; __pyx_v_self->remove_noncanonical = __pyx_t_1; - /* "_rnaseq_utils.pyx":1990 + /* "_rnaseq_utils.pyx":1942 * self.secondary = self.dataset.secondary * self.remove_noncanonical = self.dataset.remove_noncanonical * self.error_rate = self.dataset.error_rate # <<<<<<<<<<<<<< @@ -51293,7 +50492,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __pyx_t_2 = __pyx_v_self->dataset->error_rate; __pyx_v_self->error_rate = __pyx_t_2; - /* "_rnaseq_utils.pyx":1991 + /* "_rnaseq_utils.pyx":1943 * self.remove_noncanonical = self.dataset.remove_noncanonical * self.error_rate = self.dataset.error_rate * self.quality_filter = self.dataset.quality_filter # <<<<<<<<<<<<<< @@ -51303,7 +50502,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __pyx_t_1 = __pyx_v_self->dataset->quality_filter; __pyx_v_self->quality_filter = __pyx_t_1; - /* "_rnaseq_utils.pyx":1992 + /* "_rnaseq_utils.pyx":1944 * self.error_rate = self.dataset.error_rate * self.quality_filter = self.dataset.quality_filter * self.max_headclip = self.dataset.max_headclip # <<<<<<<<<<<<<< @@ -51313,7 +50512,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __pyx_t_3 = __pyx_v_self->dataset->max_headclip; __pyx_v_self->max_headclip = __pyx_t_3; - /* "_rnaseq_utils.pyx":1993 + /* "_rnaseq_utils.pyx":1945 * self.quality_filter = self.dataset.quality_filter * self.max_headclip = self.dataset.max_headclip * self.sj_shift = self.dataset.sj_shift # <<<<<<<<<<<<<< @@ -51323,7 +50522,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas __pyx_t_3 = __pyx_v_self->dataset->sj_shift; __pyx_v_self->sj_shift = __pyx_t_3; - /* "_rnaseq_utils.pyx":1976 + /* "_rnaseq_utils.pyx":1928 * cdef readonly bint ignore_ends, secondary, remove_noncanonical, quality_filter * cdef readonly int max_headclip, sj_shift * def __init__(self, RNAseqDataset dataset, list input_lines): # <<<<<<<<<<<<<< @@ -51337,7 +50536,7 @@ static int __pyx_pf_13_rnaseq_utils_9BAMobject___init__(struct __pyx_obj_13_rnas return __pyx_r; } -/* "_rnaseq_utils.pyx":1995 +/* "_rnaseq_utils.pyx":1947 * self.sj_shift = self.dataset.sj_shift * * cpdef list generate_read(self): # <<<<<<<<<<<<<< @@ -51373,22 +50572,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o PyObject *__pyx_v_aligned_seq = 0; __pyx_ctuple_int__and_int__and_int__and_int __pyx_v_ID_tags; PyObject *__pyx_v_mappings = 0; - PyObject *__pyx_v_splice = 0; + PyObject *__pyx_v_canonical = 0; PyObject *__pyx_v_ranges = 0; PyObject *__pyx_v_mapping_list = 0; PyObject *__pyx_v_introns = 0; - PyObject *__pyx_v_newranges = 0; + PyObject *__pyx_v_jstrands = 0; int __pyx_v_stranded; int __pyx_v_stranded_method; int __pyx_v_reverse; int __pyx_v_fiveprime; int __pyx_v_threeprime; int __pyx_v_junction_exists; - PyObject *__pyx_v_intronset = 0; struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_v_current_mapping = 0; struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_v_mate_read = 0; - int __pyx_v_capped; - int __pyx_v_s_tag; + PyObject *__pyx_v_capped = NULL; + PyObject *__pyx_v_s_tag = NULL; PyObject *__pyx_v_e_tag = NULL; PyObject *__pyx_v_line = NULL; PyObject *__pyx_v_mdstring = NULL; @@ -51396,7 +50594,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o PyObject *__pyx_v_tail = NULL; Py_ssize_t __pyx_v_match_length; CYTHON_UNUSED int __pyx_v_e_tag_added; + PyObject *__pyx_v_consensus_strand = NULL; PyObject *__pyx_v_read_data = NULL; + PyObject *__pyx_9genexpr43__pyx_v_left = NULL; + PyObject *__pyx_9genexpr43__pyx_v_right = NULL; + PyObject *__pyx_9genexpr44__pyx_v_js = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -51430,10 +50632,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o Py_ssize_t __pyx_t_29; int __pyx_t_30; __pyx_ctuple_int__and_int__and_int __pyx_t_31; - struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_get_splice_info __pyx_t_32; - PyObject *__pyx_t_33 = NULL; - PyObject *__pyx_t_34 = NULL; - PyObject *__pyx_t_35 = NULL; + PyObject *__pyx_t_32 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -51447,7 +50646,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) { PY_UINT64_T __pyx_type_dict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self)); #endif - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generate_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_generate_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_13_rnaseq_utils_9BAMobject_3generate_read)) { __Pyx_XDECREF(__pyx_r); @@ -51464,10 +50663,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1995, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1947, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1995, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1947, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -51486,12 +50685,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o #endif } - /* "_rnaseq_utils.pyx":2001 + /* "_rnaseq_utils.pyx":1953 * float weight - * str ID, chrom, js, seq, aligned_seq, trimmed_nuc + * str ID, chrom, seq, aligned_seq, trimmed_nuc * (bint, bint, int, int) ID_tags = (False, False, 0, 0) # <<<<<<<<<<<<<< * dict mappings - * list splice, gaps, ranges, mapping_list, introns, newranges + * list canonical, gaps, ranges, mapping_list, introns, newranges, jstrands */ __pyx_t_5.f0 = 0; __pyx_t_5.f1 = 0; @@ -51499,7 +50698,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_5.f3 = 0; __pyx_v_ID_tags = __pyx_t_5; - /* "_rnaseq_utils.pyx":2010 + /* "_rnaseq_utils.pyx":1962 * RNAseqMapping current_mapping, mate_read * * s_tag_len = e_tag_len = 0 # <<<<<<<<<<<<<< @@ -51509,7 +50708,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_v_s_tag_len = 0; __pyx_v_e_tag_len = 0; - /* "_rnaseq_utils.pyx":2011 + /* "_rnaseq_utils.pyx":1963 * * s_tag_len = e_tag_len = 0 * stranded = stranded_method = False # <<<<<<<<<<<<<< @@ -51519,7 +50718,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_v_stranded = 0; __pyx_v_stranded_method = 0; - /* "_rnaseq_utils.pyx":2012 + /* "_rnaseq_utils.pyx":1964 * s_tag_len = e_tag_len = 0 * stranded = stranded_method = False * if self.dataset.stranded: # The read is strand-specific # <<<<<<<<<<<<<< @@ -51529,7 +50728,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = (__pyx_v_self->dataset->stranded != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2013 + /* "_rnaseq_utils.pyx":1965 * stranded = stranded_method = False * if self.dataset.stranded: # The read is strand-specific * stranded_method = True # The method to generate the read is inherently stranded # <<<<<<<<<<<<<< @@ -51538,7 +50737,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_stranded_method = 1; - /* "_rnaseq_utils.pyx":2014 + /* "_rnaseq_utils.pyx":1966 * if self.dataset.stranded: # The read is strand-specific * stranded_method = True # The method to generate the read is inherently stranded * reverse = self.dataset.reverse # <<<<<<<<<<<<<< @@ -51548,7 +50747,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = __pyx_v_self->dataset->reverse; __pyx_v_reverse = __pyx_t_6; - /* "_rnaseq_utils.pyx":2012 + /* "_rnaseq_utils.pyx":1964 * s_tag_len = e_tag_len = 0 * stranded = stranded_method = False * if self.dataset.stranded: # The read is strand-specific # <<<<<<<<<<<<<< @@ -51558,7 +50757,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L3; } - /* "_rnaseq_utils.pyx":2016 + /* "_rnaseq_utils.pyx":1968 * reverse = self.dataset.reverse * else: * reverse = False # <<<<<<<<<<<<<< @@ -51570,17 +50769,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_L3:; - /* "_rnaseq_utils.pyx":2018 + /* "_rnaseq_utils.pyx":1970 * reverse = False * * capped = self.dataset.capped # <<<<<<<<<<<<<< * input_len = len(self.input_lines) * weight = float(1)/input_len */ - __pyx_t_6 = __pyx_v_self->dataset->capped; - __pyx_v_capped = __pyx_t_6; + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->dataset->capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1970, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_v_capped = __pyx_t_1; + __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2019 + /* "_rnaseq_utils.pyx":1971 * * capped = self.dataset.capped * input_len = len(self.input_lines) # <<<<<<<<<<<<<< @@ -51591,39 +50792,39 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2019, __pyx_L1_error) + __PYX_ERR(0, 1971, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2019, __pyx_L1_error) + __pyx_t_7 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1971, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_input_len = __pyx_t_7; - /* "_rnaseq_utils.pyx":2020 + /* "_rnaseq_utils.pyx":1972 * capped = self.dataset.capped * input_len = len(self.input_lines) * weight = float(1)/input_len # <<<<<<<<<<<<<< * mappings = {} # Make an empty dict to store each mapping object * s_len = len(self.dataset.start_array) */ - __pyx_t_8 = __Pyx_PyObject_AsDouble(__pyx_int_1); if (unlikely(__pyx_t_8 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 2020, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_AsDouble(__pyx_int_1); if (unlikely(__pyx_t_8 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1972, __pyx_L1_error) if (unlikely(__pyx_v_input_len == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 2020, __pyx_L1_error) + __PYX_ERR(0, 1972, __pyx_L1_error) } __pyx_v_weight = (__pyx_t_8 / ((double)__pyx_v_input_len)); - /* "_rnaseq_utils.pyx":2021 + /* "_rnaseq_utils.pyx":1973 * input_len = len(self.input_lines) * weight = float(1)/input_len * mappings = {} # Make an empty dict to store each mapping object # <<<<<<<<<<<<<< * s_len = len(self.dataset.start_array) * e_len = len(self.dataset.end_array) */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mappings = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2022 + /* "_rnaseq_utils.pyx":1974 * weight = float(1)/input_len * mappings = {} # Make an empty dict to store each mapping object * s_len = len(self.dataset.start_array) # <<<<<<<<<<<<<< @@ -51634,13 +50835,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2022, __pyx_L1_error) + __PYX_ERR(0, 1974, __pyx_L1_error) } - __pyx_t_7 = Py_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2022, __pyx_L1_error) + __pyx_t_7 = Py_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1974, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_s_len = __pyx_t_7; - /* "_rnaseq_utils.pyx":2023 + /* "_rnaseq_utils.pyx":1975 * mappings = {} # Make an empty dict to store each mapping object * s_len = len(self.dataset.start_array) * e_len = len(self.dataset.end_array) # <<<<<<<<<<<<<< @@ -51651,13 +50852,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2023, __pyx_L1_error) + __PYX_ERR(0, 1975, __pyx_L1_error) } - __pyx_t_7 = Py_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2023, __pyx_L1_error) + __pyx_t_7 = Py_SIZE(__pyx_t_1); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1975, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_e_len = __pyx_t_7; - /* "_rnaseq_utils.pyx":2024 + /* "_rnaseq_utils.pyx":1976 * s_len = len(self.dataset.start_array) * e_len = len(self.dataset.end_array) * Nmap = self.get_mapping_number() # <<<<<<<<<<<<<< @@ -51666,7 +50867,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_Nmap = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->get_mapping_number(__pyx_v_self); - /* "_rnaseq_utils.pyx":2025 + /* "_rnaseq_utils.pyx":1977 * e_len = len(self.dataset.end_array) * Nmap = self.get_mapping_number() * map_number = 0 # <<<<<<<<<<<<<< @@ -51675,7 +50876,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_map_number = 0; - /* "_rnaseq_utils.pyx":2026 + /* "_rnaseq_utils.pyx":1978 * Nmap = self.get_mapping_number() * map_number = 0 * counter = 0 # <<<<<<<<<<<<<< @@ -51684,7 +50885,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_counter = 0; - /* "_rnaseq_utils.pyx":2027 + /* "_rnaseq_utils.pyx":1979 * map_number = 0 * counter = 0 * seq = '' # <<<<<<<<<<<<<< @@ -51694,7 +50895,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_INCREF(__pyx_kp_u__7); __pyx_v_seq = __pyx_kp_u__7; - /* "_rnaseq_utils.pyx":2028 + /* "_rnaseq_utils.pyx":1980 * counter = 0 * seq = '' * if input_len == 0: # <<<<<<<<<<<<<< @@ -51704,7 +50905,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = ((__pyx_v_input_len == 0) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2029 + /* "_rnaseq_utils.pyx":1981 * seq = '' * if input_len == 0: * return [] # <<<<<<<<<<<<<< @@ -51712,13 +50913,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o * ID = self.input_lines[0].query_name */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2029, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2028 + /* "_rnaseq_utils.pyx":1980 * counter = 0 * seq = '' * if input_len == 0: # <<<<<<<<<<<<<< @@ -51727,7 +50928,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2031 + /* "_rnaseq_utils.pyx":1983 * return [] * * ID = self.input_lines[0].query_name # <<<<<<<<<<<<<< @@ -51736,18 +50937,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_self->input_lines == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2031, __pyx_L1_error) + __PYX_ERR(0, 1983, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->input_lines, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2031, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->input_lines, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_query_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2031, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_query_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1983, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2031, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1983, __pyx_L1_error) __pyx_v_ID = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":2032 + /* "_rnaseq_utils.pyx":1984 * * ID = self.input_lines[0].query_name * if not self.ignore_ends: # <<<<<<<<<<<<<< @@ -51757,7 +50958,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = ((!(__pyx_v_self->ignore_ends != 0)) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2033 + /* "_rnaseq_utils.pyx":1985 * ID = self.input_lines[0].query_name * if not self.ignore_ends: * ID_tags = parse_tag(ID) # <<<<<<<<<<<<<< @@ -51766,7 +50967,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_ID_tags = __pyx_f_13_rnaseq_utils_parse_tag(__pyx_v_ID, NULL); - /* "_rnaseq_utils.pyx":2032 + /* "_rnaseq_utils.pyx":1984 * * ID = self.input_lines[0].query_name * if not self.ignore_ends: # <<<<<<<<<<<<<< @@ -51775,7 +50976,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2035 + /* "_rnaseq_utils.pyx":1987 * ID_tags = parse_tag(ID) * * s_tag_len = ID_tags[2] # <<<<<<<<<<<<<< @@ -51784,7 +50985,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_s_tag_len = __pyx_v_ID_tags.f2; - /* "_rnaseq_utils.pyx":2036 + /* "_rnaseq_utils.pyx":1988 * * s_tag_len = ID_tags[2] * e_tag_len = ID_tags[3] # <<<<<<<<<<<<<< @@ -51793,7 +50994,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_e_tag_len = __pyx_v_ID_tags.f3; - /* "_rnaseq_utils.pyx":2037 + /* "_rnaseq_utils.pyx":1989 * s_tag_len = ID_tags[2] * e_tag_len = ID_tags[3] * if s_tag_len > 0: # <<<<<<<<<<<<<< @@ -51803,7 +51004,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = ((__pyx_v_s_tag_len > 0) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2038 + /* "_rnaseq_utils.pyx":1990 * e_tag_len = ID_tags[3] * if s_tag_len > 0: * if s_tag_len < s_len: # <<<<<<<<<<<<<< @@ -51813,7 +51014,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = ((__pyx_v_s_tag_len < __pyx_v_s_len) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2039 + /* "_rnaseq_utils.pyx":1991 * if s_tag_len > 0: * if s_tag_len < s_len: * s_len = s_tag_len # <<<<<<<<<<<<<< @@ -51822,7 +51023,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_s_len = __pyx_v_s_tag_len; - /* "_rnaseq_utils.pyx":2038 + /* "_rnaseq_utils.pyx":1990 * e_tag_len = ID_tags[3] * if s_tag_len > 0: * if s_tag_len < s_len: # <<<<<<<<<<<<<< @@ -51831,7 +51032,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2037 + /* "_rnaseq_utils.pyx":1989 * s_tag_len = ID_tags[2] * e_tag_len = ID_tags[3] * if s_tag_len > 0: # <<<<<<<<<<<<<< @@ -51840,7 +51041,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2041 + /* "_rnaseq_utils.pyx":1993 * s_len = s_tag_len * * if e_tag_len > 0: # <<<<<<<<<<<<<< @@ -51850,7 +51051,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = ((__pyx_v_e_tag_len > 0) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2042 + /* "_rnaseq_utils.pyx":1994 * * if e_tag_len > 0: * if e_tag_len < e_len: # <<<<<<<<<<<<<< @@ -51860,7 +51061,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = ((__pyx_v_e_tag_len < __pyx_v_e_len) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2043 + /* "_rnaseq_utils.pyx":1995 * if e_tag_len > 0: * if e_tag_len < e_len: * e_len = e_tag_len # <<<<<<<<<<<<<< @@ -51869,7 +51070,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_e_len = __pyx_v_e_tag_len; - /* "_rnaseq_utils.pyx":2042 + /* "_rnaseq_utils.pyx":1994 * * if e_tag_len > 0: * if e_tag_len < e_len: # <<<<<<<<<<<<<< @@ -51878,7 +51079,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2041 + /* "_rnaseq_utils.pyx":1993 * s_len = s_tag_len * * if e_tag_len > 0: # <<<<<<<<<<<<<< @@ -51887,7 +51088,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2045 + /* "_rnaseq_utils.pyx":1997 * e_len = e_tag_len * * for i in range(input_len): # <<<<<<<<<<<<<< @@ -51899,25 +51100,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { __pyx_v_i = __pyx_t_11; - /* "_rnaseq_utils.pyx":2046 + /* "_rnaseq_utils.pyx":1998 * * for i in range(input_len): * s_tag = self.dataset.s_tag or ID_tags[0] # <<<<<<<<<<<<<< * e_tag = self.dataset.e_tag or ID_tags[1] * if s_tag or e_tag or stranded_method: */ - __pyx_t_12 = (__pyx_v_self->dataset->s_tag != 0); - if (!__pyx_t_12) { + if (!__pyx_v_self->dataset->s_tag) { } else { - __pyx_t_6 = __pyx_t_12; + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->dataset->s_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L12_bool_binop_done; } - __pyx_t_12 = (__pyx_v_ID_tags.f0 != 0); - __pyx_t_6 = __pyx_t_12; + __pyx_t_6 = __pyx_v_ID_tags.f0; + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1998, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __pyx_t_1; + __pyx_t_1 = 0; __pyx_L12_bool_binop_done:; - __pyx_v_s_tag = __pyx_t_6; + __Pyx_XDECREF_SET(__pyx_v_s_tag, __pyx_t_2); + __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":2047 + /* "_rnaseq_utils.pyx":1999 * for i in range(input_len): * s_tag = self.dataset.s_tag or ID_tags[0] * e_tag = self.dataset.e_tag or ID_tags[1] # <<<<<<<<<<<<<< @@ -51926,14 +51133,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (!__pyx_v_self->dataset->e_tag) { } else { - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->dataset->e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2047, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->dataset->e_tag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L14_bool_binop_done; } __pyx_t_6 = __pyx_v_ID_tags.f1; - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2047, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; @@ -51941,20 +51148,20 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_e_tag, __pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":2048 + /* "_rnaseq_utils.pyx":2000 * s_tag = self.dataset.s_tag or ID_tags[0] * e_tag = self.dataset.e_tag or ID_tags[1] * if s_tag or e_tag or stranded_method: # <<<<<<<<<<<<<< * stranded = True * */ - __pyx_t_12 = (__pyx_v_s_tag != 0); + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_s_tag); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2000, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_6 = __pyx_t_12; goto __pyx_L17_bool_binop_done; } - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2048, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2000, __pyx_L1_error) if (!__pyx_t_12) { } else { __pyx_t_6 = __pyx_t_12; @@ -51965,7 +51172,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_L17_bool_binop_done:; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2049 + /* "_rnaseq_utils.pyx":2001 * e_tag = self.dataset.e_tag or ID_tags[1] * if s_tag or e_tag or stranded_method: * stranded = True # <<<<<<<<<<<<<< @@ -51974,7 +51181,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_stranded = 1; - /* "_rnaseq_utils.pyx":2048 + /* "_rnaseq_utils.pyx":2000 * s_tag = self.dataset.s_tag or ID_tags[0] * e_tag = self.dataset.e_tag or ID_tags[1] * if s_tag or e_tag or stranded_method: # <<<<<<<<<<<<<< @@ -51983,7 +51190,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2051 + /* "_rnaseq_utils.pyx":2003 * stranded = True * * line = self.input_lines[i] # Each line must be a pysam.AlignedSegment # <<<<<<<<<<<<<< @@ -51992,14 +51199,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_self->input_lines == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2051, __pyx_L1_error) + __PYX_ERR(0, 2003, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->input_lines, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2051, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_self->input_lines, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2003, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":2052 + /* "_rnaseq_utils.pyx":2004 * * line = self.input_lines[i] # Each line must be a pysam.AlignedSegment * if self.should_skip(line): # Line must pass filters # <<<<<<<<<<<<<< @@ -52009,7 +51216,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_6 = (((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->should_skip(__pyx_v_self, __pyx_v_line) != 0); if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2053 + /* "_rnaseq_utils.pyx":2005 * line = self.input_lines[i] # Each line must be a pysam.AlignedSegment * if self.should_skip(line): # Line must pass filters * continue # <<<<<<<<<<<<<< @@ -52018,7 +51225,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ goto __pyx_L10_continue; - /* "_rnaseq_utils.pyx":2052 + /* "_rnaseq_utils.pyx":2004 * * line = self.input_lines[i] # Each line must be a pysam.AlignedSegment * if self.should_skip(line): # Line must pass filters # <<<<<<<<<<<<<< @@ -52027,7 +51234,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2055 + /* "_rnaseq_utils.pyx":2007 * continue * * mate, strand = self.determine_strand(line, stranded, reverse) # <<<<<<<<<<<<<< @@ -52042,14 +51249,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_v_mate = __pyx_t_15; __pyx_v_strand = __pyx_t_16; - /* "_rnaseq_utils.pyx":2056 + /* "_rnaseq_utils.pyx":2008 * * mate, strand = self.determine_strand(line, stranded, reverse) * map_strand = [1, -1][line.is_reverse] * [-1, 1][line.is_read1 or not line.is_paired] # <<<<<<<<<<<<<< * counter += mate==1 * try: */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); @@ -52057,13 +51264,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_int_neg_1); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_neg_1); __Pyx_GIVEREF(__pyx_int_neg_1); @@ -52071,9 +51278,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_INCREF(__pyx_int_1); __Pyx_GIVEREF(__pyx_int_1); PyList_SET_ITEM(__pyx_t_1, 1, __pyx_int_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2008, __pyx_L1_error) if (!__pyx_t_6) { __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } else { @@ -52082,29 +51289,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L21_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_12 = (!__pyx_t_6); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 = __pyx_t_4; __pyx_t_4 = 0; __pyx_L21_bool_binop_done:; - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_2 = PyNumber_Multiply(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2056, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2008, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_map_strand = __pyx_t_16; - /* "_rnaseq_utils.pyx":2057 + /* "_rnaseq_utils.pyx":2009 * mate, strand = self.determine_strand(line, stranded, reverse) * map_strand = [1, -1][line.is_reverse] * [-1, 1][line.is_read1 or not line.is_paired] * counter += mate==1 # <<<<<<<<<<<<<< @@ -52113,7 +51320,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_counter = (__pyx_v_counter + (__pyx_v_mate == 1)); - /* "_rnaseq_utils.pyx":2058 + /* "_rnaseq_utils.pyx":2010 * map_strand = [1, -1][line.is_reverse] * [-1, 1][line.is_read1 or not line.is_paired] * counter += mate==1 * try: # <<<<<<<<<<<<<< @@ -52129,14 +51336,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XGOTREF(__pyx_t_19); /*try:*/ { - /* "_rnaseq_utils.pyx":2059 + /* "_rnaseq_utils.pyx":2011 * counter += mate==1 * try: * map_number = line.get_tag('HI') # <<<<<<<<<<<<<< * except KeyError: * map_number = counter */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2059, __pyx_L23_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2011, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -52150,14 +51357,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_n_u_HI) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_n_u_HI); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2059, __pyx_L23_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2011, __pyx_L23_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2059, __pyx_L23_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2011, __pyx_L23_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_map_number = __pyx_t_16; - /* "_rnaseq_utils.pyx":2058 + /* "_rnaseq_utils.pyx":2010 * map_strand = [1, -1][line.is_reverse] * [-1, 1][line.is_read1 or not line.is_paired] * counter += mate==1 * try: # <<<<<<<<<<<<<< @@ -52175,7 +51382,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2060 + /* "_rnaseq_utils.pyx":2012 * try: * map_number = line.get_tag('HI') * except KeyError: # <<<<<<<<<<<<<< @@ -52185,12 +51392,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_16) { __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 2060, __pyx_L25_except_error) + if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_4, &__pyx_t_3) < 0) __PYX_ERR(0, 2012, __pyx_L25_except_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_3); - /* "_rnaseq_utils.pyx":2061 + /* "_rnaseq_utils.pyx":2013 * map_number = line.get_tag('HI') * except KeyError: * map_number = counter # <<<<<<<<<<<<<< @@ -52206,7 +51413,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L25_except_error; __pyx_L25_except_error:; - /* "_rnaseq_utils.pyx":2058 + /* "_rnaseq_utils.pyx":2010 * map_strand = [1, -1][line.is_reverse] * [-1, 1][line.is_read1 or not line.is_paired] * counter += mate==1 * try: # <<<<<<<<<<<<<< @@ -52226,46 +51433,46 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_L30_try_end:; } - /* "_rnaseq_utils.pyx":2063 + /* "_rnaseq_utils.pyx":2015 * map_number = counter * * seq = line.query_sequence # <<<<<<<<<<<<<< * pos = line.reference_start * chrom_id = line.reference_id */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2063, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2015, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2063, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2015, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_seq, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":2064 + /* "_rnaseq_utils.pyx":2016 * * seq = line.query_sequence * pos = line.reference_start # <<<<<<<<<<<<<< * chrom_id = line.reference_id * try: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2064, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2016, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2064, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2016, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_pos = __pyx_t_16; - /* "_rnaseq_utils.pyx":2065 + /* "_rnaseq_utils.pyx":2017 * seq = line.query_sequence * pos = line.reference_start * chrom_id = line.reference_id # <<<<<<<<<<<<<< * try: * chrom = line.header.get_reference_name(chrom_id) */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_reference_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2065, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_reference_id); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2065, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2017, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_chrom_id = __pyx_t_16; - /* "_rnaseq_utils.pyx":2066 + /* "_rnaseq_utils.pyx":2018 * pos = line.reference_start * chrom_id = line.reference_id * try: # <<<<<<<<<<<<<< @@ -52281,19 +51488,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { - /* "_rnaseq_utils.pyx":2067 + /* "_rnaseq_utils.pyx":2019 * chrom_id = line.reference_id * try: * chrom = line.header.get_reference_name(chrom_id) # <<<<<<<<<<<<<< * except: * chrom = line.reference_name */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_header); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2067, __pyx_L33_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_header); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_reference_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2067, __pyx_L33_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_get_reference_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_chrom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2067, __pyx_L33_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_chrom_id); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2019, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -52308,14 +51515,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_3 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2067, __pyx_L33_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2019, __pyx_L33_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2067, __pyx_L33_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2019, __pyx_L33_error) __Pyx_XDECREF_SET(__pyx_v_chrom, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":2066 + /* "_rnaseq_utils.pyx":2018 * pos = line.reference_start * chrom_id = line.reference_id * try: # <<<<<<<<<<<<<< @@ -52333,7 +51540,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2068 + /* "_rnaseq_utils.pyx":2020 * try: * chrom = line.header.get_reference_name(chrom_id) * except: # <<<<<<<<<<<<<< @@ -52342,21 +51549,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ /*except:*/ { __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 2068, __pyx_L35_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 2020, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); - /* "_rnaseq_utils.pyx":2069 + /* "_rnaseq_utils.pyx":2021 * chrom = line.header.get_reference_name(chrom_id) * except: * chrom = line.reference_name # <<<<<<<<<<<<<< * * # Parse the SAM CIGAR string to get mapped positions, splice junction sites, and softclipped positions */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_reference_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2069, __pyx_L35_except_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_reference_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2021, __pyx_L35_except_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 2069, __pyx_L35_except_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 2021, __pyx_L35_except_error) __Pyx_XDECREF_SET(__pyx_v_chrom, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -52366,7 +51573,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_L35_except_error:; - /* "_rnaseq_utils.pyx":2066 + /* "_rnaseq_utils.pyx":2018 * pos = line.reference_start * chrom_id = line.reference_id * try: # <<<<<<<<<<<<<< @@ -52386,7 +51593,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_L40_try_end:; } - /* "_rnaseq_utils.pyx":2072 + /* "_rnaseq_utils.pyx":2024 * * # Parse the SAM CIGAR string to get mapped positions, splice junction sites, and softclipped positions * try: # <<<<<<<<<<<<<< @@ -52402,14 +51609,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XGOTREF(__pyx_t_19); /*try:*/ { - /* "_rnaseq_utils.pyx":2073 + /* "_rnaseq_utils.pyx":2025 * # Parse the SAM CIGAR string to get mapped positions, splice junction sites, and softclipped positions * try: * errors = line.get_tag('nM') # <<<<<<<<<<<<<< * except KeyError: * try: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2073, __pyx_L43_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2025, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -52423,14 +51630,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_t_4 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_n_u_nM) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_nM); __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2073, __pyx_L43_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2025, __pyx_L43_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2073, __pyx_L43_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2025, __pyx_L43_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_errors = __pyx_t_16; - /* "_rnaseq_utils.pyx":2072 + /* "_rnaseq_utils.pyx":2024 * * # Parse the SAM CIGAR string to get mapped positions, splice junction sites, and softclipped positions * try: # <<<<<<<<<<<<<< @@ -52448,7 +51655,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2074 + /* "_rnaseq_utils.pyx":2026 * try: * errors = line.get_tag('nM') * except KeyError: # <<<<<<<<<<<<<< @@ -52458,12 +51665,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_16) { __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 2074, __pyx_L45_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 2026, __pyx_L45_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_3); - /* "_rnaseq_utils.pyx":2075 + /* "_rnaseq_utils.pyx":2027 * errors = line.get_tag('nM') * except KeyError: * try: # <<<<<<<<<<<<<< @@ -52479,14 +51686,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XGOTREF(__pyx_t_22); /*try:*/ { - /* "_rnaseq_utils.pyx":2076 + /* "_rnaseq_utils.pyx":2028 * except KeyError: * try: * errors = line.get_tag('NM') # <<<<<<<<<<<<<< * except KeyError: * errors = 0 */ - __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2076, __pyx_L53_error) + __pyx_t_23 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2028, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_24 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_23))) { @@ -52500,14 +51707,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_t_1 = (__pyx_t_24) ? __Pyx_PyObject_Call2Args(__pyx_t_23, __pyx_t_24, __pyx_n_u_NM) : __Pyx_PyObject_CallOneArg(__pyx_t_23, __pyx_n_u_NM); __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2076, __pyx_L53_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2028, __pyx_L53_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2076, __pyx_L53_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2028, __pyx_L53_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_errors = __pyx_t_16; - /* "_rnaseq_utils.pyx":2075 + /* "_rnaseq_utils.pyx":2027 * errors = line.get_tag('nM') * except KeyError: * try: # <<<<<<<<<<<<<< @@ -52524,7 +51731,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0; - /* "_rnaseq_utils.pyx":2077 + /* "_rnaseq_utils.pyx":2029 * try: * errors = line.get_tag('NM') * except KeyError: # <<<<<<<<<<<<<< @@ -52534,12 +51741,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_16) { __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_23, &__pyx_t_24) < 0) __PYX_ERR(0, 2077, __pyx_L55_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_23, &__pyx_t_24) < 0) __PYX_ERR(0, 2029, __pyx_L55_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_23); __Pyx_GOTREF(__pyx_t_24); - /* "_rnaseq_utils.pyx":2078 + /* "_rnaseq_utils.pyx":2030 * errors = line.get_tag('NM') * except KeyError: * errors = 0 # <<<<<<<<<<<<<< @@ -52555,7 +51762,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L55_except_error; __pyx_L55_except_error:; - /* "_rnaseq_utils.pyx":2075 + /* "_rnaseq_utils.pyx":2027 * errors = line.get_tag('nM') * except KeyError: * try: # <<<<<<<<<<<<<< @@ -52582,7 +51789,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L45_except_error; __pyx_L45_except_error:; - /* "_rnaseq_utils.pyx":2072 + /* "_rnaseq_utils.pyx":2024 * * # Parse the SAM CIGAR string to get mapped positions, splice junction sites, and softclipped positions * try: # <<<<<<<<<<<<<< @@ -52602,7 +51809,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_L50_try_end:; } - /* "_rnaseq_utils.pyx":2080 + /* "_rnaseq_utils.pyx":2032 * errors = 0 * * try: # <<<<<<<<<<<<<< @@ -52618,14 +51825,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XGOTREF(__pyx_t_17); /*try:*/ { - /* "_rnaseq_utils.pyx":2081 + /* "_rnaseq_utils.pyx":2033 * * try: * mdstring = line.get_tag('MD') # <<<<<<<<<<<<<< * except KeyError: * mdstring = str(len(seq)) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2081, __pyx_L63_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -52639,13 +51846,13 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_n_u_MD) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_n_u_MD); __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2081, __pyx_L63_error) + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L63_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_XDECREF_SET(__pyx_v_mdstring, __pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":2080 + /* "_rnaseq_utils.pyx":2032 * errors = 0 * * try: # <<<<<<<<<<<<<< @@ -52665,7 +51872,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2082 + /* "_rnaseq_utils.pyx":2034 * try: * mdstring = line.get_tag('MD') * except KeyError: # <<<<<<<<<<<<<< @@ -52675,12 +51882,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_16 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_16) { __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 2082, __pyx_L65_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_4) < 0) __PYX_ERR(0, 2034, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GOTREF(__pyx_t_2); __Pyx_GOTREF(__pyx_t_4); - /* "_rnaseq_utils.pyx":2083 + /* "_rnaseq_utils.pyx":2035 * mdstring = line.get_tag('MD') * except KeyError: * mdstring = str(len(seq)) # <<<<<<<<<<<<<< @@ -52689,12 +51896,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2083, __pyx_L65_except_error) + __PYX_ERR(0, 2035, __pyx_L65_except_error) } - __pyx_t_7 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_seq); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2083, __pyx_L65_except_error) - __pyx_t_24 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2083, __pyx_L65_except_error) + __pyx_t_7 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_seq); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2035, __pyx_L65_except_error) + __pyx_t_24 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2035, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_24); - __pyx_t_23 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_24); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2083, __pyx_L65_except_error) + __pyx_t_23 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_24); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2035, __pyx_L65_except_error) __Pyx_GOTREF(__pyx_t_23); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __Pyx_XDECREF_SET(__pyx_v_mdstring, __pyx_t_23); @@ -52707,7 +51914,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L65_except_error; __pyx_L65_except_error:; - /* "_rnaseq_utils.pyx":2080 + /* "_rnaseq_utils.pyx":2032 * errors = 0 * * try: # <<<<<<<<<<<<<< @@ -52727,21 +51934,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_L70_try_end:; } - /* "_rnaseq_utils.pyx":2085 + /* "_rnaseq_utils.pyx":2037 * mdstring = str(len(seq)) * * ranges, introns, head, tail = parse_SAM_CIGAR(pos, line.cigartuples, mdstring, self.error_rate, self.quality_filter) # <<<<<<<<<<<<<< * number_of_blocks = len(ranges) * if number_of_blocks == 0: # No exons of passing quality were found */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_cigartuples); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2085, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_cigartuples); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 2085, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_v_mdstring))||((__pyx_v_mdstring) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_mdstring)->tp_name), 0))) __PYX_ERR(0, 2085, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 2037, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_v_mdstring))||((__pyx_v_mdstring) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_mdstring)->tp_name), 0))) __PYX_ERR(0, 2037, __pyx_L1_error) __pyx_t_25.__pyx_n = 2; __pyx_t_25.error_rate = __pyx_v_self->error_rate; __pyx_t_25.quality_filter = __pyx_v_self->quality_filter; - __pyx_t_2 = __pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(__pyx_v_pos, ((PyObject*)__pyx_t_4), ((PyObject*)__pyx_v_mdstring), 0, &__pyx_t_25); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2085, __pyx_L1_error) + __pyx_t_2 = __pyx_f_13_rnaseq_utils_parse_SAM_CIGAR(__pyx_v_pos, ((PyObject*)__pyx_t_4), ((PyObject*)__pyx_v_mdstring), 0, &__pyx_t_25); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { @@ -52750,7 +51957,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o if (unlikely(size != 4)) { if (size > 4) __Pyx_RaiseTooManyValuesError(4); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2085, __pyx_L1_error) + __PYX_ERR(0, 2037, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -52773,7 +51980,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o Py_ssize_t i; PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_23,&__pyx_t_24}; for (i=0; i < 4; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2085, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -52783,7 +51990,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } else { Py_ssize_t index = -1; PyObject** temps[4] = {&__pyx_t_4,&__pyx_t_3,&__pyx_t_23,&__pyx_t_24}; - __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2085, __pyx_L1_error) + __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_26 = Py_TYPE(__pyx_t_1)->tp_iternext; @@ -52792,7 +51999,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_1), 4) < 0) __PYX_ERR(0, 2085, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_1), 4) < 0) __PYX_ERR(0, 2037, __pyx_L1_error) __pyx_t_26 = NULL; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L74_unpacking_done; @@ -52800,11 +52007,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_26 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2085, __pyx_L1_error) + __PYX_ERR(0, 2037, __pyx_L1_error) __pyx_L74_unpacking_done:; } - if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 2085, __pyx_L1_error) - if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2085, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 2037, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2037, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_ranges, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; __Pyx_XDECREF_SET(__pyx_v_introns, ((PyObject*)__pyx_t_3)); @@ -52814,7 +52021,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_XDECREF_SET(__pyx_v_tail, __pyx_t_24); __pyx_t_24 = 0; - /* "_rnaseq_utils.pyx":2086 + /* "_rnaseq_utils.pyx":2038 * * ranges, introns, head, tail = parse_SAM_CIGAR(pos, line.cigartuples, mdstring, self.error_rate, self.quality_filter) * number_of_blocks = len(ranges) # <<<<<<<<<<<<<< @@ -52823,12 +52030,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2086, __pyx_L1_error) + __PYX_ERR(0, 2038, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2086, __pyx_L1_error) + __pyx_t_7 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2038, __pyx_L1_error) __pyx_v_number_of_blocks = __pyx_t_7; - /* "_rnaseq_utils.pyx":2087 + /* "_rnaseq_utils.pyx":2039 * ranges, introns, head, tail = parse_SAM_CIGAR(pos, line.cigartuples, mdstring, self.error_rate, self.quality_filter) * number_of_blocks = len(ranges) * if number_of_blocks == 0: # No exons of passing quality were found # <<<<<<<<<<<<<< @@ -52838,7 +52045,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_12 = ((__pyx_v_number_of_blocks == 0) != 0); if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":2088 + /* "_rnaseq_utils.pyx":2040 * number_of_blocks = len(ranges) * if number_of_blocks == 0: # No exons of passing quality were found * continue # <<<<<<<<<<<<<< @@ -52847,7 +52054,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ goto __pyx_L10_continue; - /* "_rnaseq_utils.pyx":2087 + /* "_rnaseq_utils.pyx":2039 * ranges, introns, head, tail = parse_SAM_CIGAR(pos, line.cigartuples, mdstring, self.error_rate, self.quality_filter) * number_of_blocks = len(ranges) * if number_of_blocks == 0: # No exons of passing quality were found # <<<<<<<<<<<<<< @@ -52856,19 +52063,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2090 + /* "_rnaseq_utils.pyx":2042 * continue * * if tail <= 0: # <<<<<<<<<<<<<< * aligned_seq = seq[max(0,head):] * else: */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_tail, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2090, __pyx_L1_error) - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2090, __pyx_L1_error) + __pyx_t_2 = PyObject_RichCompare(__pyx_v_tail, __pyx_int_0, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2042, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2042, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":2091 + /* "_rnaseq_utils.pyx":2043 * * if tail <= 0: * aligned_seq = seq[max(0,head):] # <<<<<<<<<<<<<< @@ -52877,22 +52084,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2091, __pyx_L1_error) + __PYX_ERR(0, 2043, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_head); __pyx_t_2 = __pyx_v_head; __pyx_t_27 = 0; - __pyx_t_23 = __Pyx_PyInt_From_long(__pyx_t_27); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2091, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyInt_From_long(__pyx_t_27); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_23, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2091, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_23, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2043, __pyx_L1_error) __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2091, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2043, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_12) { __Pyx_INCREF(__pyx_t_2); __pyx_t_24 = __pyx_t_2; } else { - __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_27); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2091, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_27); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_24 = __pyx_t_3; __pyx_t_3 = 0; @@ -52905,16 +52112,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o if (__pyx_t_12) { __pyx_t_7 = 0; } else { - __pyx_t_28 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_28 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2091, __pyx_L1_error) + __pyx_t_28 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_28 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2043, __pyx_L1_error) __pyx_t_7 = __pyx_t_28; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Substring(__pyx_v_seq, __pyx_t_7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2091, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Substring(__pyx_v_seq, __pyx_t_7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_aligned_seq, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":2090 + /* "_rnaseq_utils.pyx":2042 * continue * * if tail <= 0: # <<<<<<<<<<<<<< @@ -52924,7 +52131,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L76; } - /* "_rnaseq_utils.pyx":2093 + /* "_rnaseq_utils.pyx":2045 * aligned_seq = seq[max(0,head):] * else: * aligned_seq = seq[max(0,head):-tail] # <<<<<<<<<<<<<< @@ -52934,22 +52141,22 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o /*else*/ { if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2093, __pyx_L1_error) + __PYX_ERR(0, 2045, __pyx_L1_error) } __Pyx_INCREF(__pyx_v_head); __pyx_t_2 = __pyx_v_head; __pyx_t_27 = 0; - __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_27); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_27); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_23 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_23 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; if (__pyx_t_12) { __Pyx_INCREF(__pyx_t_2); __pyx_t_24 = __pyx_t_2; } else { - __pyx_t_23 = __Pyx_PyInt_From_long(__pyx_t_27); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyInt_From_long(__pyx_t_27); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); __pyx_t_24 = __pyx_t_23; __pyx_t_23 = 0; @@ -52962,38 +52169,38 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o if (__pyx_t_12) { __pyx_t_7 = 0; } else { - __pyx_t_28 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_28 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_28 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_28 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2045, __pyx_L1_error) __pyx_t_7 = __pyx_t_28; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Negative(__pyx_v_tail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_2 = PyNumber_Negative(__pyx_v_tail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_12 = (__pyx_t_2 == Py_None); if (__pyx_t_12) { __pyx_t_28 = PY_SSIZE_T_MAX; } else { - __pyx_t_29 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_29 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_29 = __Pyx_PyIndex_AsSsize_t(__pyx_t_2); if (unlikely((__pyx_t_29 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 2045, __pyx_L1_error) __pyx_t_28 = __pyx_t_29; } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyUnicode_Substring(__pyx_v_seq, __pyx_t_7, __pyx_t_28); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2093, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_Substring(__pyx_v_seq, __pyx_t_7, __pyx_t_28); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2045, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_XDECREF_SET(__pyx_v_aligned_seq, ((PyObject*)__pyx_t_2)); __pyx_t_2 = 0; } __pyx_L76:; - /* "_rnaseq_utils.pyx":2095 + /* "_rnaseq_utils.pyx":2047 * aligned_seq = seq[max(0,head):-tail] * * match_length = len(aligned_seq) - errors # <<<<<<<<<<<<<< * if match_length < self.dataset.minlen_loose: # Read is short enought to require stringent filtering * if self.fails_stringent_filters(Nmap, match_length, head, tail, errors): */ - __pyx_t_28 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_aligned_seq); if (unlikely(__pyx_t_28 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2095, __pyx_L1_error) + __pyx_t_28 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_aligned_seq); if (unlikely(__pyx_t_28 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2047, __pyx_L1_error) __pyx_v_match_length = (__pyx_t_28 - __pyx_v_errors); - /* "_rnaseq_utils.pyx":2096 + /* "_rnaseq_utils.pyx":2048 * * match_length = len(aligned_seq) - errors * if match_length < self.dataset.minlen_loose: # Read is short enought to require stringent filtering # <<<<<<<<<<<<<< @@ -53003,19 +52210,19 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_12 = ((__pyx_v_match_length < __pyx_v_self->dataset->minlen_loose) != 0); if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":2097 + /* "_rnaseq_utils.pyx":2049 * match_length = len(aligned_seq) - errors * if match_length < self.dataset.minlen_loose: # Read is short enought to require stringent filtering * if self.fails_stringent_filters(Nmap, match_length, head, tail, errors): # <<<<<<<<<<<<<< * continue * */ - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2097, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2097, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2049, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2049, __pyx_L1_error) __pyx_t_12 = (((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->fails_stringent_filters(__pyx_v_self, __pyx_v_Nmap, __pyx_v_match_length, __pyx_t_16, __pyx_t_15, __pyx_v_errors) != 0); if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":2098 + /* "_rnaseq_utils.pyx":2050 * if match_length < self.dataset.minlen_loose: # Read is short enought to require stringent filtering * if self.fails_stringent_filters(Nmap, match_length, head, tail, errors): * continue # <<<<<<<<<<<<<< @@ -53024,7 +52231,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ goto __pyx_L10_continue; - /* "_rnaseq_utils.pyx":2097 + /* "_rnaseq_utils.pyx":2049 * match_length = len(aligned_seq) - errors * if match_length < self.dataset.minlen_loose: # Read is short enought to require stringent filtering * if self.fails_stringent_filters(Nmap, match_length, head, tail, errors): # <<<<<<<<<<<<<< @@ -53033,7 +52240,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2096 + /* "_rnaseq_utils.pyx":2048 * * match_length = len(aligned_seq) - errors * if match_length < self.dataset.minlen_loose: # Read is short enought to require stringent filtering # <<<<<<<<<<<<<< @@ -53042,7 +52249,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2100 + /* "_rnaseq_utils.pyx":2052 * continue * * if match_length < 200: # Short read check: Not a homopolymer # <<<<<<<<<<<<<< @@ -53052,7 +52259,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_12 = ((__pyx_v_match_length < 0xC8) != 0); if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":2101 + /* "_rnaseq_utils.pyx":2053 * * if match_length < 200: # Short read check: Not a homopolymer * if is_homopolymer(aligned_seq): # Aligned sequence >80% repeat of one nucleotide # <<<<<<<<<<<<<< @@ -53062,7 +52269,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_12 = (__pyx_f_13_rnaseq_utils_is_homopolymer(__pyx_v_aligned_seq, NULL) != 0); if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":2102 + /* "_rnaseq_utils.pyx":2054 * if match_length < 200: # Short read check: Not a homopolymer * if is_homopolymer(aligned_seq): # Aligned sequence >80% repeat of one nucleotide * continue # <<<<<<<<<<<<<< @@ -53071,7 +52278,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ goto __pyx_L10_continue; - /* "_rnaseq_utils.pyx":2101 + /* "_rnaseq_utils.pyx":2053 * * if match_length < 200: # Short read check: Not a homopolymer * if is_homopolymer(aligned_seq): # Aligned sequence >80% repeat of one nucleotide # <<<<<<<<<<<<<< @@ -53080,7 +52287,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2100 + /* "_rnaseq_utils.pyx":2052 * continue * * if match_length < 200: # Short read check: Not a homopolymer # <<<<<<<<<<<<<< @@ -53089,7 +52296,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2105 + /* "_rnaseq_utils.pyx":2057 * * # EVALUATE SOFTCLIPPED NUCLEOTIDES * fiveprime = mate == 1 # <<<<<<<<<<<<<< @@ -53098,7 +52305,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_fiveprime = (__pyx_v_mate == 1); - /* "_rnaseq_utils.pyx":2106 + /* "_rnaseq_utils.pyx":2058 * # EVALUATE SOFTCLIPPED NUCLEOTIDES * fiveprime = mate == 1 * threeprime = (mate == 1 and not line.is_paired) or mate == 2 # <<<<<<<<<<<<<< @@ -53110,9 +52317,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L82_next_or; } else { } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2106, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2058, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2106, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2058, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_30 = ((!__pyx_t_6) != 0); if (!__pyx_t_30) { @@ -53126,7 +52333,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_L81_bool_binop_done:; __pyx_v_threeprime = __pyx_t_12; - /* "_rnaseq_utils.pyx":2107 + /* "_rnaseq_utils.pyx":2059 * fiveprime = mate == 1 * threeprime = (mate == 1 and not line.is_paired) or mate == 2 * if self.dataset.labels_are_trimmed: # <<<<<<<<<<<<<< @@ -53136,27 +52343,33 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __pyx_t_12 = (__pyx_v_self->dataset->labels_are_trimmed != 0); if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":2108 + /* "_rnaseq_utils.pyx":2060 * threeprime = (mate == 1 and not line.is_paired) or mate == 2 * if self.dataset.labels_are_trimmed: * s_tag, e_tag, capped = self.filter_labels_by_softclip_length(s_tag, e_tag, capped, fiveprime, threeprime, strand, head, tail, self.max_headclip) # <<<<<<<<<<<<<< * elif not stranded_method: # Labels are untrimmed and it's an unstranded method, e.g. ONT cDNA * strand = self.orient_read_by_softclip(seq, head, tail) */ - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2108, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2108, __pyx_L1_error) - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2108, __pyx_L1_error) - __pyx_t_31 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->filter_labels_by_softclip_length(__pyx_v_self, __pyx_v_s_tag, __pyx_t_12, __pyx_v_capped, __pyx_v_fiveprime, __pyx_v_threeprime, __pyx_v_strand, __pyx_t_15, __pyx_t_16, __pyx_v_self->max_headclip); - __pyx_t_12 = __pyx_t_31.f0; - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_31.f1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2108, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_s_tag); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2060, __pyx_L1_error) + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely((__pyx_t_30 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2060, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_capped); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2060, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2060, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2060, __pyx_L1_error) + __pyx_t_31 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->filter_labels_by_softclip_length(__pyx_v_self, __pyx_t_12, __pyx_t_30, __pyx_t_6, __pyx_v_fiveprime, __pyx_v_threeprime, __pyx_v_strand, __pyx_t_15, __pyx_t_16, __pyx_v_self->max_headclip); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_31.f0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2060, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_30 = __pyx_t_31.f2; - __pyx_v_s_tag = __pyx_t_12; - __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_2); + __pyx_t_24 = __Pyx_PyInt_From_int(__pyx_t_31.f1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2060, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_t_31.f2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2060, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF_SET(__pyx_v_s_tag, __pyx_t_2); __pyx_t_2 = 0; - __pyx_v_capped = __pyx_t_30; + __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_24); + __pyx_t_24 = 0; + __Pyx_DECREF_SET(__pyx_v_capped, __pyx_t_23); + __pyx_t_23 = 0; - /* "_rnaseq_utils.pyx":2107 + /* "_rnaseq_utils.pyx":2059 * fiveprime = mate == 1 * threeprime = (mate == 1 and not line.is_paired) or mate == 2 * if self.dataset.labels_are_trimmed: # <<<<<<<<<<<<<< @@ -53166,54 +52379,58 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L84; } - /* "_rnaseq_utils.pyx":2109 + /* "_rnaseq_utils.pyx":2061 * if self.dataset.labels_are_trimmed: * s_tag, e_tag, capped = self.filter_labels_by_softclip_length(s_tag, e_tag, capped, fiveprime, threeprime, strand, head, tail, self.max_headclip) * elif not stranded_method: # Labels are untrimmed and it's an unstranded method, e.g. ONT cDNA # <<<<<<<<<<<<<< * strand = self.orient_read_by_softclip(seq, head, tail) * if strand == 0: # Read couldn't be oriented by tags; remove them */ - __pyx_t_30 = ((!(__pyx_v_stranded_method != 0)) != 0); - if (__pyx_t_30) { + __pyx_t_6 = ((!(__pyx_v_stranded_method != 0)) != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2110 + /* "_rnaseq_utils.pyx":2062 * s_tag, e_tag, capped = self.filter_labels_by_softclip_length(s_tag, e_tag, capped, fiveprime, threeprime, strand, head, tail, self.max_headclip) * elif not stranded_method: # Labels are untrimmed and it's an unstranded method, e.g. ONT cDNA * strand = self.orient_read_by_softclip(seq, head, tail) # <<<<<<<<<<<<<< * if strand == 0: # Read couldn't be oriented by tags; remove them * s_tag, e_tag, capped = False, False, False */ - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2110, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2110, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2062, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2062, __pyx_L1_error) __pyx_v_strand = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->orient_read_by_softclip(__pyx_v_self, __pyx_v_seq, __pyx_t_16, __pyx_t_15, NULL); - /* "_rnaseq_utils.pyx":2111 + /* "_rnaseq_utils.pyx":2063 * elif not stranded_method: # Labels are untrimmed and it's an unstranded method, e.g. ONT cDNA * strand = self.orient_read_by_softclip(seq, head, tail) * if strand == 0: # Read couldn't be oriented by tags; remove them # <<<<<<<<<<<<<< * s_tag, e_tag, capped = False, False, False * else: */ - __pyx_t_30 = ((__pyx_v_strand == 0) != 0); - if (__pyx_t_30) { + __pyx_t_6 = ((__pyx_v_strand == 0) != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2112 + /* "_rnaseq_utils.pyx":2064 * strand = self.orient_read_by_softclip(seq, head, tail) * if strand == 0: # Read couldn't be oriented by tags; remove them * s_tag, e_tag, capped = False, False, False # <<<<<<<<<<<<<< * else: * s_tag, e_tag = True, True */ - __pyx_t_30 = 0; + __pyx_t_23 = Py_False; + __Pyx_INCREF(__pyx_t_23); + __pyx_t_24 = Py_False; + __Pyx_INCREF(__pyx_t_24); __pyx_t_2 = Py_False; __Pyx_INCREF(__pyx_t_2); - __pyx_t_12 = 0; - __pyx_v_s_tag = __pyx_t_30; - __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_2); + __Pyx_DECREF_SET(__pyx_v_s_tag, __pyx_t_23); + __pyx_t_23 = 0; + __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_24); + __pyx_t_24 = 0; + __Pyx_DECREF_SET(__pyx_v_capped, __pyx_t_2); __pyx_t_2 = 0; - __pyx_v_capped = __pyx_t_12; - /* "_rnaseq_utils.pyx":2111 + /* "_rnaseq_utils.pyx":2063 * elif not stranded_method: # Labels are untrimmed and it's an unstranded method, e.g. ONT cDNA * strand = self.orient_read_by_softclip(seq, head, tail) * if strand == 0: # Read couldn't be oriented by tags; remove them # <<<<<<<<<<<<<< @@ -53223,7 +52440,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L85; } - /* "_rnaseq_utils.pyx":2114 + /* "_rnaseq_utils.pyx":2066 * s_tag, e_tag, capped = False, False, False * else: * s_tag, e_tag = True, True # <<<<<<<<<<<<<< @@ -53231,16 +52448,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o * # Check for uuG's (5') or terminal mismatches (3') */ /*else*/ { - __pyx_t_12 = 1; __pyx_t_2 = Py_True; __Pyx_INCREF(__pyx_t_2); - __pyx_v_s_tag = __pyx_t_12; - __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_2); + __pyx_t_24 = Py_True; + __Pyx_INCREF(__pyx_t_24); + __Pyx_DECREF_SET(__pyx_v_s_tag, __pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_24); + __pyx_t_24 = 0; } __pyx_L85:; - /* "_rnaseq_utils.pyx":2109 + /* "_rnaseq_utils.pyx":2061 * if self.dataset.labels_are_trimmed: * s_tag, e_tag, capped = self.filter_labels_by_softclip_length(s_tag, e_tag, capped, fiveprime, threeprime, strand, head, tail, self.max_headclip) * elif not stranded_method: # Labels are untrimmed and it's an unstranded method, e.g. ONT cDNA # <<<<<<<<<<<<<< @@ -53250,7 +52469,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_L84:; - /* "_rnaseq_utils.pyx":2117 + /* "_rnaseq_utils.pyx":2069 * * # Check for uuG's (5') or terminal mismatches (3') * e_tag_added = False # <<<<<<<<<<<<<< @@ -53259,17 +52478,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_e_tag_added = 0; - /* "_rnaseq_utils.pyx":2118 + /* "_rnaseq_utils.pyx":2070 * # Check for uuG's (5') or terminal mismatches (3') * e_tag_added = False * if self.dataset.has_genome: # <<<<<<<<<<<<<< * start_pos = 0 * end_pos = 0 */ - __pyx_t_12 = (__pyx_v_self->dataset->has_genome != 0); - if (__pyx_t_12) { + __pyx_t_6 = (__pyx_v_self->dataset->has_genome != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2119 + /* "_rnaseq_utils.pyx":2071 * e_tag_added = False * if self.dataset.has_genome: * start_pos = 0 # <<<<<<<<<<<<<< @@ -53278,7 +52497,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_start_pos = 0; - /* "_rnaseq_utils.pyx":2120 + /* "_rnaseq_utils.pyx":2072 * if self.dataset.has_genome: * start_pos = 0 * end_pos = 0 # <<<<<<<<<<<<<< @@ -53287,7 +52506,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_end_pos = 0; - /* "_rnaseq_utils.pyx":2121 + /* "_rnaseq_utils.pyx":2073 * start_pos = 0 * end_pos = 0 * if strand == 1: # <<<<<<<<<<<<<< @@ -53297,7 +52516,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":2122 + /* "_rnaseq_utils.pyx":2074 * end_pos = 0 * if strand == 1: * start_pos = ranges[0][0] # <<<<<<<<<<<<<< @@ -53306,18 +52525,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2122, __pyx_L1_error) + __PYX_ERR(0, 2074, __pyx_L1_error) } - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2122, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2122, __pyx_L1_error) + __pyx_t_24 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_24); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_24); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2122, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_24, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2074, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2074, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_start_pos = __pyx_t_15; - /* "_rnaseq_utils.pyx":2123 + /* "_rnaseq_utils.pyx":2075 * if strand == 1: * start_pos = ranges[0][0] * end_pos = ranges[-1][-1]-1 # <<<<<<<<<<<<<< @@ -53326,21 +52545,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2123, __pyx_L1_error) + __PYX_ERR(0, 2075, __pyx_L1_error) } - __pyx_t_24 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2123, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_24); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_24, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2123, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; - __pyx_t_24 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2123, __pyx_L1_error) + __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2075, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_24); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2123, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_24, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2075, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2075, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_end_pos = __pyx_t_15; - /* "_rnaseq_utils.pyx":2121 + /* "_rnaseq_utils.pyx":2073 * start_pos = 0 * end_pos = 0 * if strand == 1: # <<<<<<<<<<<<<< @@ -53350,7 +52569,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o break; case -1L: - /* "_rnaseq_utils.pyx":2125 + /* "_rnaseq_utils.pyx":2077 * end_pos = ranges[-1][-1]-1 * elif strand == -1: * start_pos = ranges[-1][-1]-1 # <<<<<<<<<<<<<< @@ -53359,21 +52578,21 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2125, __pyx_L1_error) + __PYX_ERR(0, 2077, __pyx_L1_error) } - __pyx_t_24 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2125, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_24); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_24, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2125, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; - __pyx_t_24 = __Pyx_PyInt_SubtractObjC(__pyx_t_2, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2125, __pyx_L1_error) + __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2077, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_24); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2125, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_SubtractObjC(__pyx_t_24, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2077, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2077, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_start_pos = __pyx_t_15; - /* "_rnaseq_utils.pyx":2126 + /* "_rnaseq_utils.pyx":2078 * elif strand == -1: * start_pos = ranges[-1][-1]-1 * end_pos = ranges[0][0] # <<<<<<<<<<<<<< @@ -53382,18 +52601,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2126, __pyx_L1_error) + __PYX_ERR(0, 2078, __pyx_L1_error) } - __pyx_t_24 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2126, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_24); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_24, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2126, __pyx_L1_error) + __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2078, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2126, __pyx_L1_error) + __pyx_t_24 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2078, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_24); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2078, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_v_end_pos = __pyx_t_15; - /* "_rnaseq_utils.pyx":2124 + /* "_rnaseq_utils.pyx":2076 * start_pos = ranges[0][0] * end_pos = ranges[-1][-1]-1 * elif strand == -1: # <<<<<<<<<<<<<< @@ -53404,58 +52623,61 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o default: break; } - /* "_rnaseq_utils.pyx":2128 + /* "_rnaseq_utils.pyx":2080 * end_pos = ranges[0][0] * * if s_tag and fiveprime: # <<<<<<<<<<<<<< * if head > 0 or tail > 0: * capped = self.untemplated_upstream_g(strand, head, tail, seq, chrom, ranges) */ - __pyx_t_30 = (__pyx_v_s_tag != 0); + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_v_s_tag); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2080, __pyx_L1_error) if (__pyx_t_30) { } else { - __pyx_t_12 = __pyx_t_30; + __pyx_t_6 = __pyx_t_30; goto __pyx_L88_bool_binop_done; } __pyx_t_30 = (__pyx_v_fiveprime != 0); - __pyx_t_12 = __pyx_t_30; + __pyx_t_6 = __pyx_t_30; __pyx_L88_bool_binop_done:; - if (__pyx_t_12) { + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2129 + /* "_rnaseq_utils.pyx":2081 * * if s_tag and fiveprime: * if head > 0 or tail > 0: # <<<<<<<<<<<<<< * capped = self.untemplated_upstream_g(strand, head, tail, seq, chrom, ranges) * */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_head, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2129, __pyx_L1_error) - __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2129, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_24 = PyObject_RichCompare(__pyx_v_head, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_24); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2081, __pyx_L1_error) + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2081, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; if (!__pyx_t_30) { } else { - __pyx_t_12 = __pyx_t_30; + __pyx_t_6 = __pyx_t_30; goto __pyx_L91_bool_binop_done; } - __pyx_t_2 = PyObject_RichCompare(__pyx_v_tail, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2129, __pyx_L1_error) - __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2129, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_12 = __pyx_t_30; + __pyx_t_24 = PyObject_RichCompare(__pyx_v_tail, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_24); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2081, __pyx_L1_error) + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2081, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_6 = __pyx_t_30; __pyx_L91_bool_binop_done:; - if (__pyx_t_12) { + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2130 + /* "_rnaseq_utils.pyx":2082 * if s_tag and fiveprime: * if head > 0 or tail > 0: * capped = self.untemplated_upstream_g(strand, head, tail, seq, chrom, ranges) # <<<<<<<<<<<<<< * * if self.matches_masking_sequence(chrom, start_pos, strand, 'S', s_len): # Too similar to the 5' masking sequence */ - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2130, __pyx_L1_error) - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2130, __pyx_L1_error) - __pyx_v_capped = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->untemplated_upstream_g(__pyx_v_self, __pyx_v_strand, __pyx_t_15, __pyx_t_16, __pyx_v_seq, __pyx_v_chrom, __pyx_v_ranges); + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2082, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2082, __pyx_L1_error) + __pyx_t_24 = __Pyx_PyBool_FromLong(((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->untemplated_upstream_g(__pyx_v_self, __pyx_v_strand, __pyx_t_15, __pyx_t_16, __pyx_v_seq, __pyx_v_chrom, __pyx_v_ranges)); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2082, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF_SET(__pyx_v_capped, __pyx_t_24); + __pyx_t_24 = 0; - /* "_rnaseq_utils.pyx":2129 + /* "_rnaseq_utils.pyx":2081 * * if s_tag and fiveprime: * if head > 0 or tail > 0: # <<<<<<<<<<<<<< @@ -53464,27 +52686,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2132 + /* "_rnaseq_utils.pyx":2084 * capped = self.untemplated_upstream_g(strand, head, tail, seq, chrom, ranges) * * if self.matches_masking_sequence(chrom, start_pos, strand, 'S', s_len): # Too similar to the 5' masking sequence # <<<<<<<<<<<<<< * s_tag = capped = False * */ - __pyx_t_12 = (((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->matches_masking_sequence(__pyx_v_self, __pyx_v_chrom, __pyx_v_start_pos, __pyx_v_strand, __pyx_n_u_S, __pyx_v_s_len) != 0); - if (__pyx_t_12) { + __pyx_t_6 = (((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->matches_masking_sequence(__pyx_v_self, __pyx_v_chrom, __pyx_v_start_pos, __pyx_v_strand, __pyx_n_u_S, __pyx_v_s_len) != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2133 + /* "_rnaseq_utils.pyx":2085 * * if self.matches_masking_sequence(chrom, start_pos, strand, 'S', s_len): # Too similar to the 5' masking sequence * s_tag = capped = False # <<<<<<<<<<<<<< * * if e_tag and threeprime: */ - __pyx_v_s_tag = 0; - __pyx_v_capped = 0; + __Pyx_INCREF(Py_False); + __Pyx_DECREF_SET(__pyx_v_s_tag, Py_False); + __Pyx_INCREF(Py_False); + __Pyx_DECREF_SET(__pyx_v_capped, Py_False); - /* "_rnaseq_utils.pyx":2132 + /* "_rnaseq_utils.pyx":2084 * capped = self.untemplated_upstream_g(strand, head, tail, seq, chrom, ranges) * * if self.matches_masking_sequence(chrom, start_pos, strand, 'S', s_len): # Too similar to the 5' masking sequence # <<<<<<<<<<<<<< @@ -53493,7 +52717,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2128 + /* "_rnaseq_utils.pyx":2080 * end_pos = ranges[0][0] * * if s_tag and fiveprime: # <<<<<<<<<<<<<< @@ -53502,58 +52726,58 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2135 + /* "_rnaseq_utils.pyx":2087 * s_tag = capped = False * * if e_tag and threeprime: # <<<<<<<<<<<<<< * if head > 0 or tail > 0: * self.restore_terminal_mismatches(strand, head, tail, ranges) */ - __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2135, __pyx_L1_error) + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2087, __pyx_L1_error) if (__pyx_t_30) { } else { - __pyx_t_12 = __pyx_t_30; + __pyx_t_6 = __pyx_t_30; goto __pyx_L95_bool_binop_done; } __pyx_t_30 = (__pyx_v_threeprime != 0); - __pyx_t_12 = __pyx_t_30; + __pyx_t_6 = __pyx_t_30; __pyx_L95_bool_binop_done:; - if (__pyx_t_12) { + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2136 + /* "_rnaseq_utils.pyx":2088 * * if e_tag and threeprime: * if head > 0 or tail > 0: # <<<<<<<<<<<<<< * self.restore_terminal_mismatches(strand, head, tail, ranges) * */ - __pyx_t_2 = PyObject_RichCompare(__pyx_v_head, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2136, __pyx_L1_error) - __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2136, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_24 = PyObject_RichCompare(__pyx_v_head, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_24); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2088, __pyx_L1_error) + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2088, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; if (!__pyx_t_30) { } else { - __pyx_t_12 = __pyx_t_30; + __pyx_t_6 = __pyx_t_30; goto __pyx_L98_bool_binop_done; } - __pyx_t_2 = PyObject_RichCompare(__pyx_v_tail, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2136, __pyx_L1_error) - __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2136, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_12 = __pyx_t_30; + __pyx_t_24 = PyObject_RichCompare(__pyx_v_tail, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_24); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2088, __pyx_L1_error) + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2088, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_6 = __pyx_t_30; __pyx_L98_bool_binop_done:; - if (__pyx_t_12) { + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2137 + /* "_rnaseq_utils.pyx":2089 * if e_tag and threeprime: * if head > 0 or tail > 0: * self.restore_terminal_mismatches(strand, head, tail, ranges) # <<<<<<<<<<<<<< * * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence */ - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2137, __pyx_L1_error) - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2137, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2089, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2089, __pyx_L1_error) ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->restore_terminal_mismatches(__pyx_v_self, __pyx_v_strand, __pyx_t_16, __pyx_t_15, __pyx_v_ranges); - /* "_rnaseq_utils.pyx":2136 + /* "_rnaseq_utils.pyx":2088 * * if e_tag and threeprime: * if head > 0 or tail > 0: # <<<<<<<<<<<<<< @@ -53562,17 +52786,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2139 + /* "_rnaseq_utils.pyx":2091 * self.restore_terminal_mismatches(strand, head, tail, ranges) * * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence # <<<<<<<<<<<<<< * e_tag = False * elif threeprime: */ - __pyx_t_12 = (((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->matches_masking_sequence(__pyx_v_self, __pyx_v_chrom, __pyx_v_end_pos, __pyx_v_strand, __pyx_n_u_E, __pyx_v_e_len) != 0); - if (__pyx_t_12) { + __pyx_t_6 = (((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->matches_masking_sequence(__pyx_v_self, __pyx_v_chrom, __pyx_v_end_pos, __pyx_v_strand, __pyx_n_u_E, __pyx_v_e_len) != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2140 + /* "_rnaseq_utils.pyx":2092 * * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence * e_tag = False # <<<<<<<<<<<<<< @@ -53582,7 +52806,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_e_tag, Py_False); - /* "_rnaseq_utils.pyx":2139 + /* "_rnaseq_utils.pyx":2091 * self.restore_terminal_mismatches(strand, head, tail, ranges) * * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence # <<<<<<<<<<<<<< @@ -53591,7 +52815,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2135 + /* "_rnaseq_utils.pyx":2087 * s_tag = capped = False * * if e_tag and threeprime: # <<<<<<<<<<<<<< @@ -53601,44 +52825,44 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o goto __pyx_L94; } - /* "_rnaseq_utils.pyx":2141 + /* "_rnaseq_utils.pyx":2093 * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence * e_tag = False * elif threeprime: # <<<<<<<<<<<<<< * # Check for softclipped poly(A) tails * e_tag, strand = self.softclipped_polya(strand, head, tail, seq, chrom, ranges) */ - __pyx_t_12 = (__pyx_v_threeprime != 0); - if (__pyx_t_12) { + __pyx_t_6 = (__pyx_v_threeprime != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2143 + /* "_rnaseq_utils.pyx":2095 * elif threeprime: * # Check for softclipped poly(A) tails * e_tag, strand = self.softclipped_polya(strand, head, tail, seq, chrom, ranges) # <<<<<<<<<<<<<< * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence * e_tag = False */ - __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L1_error) - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2143, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_v_head); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2095, __pyx_L1_error) + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_v_tail); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2095, __pyx_L1_error) __pyx_t_13 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->softclipped_polya(__pyx_v_self, __pyx_v_strand, __pyx_t_15, __pyx_t_16, __pyx_v_seq, __pyx_v_chrom, __pyx_v_ranges); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_t_13.f0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2143, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_24 = __Pyx_PyInt_From_int(__pyx_t_13.f0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2095, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); __pyx_t_16 = __pyx_t_13.f1; - __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_2); - __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_e_tag, __pyx_t_24); + __pyx_t_24 = 0; __pyx_v_strand = __pyx_t_16; - /* "_rnaseq_utils.pyx":2144 + /* "_rnaseq_utils.pyx":2096 * # Check for softclipped poly(A) tails * e_tag, strand = self.softclipped_polya(strand, head, tail, seq, chrom, ranges) * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence # <<<<<<<<<<<<<< * e_tag = False * */ - __pyx_t_12 = (((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->matches_masking_sequence(__pyx_v_self, __pyx_v_chrom, __pyx_v_end_pos, __pyx_v_strand, __pyx_n_u_E, __pyx_v_e_len) != 0); - if (__pyx_t_12) { + __pyx_t_6 = (((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->matches_masking_sequence(__pyx_v_self, __pyx_v_chrom, __pyx_v_end_pos, __pyx_v_strand, __pyx_n_u_E, __pyx_v_e_len) != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2145 + /* "_rnaseq_utils.pyx":2097 * e_tag, strand = self.softclipped_polya(strand, head, tail, seq, chrom, ranges) * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence * e_tag = False # <<<<<<<<<<<<<< @@ -53648,7 +52872,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o __Pyx_INCREF(Py_False); __Pyx_DECREF_SET(__pyx_v_e_tag, Py_False); - /* "_rnaseq_utils.pyx":2144 + /* "_rnaseq_utils.pyx":2096 * # Check for softclipped poly(A) tails * e_tag, strand = self.softclipped_polya(strand, head, tail, seq, chrom, ranges) * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence # <<<<<<<<<<<<<< @@ -53657,17 +52881,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2147 + /* "_rnaseq_utils.pyx":2099 * e_tag = False * * if e_tag: # <<<<<<<<<<<<<< * e_tag_added = True * if strand == 1: */ - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2147, __pyx_L1_error) - if (__pyx_t_12) { + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2099, __pyx_L1_error) + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2148 + /* "_rnaseq_utils.pyx":2100 * * if e_tag: * e_tag_added = True # <<<<<<<<<<<<<< @@ -53676,7 +52900,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ __pyx_v_e_tag_added = 1; - /* "_rnaseq_utils.pyx":2149 + /* "_rnaseq_utils.pyx":2101 * if e_tag: * e_tag_added = True * if strand == 1: # <<<<<<<<<<<<<< @@ -53686,7 +52910,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":2150 + /* "_rnaseq_utils.pyx":2102 * e_tag_added = True * if strand == 1: * e_tag_len = max(e_tag_len, tail) # <<<<<<<<<<<<<< @@ -53694,29 +52918,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o * e_tag_len = max(e_tag_len, head) */ __Pyx_INCREF(__pyx_v_tail); - __pyx_t_2 = __pyx_v_tail; + __pyx_t_24 = __pyx_v_tail; __pyx_t_16 = __pyx_v_e_tag_len; - __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2150, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); - __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_23, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2150, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_24, __pyx_t_23, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2150, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2102, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (__pyx_t_12) { - __Pyx_INCREF(__pyx_t_2); - __pyx_t_24 = __pyx_t_2; + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_t_24); + __pyx_t_2 = __pyx_t_24; } else { - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2150, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_24 = __pyx_t_3; + __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_24); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2150, __pyx_L1_error) __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2102, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_e_tag_len = __pyx_t_16; - /* "_rnaseq_utils.pyx":2149 + /* "_rnaseq_utils.pyx":2101 * if e_tag: * e_tag_added = True * if strand == 1: # <<<<<<<<<<<<<< @@ -53726,7 +52950,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o break; case -1L: - /* "_rnaseq_utils.pyx":2152 + /* "_rnaseq_utils.pyx":2104 * e_tag_len = max(e_tag_len, tail) * elif strand == -1: * e_tag_len = max(e_tag_len, head) # <<<<<<<<<<<<<< @@ -53734,29 +52958,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o * if number_of_blocks == 1: */ __Pyx_INCREF(__pyx_v_head); - __pyx_t_24 = __pyx_v_head; + __pyx_t_2 = __pyx_v_head; __pyx_t_16 = __pyx_v_e_tag_len; - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2152, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_23 = PyObject_RichCompare(__pyx_t_24, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2152, __pyx_L1_error) + __pyx_t_23 = PyObject_RichCompare(__pyx_t_2, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2152, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2104, __pyx_L1_error) __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; - if (__pyx_t_12) { - __Pyx_INCREF(__pyx_t_24); - __pyx_t_2 = __pyx_t_24; + if (__pyx_t_6) { + __Pyx_INCREF(__pyx_t_2); + __pyx_t_24 = __pyx_t_2; } else { - __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2152, __pyx_L1_error) + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_t_16); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); - __pyx_t_2 = __pyx_t_23; + __pyx_t_24 = __pyx_t_23; __pyx_t_23 = 0; } - __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; - __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2152, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_24); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2104, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; __pyx_v_e_tag_len = __pyx_t_16; - /* "_rnaseq_utils.pyx":2151 + /* "_rnaseq_utils.pyx":2103 * if strand == 1: * e_tag_len = max(e_tag_len, tail) * elif strand == -1: # <<<<<<<<<<<<<< @@ -53767,7 +52991,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o default: break; } - /* "_rnaseq_utils.pyx":2147 + /* "_rnaseq_utils.pyx":2099 * e_tag = False * * if e_tag: # <<<<<<<<<<<<<< @@ -53776,7 +53000,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2141 + /* "_rnaseq_utils.pyx":2093 * if self.matches_masking_sequence(chrom, end_pos, strand, 'E', e_len): # Too similar to the 3' masking sequence * e_tag = False * elif threeprime: # <<<<<<<<<<<<<< @@ -53786,7 +53010,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o } __pyx_L94:; - /* "_rnaseq_utils.pyx":2118 + /* "_rnaseq_utils.pyx":2070 * # Check for uuG's (5') or terminal mismatches (3') * e_tag_added = False * if self.dataset.has_genome: # <<<<<<<<<<<<<< @@ -53795,730 +53019,2617 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_generate_read(struct __pyx_o */ } - /* "_rnaseq_utils.pyx":2154 + /* "_rnaseq_utils.pyx":2106 * e_tag_len = max(e_tag_len, head) * * if number_of_blocks == 1: # <<<<<<<<<<<<<< * junction_strand = 0 - * splice = [] + * canonical = [] */ - __pyx_t_12 = ((__pyx_v_number_of_blocks == 1) != 0); - if (__pyx_t_12) { + __pyx_t_6 = ((__pyx_v_number_of_blocks == 1) != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2155 + /* "_rnaseq_utils.pyx":2107 * * if number_of_blocks == 1: * junction_strand = 0 # <<<<<<<<<<<<<< - * splice = [] + * canonical = [] * else: # Check if the splice junctions can be used to assign a strand */ __pyx_v_junction_strand = 0; - /* "_rnaseq_utils.pyx":2156 + /* "_rnaseq_utils.pyx":2108 * if number_of_blocks == 1: * junction_strand = 0 - * splice = [] # <<<<<<<<<<<<<< + * canonical = [] # <<<<<<<<<<<<<< * else: # Check if the splice junctions can be used to assign a strand - * splice = [False]*(number_of_blocks-1) + * junction_strand = self.get_alignment_strand(line, map_strand) */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2156, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_XDECREF_SET(__pyx_v_splice, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; + __pyx_t_24 = PyList_New(0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2108, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_XDECREF_SET(__pyx_v_canonical, ((PyObject*)__pyx_t_24)); + __pyx_t_24 = 0; - /* "_rnaseq_utils.pyx":2154 + /* "_rnaseq_utils.pyx":2106 * e_tag_len = max(e_tag_len, head) * * if number_of_blocks == 1: # <<<<<<<<<<<<<< * junction_strand = 0 - * splice = [] + * canonical = [] */ goto __pyx_L103; } - /* "_rnaseq_utils.pyx":2158 - * splice = [] + /* "_rnaseq_utils.pyx":2110 + * canonical = [] * else: # Check if the splice junctions can be used to assign a strand - * splice = [False]*(number_of_blocks-1) # <<<<<<<<<<<<<< - * junction_strand = self.get_alignment_strand(line, map_strand) - * intronset = set(introns) + * junction_strand = self.get_alignment_strand(line, map_strand) # <<<<<<<<<<<<<< + * if strand == 0: + * strand, canonical = self.evaluate_splice_sites(chrom, junction_strand, introns) */ /*else*/ { - __pyx_t_2 = PyList_New(1 * (((__pyx_v_number_of_blocks - 1)<0) ? 0:(__pyx_v_number_of_blocks - 1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2158, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - { Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < (__pyx_v_number_of_blocks - 1); __pyx_temp++) { - __Pyx_INCREF(Py_False); - __Pyx_GIVEREF(Py_False); - PyList_SET_ITEM(__pyx_t_2, __pyx_temp, Py_False); - } - } - __Pyx_XDECREF_SET(__pyx_v_splice, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; + __pyx_v_junction_strand = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->get_alignment_strand(__pyx_v_self, __pyx_v_line, __pyx_v_map_strand); - /* "_rnaseq_utils.pyx":2159 + /* "_rnaseq_utils.pyx":2111 * else: # Check if the splice junctions can be used to assign a strand - * splice = [False]*(number_of_blocks-1) - * junction_strand = self.get_alignment_strand(line, map_strand) # <<<<<<<<<<<<<< - * intronset = set(introns) - * if strand != 0: # Try to make junctions on the labeled strand work + * junction_strand = self.get_alignment_strand(line, map_strand) + * if strand == 0: # <<<<<<<<<<<<<< + * strand, canonical = self.evaluate_splice_sites(chrom, junction_strand, introns) + * else: */ - __pyx_v_junction_strand = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->get_alignment_strand(__pyx_v_self, __pyx_v_line, __pyx_v_map_strand); + __pyx_t_6 = ((__pyx_v_strand == 0) != 0); + if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2160 - * splice = [False]*(number_of_blocks-1) + /* "_rnaseq_utils.pyx":2112 * junction_strand = self.get_alignment_strand(line, map_strand) - * intronset = set(introns) # <<<<<<<<<<<<<< - * if strand != 0: # Try to make junctions on the labeled strand work - * newranges, splice = self.get_splice_info(ranges, intronset, chrom, strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks + * if strand == 0: + * strand, canonical = self.evaluate_splice_sites(chrom, junction_strand, introns) # <<<<<<<<<<<<<< + * else: + * strand, canonical = self.evaluate_splice_sites(chrom, strand, introns) */ - __pyx_t_2 = PySet_New(__pyx_v_introns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_XDECREF_SET(__pyx_v_intronset, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_evaluate_splice_sites); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_junction_strand); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_3 = NULL; + __pyx_t_16 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_3)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); + __pyx_t_16 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_chrom, __pyx_t_23, __pyx_v_introns}; + __pyx_t_24 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { + PyObject *__pyx_temp[4] = {__pyx_t_3, __pyx_v_chrom, __pyx_t_23, __pyx_v_introns}; + __pyx_t_24 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + } else + #endif + { + __pyx_t_4 = PyTuple_New(3+__pyx_t_16); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (__pyx_t_3) { + __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL; + } + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_16, __pyx_v_chrom); + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_16, __pyx_t_23); + __Pyx_INCREF(__pyx_v_introns); + __Pyx_GIVEREF(__pyx_v_introns); + PyTuple_SET_ITEM(__pyx_t_4, 2+__pyx_t_16, __pyx_v_introns); + __pyx_t_23 = 0; + __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_24))) || (PyList_CheckExact(__pyx_t_24))) { + PyObject* sequence = __pyx_t_24; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 2112, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_4 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_23 = PyObject_GetIter(__pyx_t_24); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_26 = Py_TYPE(__pyx_t_23)->tp_iternext; + index = 0; __pyx_t_2 = __pyx_t_26(__pyx_t_23); if (unlikely(!__pyx_t_2)) goto __pyx_L105_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_4 = __pyx_t_26(__pyx_t_23); if (unlikely(!__pyx_t_4)) goto __pyx_L105_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_23), 2) < 0) __PYX_ERR(0, 2112, __pyx_L1_error) + __pyx_t_26 = NULL; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + goto __pyx_L106_unpacking_done; + __pyx_L105_unpacking_failed:; + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_t_26 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 2112, __pyx_L1_error) + __pyx_L106_unpacking_done:; + } + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2112, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 2112, __pyx_L1_error) + __pyx_v_strand = __pyx_t_16; + __Pyx_XDECREF_SET(__pyx_v_canonical, ((PyObject*)__pyx_t_4)); + __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2161 + /* "_rnaseq_utils.pyx":2111 + * else: # Check if the splice junctions can be used to assign a strand * junction_strand = self.get_alignment_strand(line, map_strand) - * intronset = set(introns) - * if strand != 0: # Try to make junctions on the labeled strand work # <<<<<<<<<<<<<< - * newranges, splice = self.get_splice_info(ranges, intronset, chrom, strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks - * if all(splice): # The labeled strand works + * if strand == 0: # <<<<<<<<<<<<<< + * strand, canonical = self.evaluate_splice_sites(chrom, junction_strand, introns) + * else: */ - __pyx_t_12 = ((__pyx_v_strand != 0) != 0); - if (__pyx_t_12) { + goto __pyx_L104; + } - /* "_rnaseq_utils.pyx":2162 - * intronset = set(introns) - * if strand != 0: # Try to make junctions on the labeled strand work - * newranges, splice = self.get_splice_info(ranges, intronset, chrom, strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks # <<<<<<<<<<<<<< - * if all(splice): # The labeled strand works - * junction_strand = strand + /* "_rnaseq_utils.pyx":2114 + * strand, canonical = self.evaluate_splice_sites(chrom, junction_strand, introns) + * else: + * strand, canonical = self.evaluate_splice_sites(chrom, strand, introns) # <<<<<<<<<<<<<< + * + * if strand == 0: # Use genomic motifs to identify strand */ - __pyx_t_32.__pyx_n = 1; - __pyx_t_32.remove_noncanonical = __pyx_v_self->remove_noncanonical; - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->get_splice_info(__pyx_v_self, __pyx_v_ranges, __pyx_v_intronset, __pyx_v_chrom, __pyx_v_strand, &__pyx_t_32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2162, __pyx_L1_error) + /*else*/ { + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_evaluate_splice_sites); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2114, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (likely(__pyx_t_2 != Py_None)) { - PyObject* sequence = __pyx_t_2; + __pyx_t_23 = NULL; + __pyx_t_16 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_23 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_23)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_23); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_16 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_23, __pyx_v_chrom, __pyx_t_2, __pyx_v_introns}; + __pyx_t_24 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[4] = {__pyx_t_23, __pyx_v_chrom, __pyx_t_2, __pyx_v_introns}; + __pyx_t_24 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_16, 3+__pyx_t_16); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else + #endif + { + __pyx_t_3 = PyTuple_New(3+__pyx_t_16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__pyx_t_23) { + __Pyx_GIVEREF(__pyx_t_23); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_23); __pyx_t_23 = NULL; + } + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_16, __pyx_v_chrom); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_16, __pyx_t_2); + __Pyx_INCREF(__pyx_v_introns); + __Pyx_GIVEREF(__pyx_v_introns); + PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_16, __pyx_v_introns); + __pyx_t_2 = 0; + __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + } + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_24))) || (PyList_CheckExact(__pyx_t_24))) { + PyObject* sequence = __pyx_t_24; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2162, __pyx_L1_error) + __PYX_ERR(0, 2114, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_24 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_23 = PyTuple_GET_ITEM(sequence, 1); + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_3 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_3); + #else + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + #endif + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_2 = PyObject_GetIter(__pyx_t_24); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_26 = Py_TYPE(__pyx_t_2)->tp_iternext; + index = 0; __pyx_t_4 = __pyx_t_26(__pyx_t_2); if (unlikely(!__pyx_t_4)) goto __pyx_L107_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_3 = __pyx_t_26(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L107_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_2), 2) < 0) __PYX_ERR(0, 2114, __pyx_L1_error) + __pyx_t_26 = NULL; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + goto __pyx_L108_unpacking_done; + __pyx_L107_unpacking_failed:; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_26 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 2114, __pyx_L1_error) + __pyx_L108_unpacking_done:; + } + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2114, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 2114, __pyx_L1_error) + __pyx_v_strand = __pyx_t_16; + __Pyx_XDECREF_SET(__pyx_v_canonical, ((PyObject*)__pyx_t_3)); + __pyx_t_3 = 0; + } + __pyx_L104:; + + /* "_rnaseq_utils.pyx":2116 + * strand, canonical = self.evaluate_splice_sites(chrom, strand, introns) + * + * if strand == 0: # Use genomic motifs to identify strand # <<<<<<<<<<<<<< + * jstrands = [motif_strand(self.dataset.genome, chrom, left, right) for left,right in introns] + * consensus_strand = sum(jstrands) + */ + __pyx_t_6 = ((__pyx_v_strand == 0) != 0); + if (__pyx_t_6) { + + /* "_rnaseq_utils.pyx":2117 + * + * if strand == 0: # Use genomic motifs to identify strand + * jstrands = [motif_strand(self.dataset.genome, chrom, left, right) for left,right in introns] # <<<<<<<<<<<<<< + * consensus_strand = sum(jstrands) + * if consensus_strand > 0: + */ + { /* enter inner scope */ + __pyx_t_24 = PyList_New(0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2117, __pyx_L112_error) + __Pyx_GOTREF(__pyx_t_24); + if (unlikely(__pyx_v_introns == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2117, __pyx_L112_error) + } + __pyx_t_3 = __pyx_v_introns; __Pyx_INCREF(__pyx_t_3); __pyx_t_28 = 0; + for (;;) { + if (__pyx_t_28 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_28); __Pyx_INCREF(__pyx_t_4); __pyx_t_28++; if (unlikely(0 < 0)) __PYX_ERR(0, 2117, __pyx_L112_error) + #else + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_28); __pyx_t_28++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2117, __pyx_L112_error) + __Pyx_GOTREF(__pyx_t_4); + #endif + if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) { + PyObject* sequence = __pyx_t_4; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 2117, __pyx_L112_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_23 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); + __pyx_t_23 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_23); + #else + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2117, __pyx_L112_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_23 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2117, __pyx_L112_error) + __Pyx_GOTREF(__pyx_t_23); + #endif + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_1 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2117, __pyx_L112_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_26 = Py_TYPE(__pyx_t_1)->tp_iternext; + index = 0; __pyx_t_2 = __pyx_t_26(__pyx_t_1); if (unlikely(!__pyx_t_2)) goto __pyx_L115_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 1; __pyx_t_23 = __pyx_t_26(__pyx_t_1); if (unlikely(!__pyx_t_23)) goto __pyx_L115_unpacking_failed; + __Pyx_GOTREF(__pyx_t_23); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_1), 2) < 0) __PYX_ERR(0, 2117, __pyx_L112_error) + __pyx_t_26 = NULL; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L116_unpacking_done; + __pyx_L115_unpacking_failed:; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_26 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 2117, __pyx_L112_error) + __pyx_L116_unpacking_done:; + } + __Pyx_XDECREF_SET(__pyx_9genexpr43__pyx_v_left, __pyx_t_2); + __pyx_t_2 = 0; + __Pyx_XDECREF_SET(__pyx_9genexpr43__pyx_v_right, __pyx_t_23); + __pyx_t_23 = 0; + __pyx_t_4 = __pyx_v_self->dataset->genome; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_16 = __Pyx_PyInt_As_int(__pyx_9genexpr43__pyx_v_left); if (unlikely((__pyx_t_16 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2117, __pyx_L112_error) + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_9genexpr43__pyx_v_right); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2117, __pyx_L112_error) + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_f_13_rnaseq_utils_motif_strand(((PyObject*)__pyx_t_4), __pyx_v_chrom, __pyx_t_16, __pyx_t_15)); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2117, __pyx_L112_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_24, (PyObject*)__pyx_t_23))) __PYX_ERR(0, 2117, __pyx_L112_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_left); __pyx_9genexpr43__pyx_v_left = 0; + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_right); __pyx_9genexpr43__pyx_v_right = 0; + goto __pyx_L117_exit_scope; + __pyx_L112_error:; + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_left); __pyx_9genexpr43__pyx_v_left = 0; + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_right); __pyx_9genexpr43__pyx_v_right = 0; + goto __pyx_L1_error; + __pyx_L117_exit_scope:; + } /* exit inner scope */ + __Pyx_XDECREF_SET(__pyx_v_jstrands, ((PyObject*)__pyx_t_24)); + __pyx_t_24 = 0; + + /* "_rnaseq_utils.pyx":2118 + * if strand == 0: # Use genomic motifs to identify strand + * jstrands = [motif_strand(self.dataset.genome, chrom, left, right) for left,right in introns] + * consensus_strand = sum(jstrands) # <<<<<<<<<<<<<< + * if consensus_strand > 0: + * strand, consensus_strand = 1, 1 + */ + __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_v_jstrands); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2118, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_XDECREF_SET(__pyx_v_consensus_strand, __pyx_t_24); + __pyx_t_24 = 0; + + /* "_rnaseq_utils.pyx":2119 + * jstrands = [motif_strand(self.dataset.genome, chrom, left, right) for left,right in introns] + * consensus_strand = sum(jstrands) + * if consensus_strand > 0: # <<<<<<<<<<<<<< + * strand, consensus_strand = 1, 1 + * elif consensus_strand < 0: + */ + __pyx_t_24 = PyObject_RichCompare(__pyx_v_consensus_strand, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_24); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2119, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2119, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + if (__pyx_t_6) { + + /* "_rnaseq_utils.pyx":2120 + * consensus_strand = sum(jstrands) + * if consensus_strand > 0: + * strand, consensus_strand = 1, 1 # <<<<<<<<<<<<<< + * elif consensus_strand < 0: + * strand, consensus_strand = -1, -1 + */ + __pyx_t_15 = 1; + __pyx_t_24 = __pyx_int_1; + __Pyx_INCREF(__pyx_t_24); + __pyx_v_strand = __pyx_t_15; + __Pyx_DECREF_SET(__pyx_v_consensus_strand, __pyx_t_24); + __pyx_t_24 = 0; + + /* "_rnaseq_utils.pyx":2119 + * jstrands = [motif_strand(self.dataset.genome, chrom, left, right) for left,right in introns] + * consensus_strand = sum(jstrands) + * if consensus_strand > 0: # <<<<<<<<<<<<<< + * strand, consensus_strand = 1, 1 + * elif consensus_strand < 0: + */ + goto __pyx_L118; + } + + /* "_rnaseq_utils.pyx":2121 + * if consensus_strand > 0: + * strand, consensus_strand = 1, 1 + * elif consensus_strand < 0: # <<<<<<<<<<<<<< + * strand, consensus_strand = -1, -1 + * + */ + __pyx_t_24 = PyObject_RichCompare(__pyx_v_consensus_strand, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_24); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2121, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2121, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + if (__pyx_t_6) { + + /* "_rnaseq_utils.pyx":2122 + * strand, consensus_strand = 1, 1 + * elif consensus_strand < 0: + * strand, consensus_strand = -1, -1 # <<<<<<<<<<<<<< + * + * canonical = [True if (js == consensus_strand and consensus_strand !=0) else False for js in jstrands] + */ + __pyx_t_15 = -1; + __pyx_t_24 = __pyx_int_neg_1; __Pyx_INCREF(__pyx_t_24); + __pyx_v_strand = __pyx_t_15; + __Pyx_DECREF_SET(__pyx_v_consensus_strand, __pyx_t_24); + __pyx_t_24 = 0; + + /* "_rnaseq_utils.pyx":2121 + * if consensus_strand > 0: + * strand, consensus_strand = 1, 1 + * elif consensus_strand < 0: # <<<<<<<<<<<<<< + * strand, consensus_strand = -1, -1 + * + */ + } + __pyx_L118:; + + /* "_rnaseq_utils.pyx":2124 + * strand, consensus_strand = -1, -1 + * + * canonical = [True if (js == consensus_strand and consensus_strand !=0) else False for js in jstrands] # <<<<<<<<<<<<<< + * + * # Check if any splice junctions can be corrected by shifting + */ + { /* enter inner scope */ + __pyx_t_24 = PyList_New(0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2124, __pyx_L121_error) + __Pyx_GOTREF(__pyx_t_24); + __pyx_t_3 = __pyx_v_jstrands; __Pyx_INCREF(__pyx_t_3); __pyx_t_28 = 0; + for (;;) { + if (__pyx_t_28 >= PyList_GET_SIZE(__pyx_t_3)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_23 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_28); __Pyx_INCREF(__pyx_t_23); __pyx_t_28++; if (unlikely(0 < 0)) __PYX_ERR(0, 2124, __pyx_L121_error) + #else + __pyx_t_23 = PySequence_ITEM(__pyx_t_3, __pyx_t_28); __pyx_t_28++; if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2124, __pyx_L121_error) + __Pyx_GOTREF(__pyx_t_23); + #endif + __Pyx_XDECREF_SET(__pyx_9genexpr44__pyx_v_js, __pyx_t_23); + __pyx_t_23 = 0; + __pyx_t_4 = PyObject_RichCompare(__pyx_9genexpr44__pyx_v_js, __pyx_v_consensus_strand, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2124, __pyx_L121_error) + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2124, __pyx_L121_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (__pyx_t_30) { + } else { + __pyx_t_6 = __pyx_t_30; + goto __pyx_L124_bool_binop_done; + } + __pyx_t_4 = __Pyx_PyInt_NeObjC(__pyx_v_consensus_strand, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2124, __pyx_L121_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2124, __pyx_L121_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = __pyx_t_30; + __pyx_L124_bool_binop_done:; + if (__pyx_t_6) { + __Pyx_INCREF(Py_True); + __pyx_t_23 = Py_True; + } else { + __Pyx_INCREF(Py_False); + __pyx_t_23 = Py_False; + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_24, (PyObject*)__pyx_t_23))) __PYX_ERR(0, 2124, __pyx_L121_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_js); __pyx_9genexpr44__pyx_v_js = 0; + goto __pyx_L126_exit_scope; + __pyx_L121_error:; + __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_js); __pyx_9genexpr44__pyx_v_js = 0; + goto __pyx_L1_error; + __pyx_L126_exit_scope:; + } /* exit inner scope */ + __Pyx_DECREF_SET(__pyx_v_canonical, ((PyObject*)__pyx_t_24)); + __pyx_t_24 = 0; + + /* "_rnaseq_utils.pyx":2116 + * strand, canonical = self.evaluate_splice_sites(chrom, strand, introns) + * + * if strand == 0: # Use genomic motifs to identify strand # <<<<<<<<<<<<<< + * jstrands = [motif_strand(self.dataset.genome, chrom, left, right) for left,right in introns] + * consensus_strand = sum(jstrands) + */ + } + + /* "_rnaseq_utils.pyx":2127 + * + * # Check if any splice junctions can be corrected by shifting + * if self.sj_shift > 0: # <<<<<<<<<<<<<< + * strand, ranges, canonical = self.adjust_splice_sites(strand, ranges, canonical, chrom) + * + */ + __pyx_t_6 = ((__pyx_v_self->sj_shift > 0) != 0); + if (__pyx_t_6) { + + /* "_rnaseq_utils.pyx":2128 + * # Check if any splice junctions can be corrected by shifting + * if self.sj_shift > 0: + * strand, ranges, canonical = self.adjust_splice_sites(strand, ranges, canonical, chrom) # <<<<<<<<<<<<<< + * + * # Reconcile strand information given by start, end, and splice + */ + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_adjust_splice_sites); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __pyx_t_4 = NULL; + __pyx_t_15 = 0; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_4)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + __pyx_t_15 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_23, __pyx_v_ranges, __pyx_v_canonical, __pyx_v_chrom}; + __pyx_t_24 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 4+__pyx_t_15); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { + PyObject *__pyx_temp[5] = {__pyx_t_4, __pyx_t_23, __pyx_v_ranges, __pyx_v_canonical, __pyx_v_chrom}; + __pyx_t_24 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_15, 4+__pyx_t_15); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + } else + #endif + { + __pyx_t_2 = PyTuple_New(4+__pyx_t_15); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (__pyx_t_4) { + __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_4); __pyx_t_4 = NULL; + } + __Pyx_GIVEREF(__pyx_t_23); + PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_15, __pyx_t_23); + __Pyx_INCREF(__pyx_v_ranges); + __Pyx_GIVEREF(__pyx_v_ranges); + PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_15, __pyx_v_ranges); + __Pyx_INCREF(__pyx_v_canonical); + __Pyx_GIVEREF(__pyx_v_canonical); + PyTuple_SET_ITEM(__pyx_t_2, 2+__pyx_t_15, __pyx_v_canonical); + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_2, 3+__pyx_t_15, __pyx_v_chrom); + __pyx_t_23 = 0; + __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_24))) || (PyList_CheckExact(__pyx_t_24))) { + PyObject* sequence = __pyx_t_24; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 3)) { + if (size > 3) __Pyx_RaiseTooManyValuesError(3); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 2128, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_23 = PyTuple_GET_ITEM(sequence, 2); + } else { + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_23 = PyList_GET_ITEM(sequence, 2); + } + __Pyx_INCREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_23); #else - __pyx_t_24 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2162, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_24); - __pyx_t_23 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2162, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_23 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_23); #endif - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_4 = PyObject_GetIter(__pyx_t_24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_26 = Py_TYPE(__pyx_t_4)->tp_iternext; + index = 0; __pyx_t_3 = __pyx_t_26(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L128_unpacking_failed; + __Pyx_GOTREF(__pyx_t_3); + index = 1; __pyx_t_2 = __pyx_t_26(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L128_unpacking_failed; + __Pyx_GOTREF(__pyx_t_2); + index = 2; __pyx_t_23 = __pyx_t_26(__pyx_t_4); if (unlikely(!__pyx_t_23)) goto __pyx_L128_unpacking_failed; + __Pyx_GOTREF(__pyx_t_23); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_26(__pyx_t_4), 3) < 0) __PYX_ERR(0, 2128, __pyx_L1_error) + __pyx_t_26 = NULL; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + goto __pyx_L129_unpacking_done; + __pyx_L128_unpacking_failed:; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_26 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 2128, __pyx_L1_error) + __pyx_L129_unpacking_done:; + } + __pyx_t_15 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_15 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2128, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(PyList_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 2128, __pyx_L1_error) + if (!(likely(PyList_CheckExact(__pyx_t_23))||((__pyx_t_23) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_23)->tp_name), 0))) __PYX_ERR(0, 2128, __pyx_L1_error) + __pyx_v_strand = __pyx_t_15; + __Pyx_DECREF_SET(__pyx_v_ranges, ((PyObject*)__pyx_t_2)); + __pyx_t_2 = 0; + __Pyx_DECREF_SET(__pyx_v_canonical, ((PyObject*)__pyx_t_23)); + __pyx_t_23 = 0; + + /* "_rnaseq_utils.pyx":2127 + * + * # Check if any splice junctions can be corrected by shifting + * if self.sj_shift > 0: # <<<<<<<<<<<<<< + * strand, ranges, canonical = self.adjust_splice_sites(strand, ranges, canonical, chrom) + * + */ + } + } + __pyx_L103:; + + /* "_rnaseq_utils.pyx":2131 + * + * # Reconcile strand information given by start, end, and splice + * junction_exists = sum(canonical) > 0 # <<<<<<<<<<<<<< + * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists + * if strand != junction_strand: # Splice disagrees with end tags; remove tags + */ + __pyx_t_24 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_v_canonical); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __pyx_t_23 = PyObject_RichCompare(__pyx_t_24, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_23); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_23); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2131, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __pyx_v_junction_exists = __pyx_t_6; + + /* "_rnaseq_utils.pyx":2132 + * # Reconcile strand information given by start, end, and splice + * junction_exists = sum(canonical) > 0 + * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists # <<<<<<<<<<<<<< + * if strand != junction_strand: # Splice disagrees with end tags; remove tags + * strand = junction_strand + */ + __pyx_t_30 = ((__pyx_v_junction_strand != 0) != 0); + if (__pyx_t_30) { + } else { + __pyx_t_6 = __pyx_t_30; + goto __pyx_L131_bool_binop_done; + } + __pyx_t_30 = (__pyx_v_junction_exists != 0); + __pyx_t_6 = __pyx_t_30; + __pyx_L131_bool_binop_done:; + if (__pyx_t_6) { + + /* "_rnaseq_utils.pyx":2133 + * junction_exists = sum(canonical) > 0 + * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists + * if strand != junction_strand: # Splice disagrees with end tags; remove tags # <<<<<<<<<<<<<< + * strand = junction_strand + * s_tag = e_tag = capped = False + */ + __pyx_t_6 = ((__pyx_v_strand != __pyx_v_junction_strand) != 0); + if (__pyx_t_6) { + + /* "_rnaseq_utils.pyx":2134 + * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists + * if strand != junction_strand: # Splice disagrees with end tags; remove tags + * strand = junction_strand # <<<<<<<<<<<<<< + * s_tag = e_tag = capped = False + * + */ + __pyx_v_strand = __pyx_v_junction_strand; + + /* "_rnaseq_utils.pyx":2135 + * if strand != junction_strand: # Splice disagrees with end tags; remove tags + * strand = junction_strand + * s_tag = e_tag = capped = False # <<<<<<<<<<<<<< + * + * if not stranded_method and not s_tag and not e_tag and not junction_exists: + */ + __Pyx_INCREF(Py_False); + __Pyx_DECREF_SET(__pyx_v_s_tag, Py_False); + __Pyx_INCREF(Py_False); + __Pyx_DECREF_SET(__pyx_v_e_tag, Py_False); + __Pyx_INCREF(Py_False); + __Pyx_DECREF_SET(__pyx_v_capped, Py_False); + + /* "_rnaseq_utils.pyx":2133 + * junction_exists = sum(canonical) > 0 + * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists + * if strand != junction_strand: # Splice disagrees with end tags; remove tags # <<<<<<<<<<<<<< + * strand = junction_strand + * s_tag = e_tag = capped = False + */ + } + + /* "_rnaseq_utils.pyx":2132 + * # Reconcile strand information given by start, end, and splice + * junction_exists = sum(canonical) > 0 + * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists # <<<<<<<<<<<<<< + * if strand != junction_strand: # Splice disagrees with end tags; remove tags + * strand = junction_strand + */ + } + + /* "_rnaseq_utils.pyx":2137 + * s_tag = e_tag = capped = False + * + * if not stranded_method and not s_tag and not e_tag and not junction_exists: # <<<<<<<<<<<<<< + * strand = 0 # No strand information can be found + * + */ + __pyx_t_30 = ((!(__pyx_v_stranded_method != 0)) != 0); + if (__pyx_t_30) { + } else { + __pyx_t_6 = __pyx_t_30; + goto __pyx_L135_bool_binop_done; + } + __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_v_s_tag); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2137, __pyx_L1_error) + __pyx_t_12 = ((!__pyx_t_30) != 0); + if (__pyx_t_12) { + } else { + __pyx_t_6 = __pyx_t_12; + goto __pyx_L135_bool_binop_done; + } + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2137, __pyx_L1_error) + __pyx_t_30 = ((!__pyx_t_12) != 0); + if (__pyx_t_30) { + } else { + __pyx_t_6 = __pyx_t_30; + goto __pyx_L135_bool_binop_done; + } + __pyx_t_30 = ((!(__pyx_v_junction_exists != 0)) != 0); + __pyx_t_6 = __pyx_t_30; + __pyx_L135_bool_binop_done:; + if (__pyx_t_6) { + + /* "_rnaseq_utils.pyx":2138 + * + * if not stranded_method and not s_tag and not e_tag and not junction_exists: + * strand = 0 # No strand information can be found # <<<<<<<<<<<<<< + * + * if not self.remove_noncanonical: + */ + __pyx_v_strand = 0; + + /* "_rnaseq_utils.pyx":2137 + * s_tag = e_tag = capped = False + * + * if not stranded_method and not s_tag and not e_tag and not junction_exists: # <<<<<<<<<<<<<< + * strand = 0 # No strand information can be found + * + */ + } + + /* "_rnaseq_utils.pyx":2140 + * strand = 0 # No strand information can be found + * + * if not self.remove_noncanonical: # <<<<<<<<<<<<<< + * canonical = [True]*len(canonical) + * + */ + __pyx_t_6 = ((!(__pyx_v_self->remove_noncanonical != 0)) != 0); + if (__pyx_t_6) { + + /* "_rnaseq_utils.pyx":2141 + * + * if not self.remove_noncanonical: + * canonical = [True]*len(canonical) # <<<<<<<<<<<<<< + * + * # Generate a ReadObject with the parsed attributes above + */ + if (unlikely(__pyx_v_canonical == Py_None)) { + PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); + __PYX_ERR(0, 2141, __pyx_L1_error) + } + __pyx_t_28 = PyList_GET_SIZE(__pyx_v_canonical); if (unlikely(__pyx_t_28 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2141, __pyx_L1_error) + __pyx_t_23 = PyList_New(1 * ((__pyx_t_28<0) ? 0:__pyx_t_28)); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2141, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < __pyx_t_28; __pyx_temp++) { + __Pyx_INCREF(Py_True); + __Pyx_GIVEREF(Py_True); + PyList_SET_ITEM(__pyx_t_23, __pyx_temp, Py_True); + } + } + __Pyx_DECREF_SET(__pyx_v_canonical, ((PyObject*)__pyx_t_23)); + __pyx_t_23 = 0; + + /* "_rnaseq_utils.pyx":2140 + * strand = 0 # No strand information can be found + * + * if not self.remove_noncanonical: # <<<<<<<<<<<<<< + * canonical = [True]*len(canonical) + * + */ + } + + /* "_rnaseq_utils.pyx":2144 + * + * # Generate a ReadObject with the parsed attributes above + * read_data = ELdata(chrom_id, 0, strand, ranges, canonical, s_tag, e_tag, capped, round(weight,2), False) # <<<<<<<<<<<<<< + * current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) + * current_mapping.e_len = e_tag_len + */ + __Pyx_GetModuleGlobalName(__pyx_t_24, __pyx_n_s_ELdata); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_chrom_id); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); + __Pyx_INCREF(__pyx_int_2); + __Pyx_GIVEREF(__pyx_int_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_2); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = NULL; + __pyx_t_15 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_24))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_24); + if (likely(__pyx_t_1)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_24); + __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_24, function); + __pyx_t_15 = 1; + } + } + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_24)) { + PyObject *__pyx_temp[11] = {__pyx_t_1, __pyx_t_2, __pyx_int_0, __pyx_t_3, __pyx_v_ranges, __pyx_v_canonical, __pyx_v_s_tag, __pyx_v_e_tag, __pyx_v_capped, __pyx_t_4, Py_False}; + __pyx_t_23 = __Pyx_PyFunction_FastCall(__pyx_t_24, __pyx_temp+1-__pyx_t_15, 10+__pyx_t_15); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_24)) { + PyObject *__pyx_temp[11] = {__pyx_t_1, __pyx_t_2, __pyx_int_0, __pyx_t_3, __pyx_v_ranges, __pyx_v_canonical, __pyx_v_s_tag, __pyx_v_e_tag, __pyx_v_capped, __pyx_t_4, Py_False}; + __pyx_t_23 = __Pyx_PyCFunction_FastCall(__pyx_t_24, __pyx_temp+1-__pyx_t_15, 10+__pyx_t_15); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + } else + #endif + { + __pyx_t_32 = PyTuple_New(10+__pyx_t_15); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_32); + if (__pyx_t_1) { + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_32, 0, __pyx_t_1); __pyx_t_1 = NULL; + } + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_32, 0+__pyx_t_15, __pyx_t_2); + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyTuple_SET_ITEM(__pyx_t_32, 1+__pyx_t_15, __pyx_int_0); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_32, 2+__pyx_t_15, __pyx_t_3); + __Pyx_INCREF(__pyx_v_ranges); + __Pyx_GIVEREF(__pyx_v_ranges); + PyTuple_SET_ITEM(__pyx_t_32, 3+__pyx_t_15, __pyx_v_ranges); + __Pyx_INCREF(__pyx_v_canonical); + __Pyx_GIVEREF(__pyx_v_canonical); + PyTuple_SET_ITEM(__pyx_t_32, 4+__pyx_t_15, __pyx_v_canonical); + __Pyx_INCREF(__pyx_v_s_tag); + __Pyx_GIVEREF(__pyx_v_s_tag); + PyTuple_SET_ITEM(__pyx_t_32, 5+__pyx_t_15, __pyx_v_s_tag); + __Pyx_INCREF(__pyx_v_e_tag); + __Pyx_GIVEREF(__pyx_v_e_tag); + PyTuple_SET_ITEM(__pyx_t_32, 6+__pyx_t_15, __pyx_v_e_tag); + __Pyx_INCREF(__pyx_v_capped); + __Pyx_GIVEREF(__pyx_v_capped); + PyTuple_SET_ITEM(__pyx_t_32, 7+__pyx_t_15, __pyx_v_capped); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_32, 8+__pyx_t_15, __pyx_t_4); + __Pyx_INCREF(Py_False); + __Pyx_GIVEREF(Py_False); + PyTuple_SET_ITEM(__pyx_t_32, 9+__pyx_t_15, Py_False); + __pyx_t_2 = 0; + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_23 = __Pyx_PyObject_Call(__pyx_t_24, __pyx_t_32, NULL); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2144, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; + } + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __Pyx_XDECREF_SET(__pyx_v_read_data, __pyx_t_23); + __pyx_t_23 = 0; + + /* "_rnaseq_utils.pyx":2145 + * # Generate a ReadObject with the parsed attributes above + * read_data = ELdata(chrom_id, 0, strand, ranges, canonical, s_tag, e_tag, capped, round(weight,2), False) + * current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) # <<<<<<<<<<<<<< + * current_mapping.e_len = e_tag_len + * current_mapping.s_len = s_tag_len + */ + __pyx_t_23 = PyTuple_New(1); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_23); + __Pyx_INCREF(__pyx_v_read_data); + __Pyx_GIVEREF(__pyx_v_read_data); + PyTuple_SET_ITEM(__pyx_t_23, 0, __pyx_v_read_data); + __pyx_t_24 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __pyx_t_32 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 2145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_32); + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_errors); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + if (PyDict_SetItem(__pyx_t_32, __pyx_n_u_errors, __pyx_t_4) < 0) __PYX_ERR(0, 2145, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (PyDict_SetItem(__pyx_t_24, __pyx_n_s_attributes, __pyx_t_32) < 0) __PYX_ERR(0, 2145, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; + __pyx_t_32 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_t_23, __pyx_t_24); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 2145, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_32); + __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; + __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; + __Pyx_XDECREF_SET(__pyx_v_current_mapping, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_32)); + __pyx_t_32 = 0; + + /* "_rnaseq_utils.pyx":2146 + * read_data = ELdata(chrom_id, 0, strand, ranges, canonical, s_tag, e_tag, capped, round(weight,2), False) + * current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) + * current_mapping.e_len = e_tag_len # <<<<<<<<<<<<<< + * current_mapping.s_len = s_tag_len + * if map_number not in mappings: + */ + __pyx_v_current_mapping->e_len = __pyx_v_e_tag_len; + + /* "_rnaseq_utils.pyx":2147 + * current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) + * current_mapping.e_len = e_tag_len + * current_mapping.s_len = s_tag_len # <<<<<<<<<<<<<< + * if map_number not in mappings: + * mappings[map_number] = current_mapping + */ + __pyx_v_current_mapping->s_len = __pyx_v_s_tag_len; + + /* "_rnaseq_utils.pyx":2148 + * current_mapping.e_len = e_tag_len + * current_mapping.s_len = s_tag_len + * if map_number not in mappings: # <<<<<<<<<<<<<< + * mappings[map_number] = current_mapping + * else: # merge two mate-pair ReadObjects together + */ + __pyx_t_32 = __Pyx_PyInt_From_int(__pyx_v_map_number); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 2148, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_32); + __pyx_t_6 = (__Pyx_PyDict_ContainsTF(__pyx_t_32, __pyx_v_mappings, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2148, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; + __pyx_t_30 = (__pyx_t_6 != 0); + if (__pyx_t_30) { + + /* "_rnaseq_utils.pyx":2149 + * current_mapping.s_len = s_tag_len + * if map_number not in mappings: + * mappings[map_number] = current_mapping # <<<<<<<<<<<<<< + * else: # merge two mate-pair ReadObjects together + * mate_read = mappings[map_number] + */ + __pyx_t_32 = __Pyx_PyInt_From_int(__pyx_v_map_number); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 2149, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_32); + if (unlikely(PyDict_SetItem(__pyx_v_mappings, __pyx_t_32, ((PyObject *)__pyx_v_current_mapping)) < 0)) __PYX_ERR(0, 2149, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; + + /* "_rnaseq_utils.pyx":2148 + * current_mapping.e_len = e_tag_len + * current_mapping.s_len = s_tag_len + * if map_number not in mappings: # <<<<<<<<<<<<<< + * mappings[map_number] = current_mapping + * else: # merge two mate-pair ReadObjects together + */ + goto __pyx_L140; + } + + /* "_rnaseq_utils.pyx":2151 + * mappings[map_number] = current_mapping + * else: # merge two mate-pair ReadObjects together + * mate_read = mappings[map_number] # <<<<<<<<<<<<<< + * # if e_tag_added: # Mate alignment cannot extend beyond a trimmed 3' poly(A) + * # self.update_trimmed_ranges(current_mapping, mate_read, strand) + */ + /*else*/ { + __pyx_t_32 = __Pyx_PyInt_From_int(__pyx_v_map_number); if (unlikely(!__pyx_t_32)) __PYX_ERR(0, 2151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_32); + __pyx_t_24 = __Pyx_PyDict_GetItem(__pyx_v_mappings, __pyx_t_32); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2151, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __Pyx_DECREF(__pyx_t_32); __pyx_t_32 = 0; + if (!(likely(((__pyx_t_24) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_24, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2151, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_mate_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_24)); + __pyx_t_24 = 0; + + /* "_rnaseq_utils.pyx":2155 + * # self.update_trimmed_ranges(current_mapping, mate_read, strand) + * + * mate_read.merge(current_mapping) # <<<<<<<<<<<<<< + * + * mapping_list = self.resolve_overlapping_mappings(mappings) + */ + (void)(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_mate_read->__pyx_vtab)->merge(__pyx_v_mate_read, __pyx_v_current_mapping, 0)); + } + __pyx_L140:; + __pyx_L10_continue:; + } + + /* "_rnaseq_utils.pyx":2157 + * mate_read.merge(current_mapping) + * + * mapping_list = self.resolve_overlapping_mappings(mappings) # <<<<<<<<<<<<<< + * return mapping_list + * + */ + __pyx_t_24 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->resolve_overlapping_mappings(__pyx_v_self, __pyx_v_mappings); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2157, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_24); + __pyx_v_mapping_list = ((PyObject*)__pyx_t_24); + __pyx_t_24 = 0; + + /* "_rnaseq_utils.pyx":2158 + * + * mapping_list = self.resolve_overlapping_mappings(mappings) + * return mapping_list # <<<<<<<<<<<<<< + * + * def evaluate_splice_sites(self, chrom, strand, introns): + */ + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_v_mapping_list); + __pyx_r = __pyx_v_mapping_list; + goto __pyx_L0; + + /* "_rnaseq_utils.pyx":1947 + * self.sj_shift = self.dataset.sj_shift + * + * cpdef list generate_read(self): # <<<<<<<<<<<<<< + * cdef: + * int s_len, s_tag_len, e_len, e_tag_len, Nmap, counter, input_len, map_number, mate, strand, number_of_blocks + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_23); + __Pyx_XDECREF(__pyx_t_24); + __Pyx_XDECREF(__pyx_t_32); + __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = 0; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_ID); + __Pyx_XDECREF(__pyx_v_chrom); + __Pyx_XDECREF(__pyx_v_seq); + __Pyx_XDECREF(__pyx_v_aligned_seq); + __Pyx_XDECREF(__pyx_v_mappings); + __Pyx_XDECREF(__pyx_v_canonical); + __Pyx_XDECREF(__pyx_v_ranges); + __Pyx_XDECREF(__pyx_v_mapping_list); + __Pyx_XDECREF(__pyx_v_introns); + __Pyx_XDECREF(__pyx_v_jstrands); + __Pyx_XDECREF((PyObject *)__pyx_v_current_mapping); + __Pyx_XDECREF((PyObject *)__pyx_v_mate_read); + __Pyx_XDECREF(__pyx_v_capped); + __Pyx_XDECREF(__pyx_v_s_tag); + __Pyx_XDECREF(__pyx_v_e_tag); + __Pyx_XDECREF(__pyx_v_line); + __Pyx_XDECREF(__pyx_v_mdstring); + __Pyx_XDECREF(__pyx_v_head); + __Pyx_XDECREF(__pyx_v_tail); + __Pyx_XDECREF(__pyx_v_consensus_strand); + __Pyx_XDECREF(__pyx_v_read_data); + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_left); + __Pyx_XDECREF(__pyx_9genexpr43__pyx_v_right); + __Pyx_XDECREF(__pyx_9genexpr44__pyx_v_js); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_3generate_read(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_3generate_read(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("generate_read (wrapper)", 0); + __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject_2generate_read(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_2generate_read(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("generate_read", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __pyx_f_13_rnaseq_utils_9BAMobject_generate_read(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1947, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_rnaseq_utils.pyx":2160 + * return mapping_list + * + * def evaluate_splice_sites(self, chrom, strand, introns): # <<<<<<<<<<<<<< + * """Returns a list of bools (1 per gap) that summarizes whether + * each splice junction is supported by the available SJDB.""" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_5evaluate_splice_sites(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_13_rnaseq_utils_9BAMobject_4evaluate_splice_sites[] = "Returns a list of bools (1 per gap) that summarizes whether\n each splice junction is supported by the available SJDB."; +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_5evaluate_splice_sites(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_chrom = 0; + PyObject *__pyx_v_strand = 0; + PyObject *__pyx_v_introns = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("evaluate_splice_sites (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_chrom,&__pyx_n_s_strand,&__pyx_n_s_introns,0}; + PyObject* values[3] = {0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chrom)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strand)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("evaluate_splice_sites", 1, 3, 3, 1); __PYX_ERR(0, 2160, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_introns)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("evaluate_splice_sites", 1, 3, 3, 2); __PYX_ERR(0, 2160, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluate_splice_sites") < 0)) __PYX_ERR(0, 2160, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 3) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + } + __pyx_v_chrom = values[0]; + __pyx_v_strand = values[1]; + __pyx_v_introns = values[2]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("evaluate_splice_sites", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2160, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("_rnaseq_utils.BAMobject.evaluate_splice_sites", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject_4evaluate_splice_sites(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self), __pyx_v_chrom, __pyx_v_strand, __pyx_v_introns); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_4evaluate_splice_sites(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_chrom, PyObject *__pyx_v_strand, PyObject *__pyx_v_introns) { + PyObject *__pyx_v_jstrands = 0; + PyObject *__pyx_v_canonical = 0; + int __pyx_v_l; + int __pyx_v_r; + int __pyx_v_js; + CYTHON_UNUSED int __pyx_v_junction_strand; + int __pyx_v_consensus_strand; + int __pyx_v_seen_plus; + int __pyx_v_seen_minus; + Py_ssize_t __pyx_v_inum; + int __pyx_9genexpr45__pyx_v_js; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_2 = NULL; + int __pyx_t_3; + Py_ssize_t __pyx_t_4; + Py_ssize_t __pyx_t_5; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + PyObject *__pyx_t_8 = NULL; + PyObject *(*__pyx_t_9)(PyObject *); + int __pyx_t_10; + int __pyx_t_11; + int __pyx_t_12; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("evaluate_splice_sites", 0); + + /* "_rnaseq_utils.pyx":2166 + * cdef int l, r, js, junction_strand, consensus_strand + * cdef bint seen_plus, seen_minus + * jstrands = [0]*len(introns) # <<<<<<<<<<<<<< + * junction_strand = 0 + * if strand == 0: # No info provided by BAM attributes + */ + __pyx_t_1 = PyObject_Length(__pyx_v_introns); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2166, __pyx_L1_error) + __pyx_t_2 = PyList_New(1 * ((__pyx_t_1<0) ? 0:__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2166, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + { Py_ssize_t __pyx_temp; + for (__pyx_temp=0; __pyx_temp < __pyx_t_1; __pyx_temp++) { + __Pyx_INCREF(__pyx_int_0); + __Pyx_GIVEREF(__pyx_int_0); + PyList_SET_ITEM(__pyx_t_2, __pyx_temp, __pyx_int_0); + } + } + __pyx_v_jstrands = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "_rnaseq_utils.pyx":2167 + * cdef bint seen_plus, seen_minus + * jstrands = [0]*len(introns) + * junction_strand = 0 # <<<<<<<<<<<<<< + * if strand == 0: # No info provided by BAM attributes + * seen_plus = False + */ + __pyx_v_junction_strand = 0; + + /* "_rnaseq_utils.pyx":2168 + * jstrands = [0]*len(introns) + * junction_strand = 0 + * if strand == 0: # No info provided by BAM attributes # <<<<<<<<<<<<<< + * seen_plus = False + * seen_minus = False + */ + __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_strand, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2168, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (__pyx_t_3) { + + /* "_rnaseq_utils.pyx":2169 + * junction_strand = 0 + * if strand == 0: # No info provided by BAM attributes + * seen_plus = False # <<<<<<<<<<<<<< + * seen_minus = False + * for inum in range(len(introns)): + */ + __pyx_v_seen_plus = 0; + + /* "_rnaseq_utils.pyx":2170 + * if strand == 0: # No info provided by BAM attributes + * seen_plus = False + * seen_minus = False # <<<<<<<<<<<<<< + * for inum in range(len(introns)): + * l,r = introns[inum] + */ + __pyx_v_seen_minus = 0; + + /* "_rnaseq_utils.pyx":2171 + * seen_plus = False + * seen_minus = False + * for inum in range(len(introns)): # <<<<<<<<<<<<<< + * l,r = introns[inum] + * js = self.check_sjdb(chrom, l, r) + */ + __pyx_t_1 = PyObject_Length(__pyx_v_introns); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2171, __pyx_L1_error) + __pyx_t_4 = __pyx_t_1; + for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { + __pyx_v_inum = __pyx_t_5; + + /* "_rnaseq_utils.pyx":2172 + * seen_minus = False + * for inum in range(len(introns)): + * l,r = introns[inum] # <<<<<<<<<<<<<< + * js = self.check_sjdb(chrom, l, r) + * seen_plus = seen_plus or js == 1 + */ + __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_introns, __pyx_v_inum, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) { + PyObject* sequence = __pyx_t_2; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 2)) { + if (size > 2) __Pyx_RaiseTooManyValuesError(2); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 2172, __pyx_L1_error) + } + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + if (likely(PyTuple_CheckExact(sequence))) { + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + } else { + __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + } + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); + #else + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } else { + Py_ssize_t index = -1; + __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2172, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; + index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_6); + index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_7); + if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) __PYX_ERR(0, 2172, __pyx_L1_error) + __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + goto __pyx_L7_unpacking_done; + __pyx_L6_unpacking_failed:; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_9 = NULL; + if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); + __PYX_ERR(0, 2172, __pyx_L1_error) + __pyx_L7_unpacking_done:; + } + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2172, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2172, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_l = __pyx_t_10; + __pyx_v_r = __pyx_t_11; + + /* "_rnaseq_utils.pyx":2173 + * for inum in range(len(introns)): + * l,r = introns[inum] + * js = self.check_sjdb(chrom, l, r) # <<<<<<<<<<<<<< + * seen_plus = seen_plus or js == 1 + * seen_minus = seen_minus or js == -1 + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_chrom))||((__pyx_v_chrom) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_chrom)->tp_name), 0))) __PYX_ERR(0, 2173, __pyx_L1_error) + __pyx_v_js = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->check_sjdb(__pyx_v_self, ((PyObject*)__pyx_v_chrom), __pyx_v_l, __pyx_v_r); + + /* "_rnaseq_utils.pyx":2174 + * l,r = introns[inum] + * js = self.check_sjdb(chrom, l, r) + * seen_plus = seen_plus or js == 1 # <<<<<<<<<<<<<< + * seen_minus = seen_minus or js == -1 + * jstrands[inum] = js + */ + __pyx_t_12 = (__pyx_v_seen_plus != 0); + if (!__pyx_t_12) { + } else { + __pyx_t_3 = __pyx_t_12; + goto __pyx_L8_bool_binop_done; + } + __pyx_t_12 = ((__pyx_v_js == 1) != 0); + __pyx_t_3 = __pyx_t_12; + __pyx_L8_bool_binop_done:; + __pyx_v_seen_plus = __pyx_t_3; + + /* "_rnaseq_utils.pyx":2175 + * js = self.check_sjdb(chrom, l, r) + * seen_plus = seen_plus or js == 1 + * seen_minus = seen_minus or js == -1 # <<<<<<<<<<<<<< + * jstrands[inum] = js + * + */ + __pyx_t_12 = (__pyx_v_seen_minus != 0); + if (!__pyx_t_12) { + } else { + __pyx_t_3 = __pyx_t_12; + goto __pyx_L10_bool_binop_done; + } + __pyx_t_12 = ((__pyx_v_js == -1L) != 0); + __pyx_t_3 = __pyx_t_12; + __pyx_L10_bool_binop_done:; + __pyx_v_seen_minus = __pyx_t_3; + + /* "_rnaseq_utils.pyx":2176 + * seen_plus = seen_plus or js == 1 + * seen_minus = seen_minus or js == -1 + * jstrands[inum] = js # <<<<<<<<<<<<<< + * + * junction_strand = int(seen_plus) - int(seen_minus) + */ + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_js); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + if (unlikely(__Pyx_SetItemInt(__pyx_v_jstrands, __pyx_v_inum, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 2176, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } + + /* "_rnaseq_utils.pyx":2178 + * jstrands[inum] = js + * + * junction_strand = int(seen_plus) - int(seen_minus) # <<<<<<<<<<<<<< + * + * consensus_strand = (strand + sum(jstrands)) + */ + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_seen_plus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_seen_minus); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Subtract(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2178, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2178, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_junction_strand = __pyx_t_11; + + /* "_rnaseq_utils.pyx":2168 + * jstrands = [0]*len(introns) + * junction_strand = 0 + * if strand == 0: # No info provided by BAM attributes # <<<<<<<<<<<<<< + * seen_plus = False + * seen_minus = False + */ + } + + /* "_rnaseq_utils.pyx":2180 + * junction_strand = int(seen_plus) - int(seen_minus) + * + * consensus_strand = (strand + sum(jstrands)) # <<<<<<<<<<<<<< + * if consensus_strand > 0: + * consensus_strand = 1 + */ + __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_v_jstrands); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_6 = PyNumber_Add(__pyx_v_strand, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2180, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_consensus_strand = __pyx_t_11; + + /* "_rnaseq_utils.pyx":2181 + * + * consensus_strand = (strand + sum(jstrands)) + * if consensus_strand > 0: # <<<<<<<<<<<<<< + * consensus_strand = 1 + * elif consensus_strand < 0: + */ + __pyx_t_3 = ((__pyx_v_consensus_strand > 0) != 0); + if (__pyx_t_3) { + + /* "_rnaseq_utils.pyx":2182 + * consensus_strand = (strand + sum(jstrands)) + * if consensus_strand > 0: + * consensus_strand = 1 # <<<<<<<<<<<<<< + * elif consensus_strand < 0: + * consensus_strand = -1 + */ + __pyx_v_consensus_strand = 1; + + /* "_rnaseq_utils.pyx":2181 + * + * consensus_strand = (strand + sum(jstrands)) + * if consensus_strand > 0: # <<<<<<<<<<<<<< + * consensus_strand = 1 + * elif consensus_strand < 0: + */ + goto __pyx_L12; + } + + /* "_rnaseq_utils.pyx":2183 + * if consensus_strand > 0: + * consensus_strand = 1 + * elif consensus_strand < 0: # <<<<<<<<<<<<<< + * consensus_strand = -1 + * + */ + __pyx_t_3 = ((__pyx_v_consensus_strand < 0) != 0); + if (__pyx_t_3) { + + /* "_rnaseq_utils.pyx":2184 + * consensus_strand = 1 + * elif consensus_strand < 0: + * consensus_strand = -1 # <<<<<<<<<<<<<< + * + * canonical = [True if (js == consensus_strand and consensus_strand !=0) else False for js in jstrands] + */ + __pyx_v_consensus_strand = -1; + + /* "_rnaseq_utils.pyx":2183 + * if consensus_strand > 0: + * consensus_strand = 1 + * elif consensus_strand < 0: # <<<<<<<<<<<<<< + * consensus_strand = -1 + * + */ + } + __pyx_L12:; + + /* "_rnaseq_utils.pyx":2186 + * consensus_strand = -1 + * + * canonical = [True if (js == consensus_strand and consensus_strand !=0) else False for js in jstrands] # <<<<<<<<<<<<<< + * return consensus_strand, canonical + * + */ + { /* enter inner scope */ + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __pyx_v_jstrands; __Pyx_INCREF(__pyx_t_2); __pyx_t_1 = 0; + for (;;) { + if (__pyx_t_1 >= PyList_GET_SIZE(__pyx_t_2)) break; + #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_1); __Pyx_INCREF(__pyx_t_7); __pyx_t_1++; if (unlikely(0 < 0)) __PYX_ERR(0, 2186, __pyx_L1_error) + #else + __pyx_t_7 = PySequence_ITEM(__pyx_t_2, __pyx_t_1); __pyx_t_1++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2186, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + #endif + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2186, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_9genexpr45__pyx_v_js = __pyx_t_11; + __pyx_t_12 = ((__pyx_9genexpr45__pyx_v_js == __pyx_v_consensus_strand) != 0); + if (__pyx_t_12) { + } else { + __pyx_t_3 = __pyx_t_12; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_12 = ((__pyx_v_consensus_strand != 0) != 0); + __pyx_t_3 = __pyx_t_12; + __pyx_L15_bool_binop_done:; + if (__pyx_t_3) { + __Pyx_INCREF(Py_True); + __pyx_t_7 = Py_True; + } else { + __Pyx_INCREF(Py_False); + __pyx_t_7 = Py_False; + } + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 2186, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + } /* exit inner scope */ + __pyx_v_canonical = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; + + /* "_rnaseq_utils.pyx":2187 + * + * canonical = [True if (js == consensus_strand and consensus_strand !=0) else False for js in jstrands] + * return consensus_strand, canonical # <<<<<<<<<<<<<< + * + * def adjust_splice_sites(self, strand, ranges, canonical, chrom): + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_consensus_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2187, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); + __Pyx_INCREF(__pyx_v_canonical); + __Pyx_GIVEREF(__pyx_v_canonical); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_canonical); + __pyx_t_6 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* "_rnaseq_utils.pyx":2160 + * return mapping_list + * + * def evaluate_splice_sites(self, chrom, strand, introns): # <<<<<<<<<<<<<< + * """Returns a list of bools (1 per gap) that summarizes whether + * each splice junction is supported by the available SJDB.""" + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); + __Pyx_AddTraceback("_rnaseq_utils.BAMobject.evaluate_splice_sites", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_jstrands); + __Pyx_XDECREF(__pyx_v_canonical); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_rnaseq_utils.pyx":2189 + * return consensus_strand, canonical + * + * def adjust_splice_sites(self, strand, ranges, canonical, chrom): # <<<<<<<<<<<<<< + * """Use genome motif information to version of the exon list where borders + * have been shifted to correct poorly-formed splice junctions.""" + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_7adjust_splice_sites(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static char __pyx_doc_13_rnaseq_utils_9BAMobject_6adjust_splice_sites[] = "Use genome motif information to version of the exon list where borders\n have been shifted to correct poorly-formed splice junctions."; +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_7adjust_splice_sites(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_strand = 0; + PyObject *__pyx_v_ranges = 0; + PyObject *__pyx_v_canonical = 0; + PyObject *__pyx_v_chrom = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("adjust_splice_sites (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_strand,&__pyx_n_s_ranges,&__pyx_n_s_canonical,&__pyx_n_s_chrom,0}; + PyObject* values[4] = {0,0,0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + CYTHON_FALLTHROUGH; + case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + CYTHON_FALLTHROUGH; + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + CYTHON_FALLTHROUGH; + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strand)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + CYTHON_FALLTHROUGH; + case 1: + if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_ranges)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("adjust_splice_sites", 1, 4, 4, 1); __PYX_ERR(0, 2189, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 2: + if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_canonical)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("adjust_splice_sites", 1, 4, 4, 2); __PYX_ERR(0, 2189, __pyx_L3_error) + } + CYTHON_FALLTHROUGH; + case 3: + if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chrom)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("adjust_splice_sites", 1, 4, 4, 3); __PYX_ERR(0, 2189, __pyx_L3_error) + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "adjust_splice_sites") < 0)) __PYX_ERR(0, 2189, __pyx_L3_error) + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 4) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + values[2] = PyTuple_GET_ITEM(__pyx_args, 2); + values[3] = PyTuple_GET_ITEM(__pyx_args, 3); + } + __pyx_v_strand = values[0]; + __pyx_v_ranges = values[1]; + __pyx_v_canonical = values[2]; + __pyx_v_chrom = values[3]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("adjust_splice_sites", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2189, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("_rnaseq_utils.BAMobject.adjust_splice_sites", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject_6adjust_splice_sites(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self), __pyx_v_strand, __pyx_v_ranges, __pyx_v_canonical, __pyx_v_chrom); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_6adjust_splice_sites(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_strand, PyObject *__pyx_v_ranges, PyObject *__pyx_v_canonical, PyObject *__pyx_v_chrom) { + int __pyx_v_js; + int __pyx_v_i; + int __pyx_v_left; + int __pyx_v_right; + int __pyx_v_shiftleft; + int __pyx_v_shiftright; + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + int __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + Py_ssize_t __pyx_t_5; + Py_ssize_t __pyx_t_6; + int __pyx_t_7; + long __pyx_t_8; + PyObject *__pyx_t_9 = NULL; + int __pyx_t_10; + __pyx_ctuple_int__and_int__and_int __pyx_t_11; + int __pyx_t_12; + int __pyx_t_13; + PyObject *__pyx_t_14 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("adjust_splice_sites", 0); + __Pyx_INCREF(__pyx_v_strand); + + /* "_rnaseq_utils.pyx":2194 + * cdef int js, i, left, right, shiftleft, shiftright + * # Shift to nearest SJDB first (allow indels) + * if all(canonical): # <<<<<<<<<<<<<< + * return strand, ranges, canonical + * + */ + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_v_canonical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2194, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2194, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (__pyx_t_2) { + + /* "_rnaseq_utils.pyx":2195 + * # Shift to nearest SJDB first (allow indels) + * if all(canonical): + * return strand, ranges, canonical # <<<<<<<<<<<<<< + * + * if self.dataset.has_genome or self.dataset.sj_set is not None: + */ + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2195, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_INCREF(__pyx_v_strand); + __Pyx_GIVEREF(__pyx_v_strand); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_strand); + __Pyx_INCREF(__pyx_v_ranges); + __Pyx_GIVEREF(__pyx_v_ranges); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_ranges); + __Pyx_INCREF(__pyx_v_canonical); + __Pyx_GIVEREF(__pyx_v_canonical); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_canonical); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* "_rnaseq_utils.pyx":2194 + * cdef int js, i, left, right, shiftleft, shiftright + * # Shift to nearest SJDB first (allow indels) + * if all(canonical): # <<<<<<<<<<<<<< + * return strand, ranges, canonical + * + */ + } + + /* "_rnaseq_utils.pyx":2197 + * return strand, ranges, canonical + * + * if self.dataset.has_genome or self.dataset.sj_set is not None: # <<<<<<<<<<<<<< + * for i in range(1, len(ranges)): # Iterate over introns + * if not canonical[i-1]: # Skip any that are canonical + */ + __pyx_t_3 = (__pyx_v_self->dataset->has_genome != 0); + if (!__pyx_t_3) { + } else { + __pyx_t_2 = __pyx_t_3; + goto __pyx_L5_bool_binop_done; + } + __pyx_t_3 = (__pyx_v_self->dataset->sj_set != ((PyObject*)Py_None)); + __pyx_t_4 = (__pyx_t_3 != 0); + __pyx_t_2 = __pyx_t_4; + __pyx_L5_bool_binop_done:; + if (__pyx_t_2) { + + /* "_rnaseq_utils.pyx":2198 + * + * if self.dataset.has_genome or self.dataset.sj_set is not None: + * for i in range(1, len(ranges)): # Iterate over introns # <<<<<<<<<<<<<< + * if not canonical[i-1]: # Skip any that are canonical + * left = ranges[i-1][1] + */ + __pyx_t_5 = PyObject_Length(__pyx_v_ranges); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2198, __pyx_L1_error) + __pyx_t_6 = __pyx_t_5; + for (__pyx_t_7 = 1; __pyx_t_7 < __pyx_t_6; __pyx_t_7+=1) { + __pyx_v_i = __pyx_t_7; + + /* "_rnaseq_utils.pyx":2199 + * if self.dataset.has_genome or self.dataset.sj_set is not None: + * for i in range(1, len(ranges)): # Iterate over introns + * if not canonical[i-1]: # Skip any that are canonical # <<<<<<<<<<<<<< + * left = ranges[i-1][1] + * right = ranges[i][0] + */ + __pyx_t_8 = (__pyx_v_i - 1); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_canonical, __pyx_t_8, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2199, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2199, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_4 = ((!__pyx_t_2) != 0); + if (__pyx_t_4) { + + /* "_rnaseq_utils.pyx":2200 + * for i in range(1, len(ranges)): # Iterate over introns + * if not canonical[i-1]: # Skip any that are canonical + * left = ranges[i-1][1] # <<<<<<<<<<<<<< + * right = ranges[i][0] + * shiftleft, shiftright, js = self.shift_junction(chrom, left, right, strand) + */ + __pyx_t_8 = (__pyx_v_i - 1); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_ranges, __pyx_t_8, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_9); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2200, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_v_left = __pyx_t_10; + + /* "_rnaseq_utils.pyx":2201 + * if not canonical[i-1]: # Skip any that are canonical + * left = ranges[i-1][1] + * right = ranges[i][0] # <<<<<<<<<<<<<< + * shiftleft, shiftright, js = self.shift_junction(chrom, left, right, strand) + * if strand == 0 or js == strand: + */ + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_ranges, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2201, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2201, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_right = __pyx_t_10; + + /* "_rnaseq_utils.pyx":2202 + * left = ranges[i-1][1] + * right = ranges[i][0] + * shiftleft, shiftright, js = self.shift_junction(chrom, left, right, strand) # <<<<<<<<<<<<<< + * if strand == 0 or js == strand: + * strand = js + */ + if (!(likely(PyUnicode_CheckExact(__pyx_v_chrom))||((__pyx_v_chrom) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_chrom)->tp_name), 0))) __PYX_ERR(0, 2202, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_v_strand); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2202, __pyx_L1_error) + __pyx_t_11 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->shift_junction(__pyx_v_self, ((PyObject*)__pyx_v_chrom), __pyx_v_left, __pyx_v_right, __pyx_t_10); + __pyx_t_10 = __pyx_t_11.f0; + __pyx_t_12 = __pyx_t_11.f1; + __pyx_t_13 = __pyx_t_11.f2; + __pyx_v_shiftleft = __pyx_t_10; + __pyx_v_shiftright = __pyx_t_12; + __pyx_v_js = __pyx_t_13; + + /* "_rnaseq_utils.pyx":2203 + * right = ranges[i][0] + * shiftleft, shiftright, js = self.shift_junction(chrom, left, right, strand) + * if strand == 0 or js == strand: # <<<<<<<<<<<<<< + * strand = js + * ranges[i-1] = (ranges[i-1][0], shiftleft) + */ + __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v_strand, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2203, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (!__pyx_t_2) { } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2162, __pyx_L1_error) + __pyx_t_4 = __pyx_t_2; + goto __pyx_L11_bool_binop_done; } - if (!(likely(PyList_CheckExact(__pyx_t_24))||((__pyx_t_24) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_24)->tp_name), 0))) __PYX_ERR(0, 2162, __pyx_L1_error) - if (!(likely(PyList_CheckExact(__pyx_t_23))||((__pyx_t_23) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_23)->tp_name), 0))) __PYX_ERR(0, 2162, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_newranges, ((PyObject*)__pyx_t_24)); - __pyx_t_24 = 0; - __Pyx_DECREF_SET(__pyx_v_splice, ((PyObject*)__pyx_t_23)); - __pyx_t_23 = 0; + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_js); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_9 = PyObject_RichCompare(__pyx_t_1, __pyx_v_strand, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2203, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2203, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_4 = __pyx_t_2; + __pyx_L11_bool_binop_done:; + if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2163 - * if strand != 0: # Try to make junctions on the labeled strand work - * newranges, splice = self.get_splice_info(ranges, intronset, chrom, strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks - * if all(splice): # The labeled strand works # <<<<<<<<<<<<<< - * junction_strand = strand - * ranges = newranges + /* "_rnaseq_utils.pyx":2204 + * shiftleft, shiftright, js = self.shift_junction(chrom, left, right, strand) + * if strand == 0 or js == strand: + * strand = js # <<<<<<<<<<<<<< + * ranges[i-1] = (ranges[i-1][0], shiftleft) + * ranges[i] = (shiftright, ranges[i][1]) */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_v_splice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2163, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__pyx_t_12) { + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_js); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2204, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF_SET(__pyx_v_strand, __pyx_t_9); + __pyx_t_9 = 0; + + /* "_rnaseq_utils.pyx":2205 + * if strand == 0 or js == strand: + * strand = js + * ranges[i-1] = (ranges[i-1][0], shiftleft) # <<<<<<<<<<<<<< + * ranges[i] = (shiftright, ranges[i][1]) + * canonical[i-1] = True + */ + __pyx_t_8 = (__pyx_v_i - 1); + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_ranges, __pyx_t_8, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_shiftleft); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2205, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_9); + __pyx_t_1 = 0; + __pyx_t_9 = 0; + __pyx_t_8 = (__pyx_v_i - 1); + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, __pyx_t_8, __pyx_t_14, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) __PYX_ERR(0, 2205, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2164 - * newranges, splice = self.get_splice_info(ranges, intronset, chrom, strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks - * if all(splice): # The labeled strand works - * junction_strand = strand # <<<<<<<<<<<<<< - * ranges = newranges + /* "_rnaseq_utils.pyx":2206 + * strand = js + * ranges[i-1] = (ranges[i-1][0], shiftleft) + * ranges[i] = (shiftright, ranges[i][1]) # <<<<<<<<<<<<<< + * canonical[i-1] = True * */ - __pyx_v_junction_strand = __pyx_v_strand; + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_shiftright); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_ranges, __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1); + __pyx_t_14 = 0; + __pyx_t_1 = 0; + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, __pyx_v_i, __pyx_t_9, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 2206, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":2165 - * if all(splice): # The labeled strand works - * junction_strand = strand - * ranges = newranges # <<<<<<<<<<<<<< + /* "_rnaseq_utils.pyx":2207 + * ranges[i-1] = (ranges[i-1][0], shiftleft) + * ranges[i] = (shiftright, ranges[i][1]) + * canonical[i-1] = True # <<<<<<<<<<<<<< * - * if not all(splice) and junction_strand != 0: + * return strand, ranges, canonical */ - __Pyx_INCREF(__pyx_v_newranges); - __Pyx_DECREF_SET(__pyx_v_ranges, __pyx_v_newranges); + __pyx_t_8 = (__pyx_v_i - 1); + if (unlikely(__Pyx_SetItemInt(__pyx_v_canonical, __pyx_t_8, Py_True, long, 1, __Pyx_PyInt_From_long, 0, 1, 1) < 0)) __PYX_ERR(0, 2207, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2163 - * if strand != 0: # Try to make junctions on the labeled strand work - * newranges, splice = self.get_splice_info(ranges, intronset, chrom, strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks - * if all(splice): # The labeled strand works # <<<<<<<<<<<<<< - * junction_strand = strand - * ranges = newranges + /* "_rnaseq_utils.pyx":2203 + * right = ranges[i][0] + * shiftleft, shiftright, js = self.shift_junction(chrom, left, right, strand) + * if strand == 0 or js == strand: # <<<<<<<<<<<<<< + * strand = js + * ranges[i-1] = (ranges[i-1][0], shiftleft) */ } - /* "_rnaseq_utils.pyx":2161 - * junction_strand = self.get_alignment_strand(line, map_strand) - * intronset = set(introns) - * if strand != 0: # Try to make junctions on the labeled strand work # <<<<<<<<<<<<<< - * newranges, splice = self.get_splice_info(ranges, intronset, chrom, strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks - * if all(splice): # The labeled strand works + /* "_rnaseq_utils.pyx":2199 + * if self.dataset.has_genome or self.dataset.sj_set is not None: + * for i in range(1, len(ranges)): # Iterate over introns + * if not canonical[i-1]: # Skip any that are canonical # <<<<<<<<<<<<<< + * left = ranges[i-1][1] + * right = ranges[i][0] */ } + } - /* "_rnaseq_utils.pyx":2167 - * ranges = newranges - * - * if not all(splice) and junction_strand != 0: # <<<<<<<<<<<<<< - * ranges, splice = self.get_splice_info(ranges, intronset, chrom, junction_strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks + /* "_rnaseq_utils.pyx":2197 + * return strand, ranges, canonical * + * if self.dataset.has_genome or self.dataset.sj_set is not None: # <<<<<<<<<<<<<< + * for i in range(1, len(ranges)): # Iterate over introns + * if not canonical[i-1]: # Skip any that are canonical */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_all, __pyx_v_splice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2167, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_30 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_30 < 0)) __PYX_ERR(0, 2167, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_6 = ((!__pyx_t_30) != 0); - if (__pyx_t_6) { - } else { - __pyx_t_12 = __pyx_t_6; - goto __pyx_L107_bool_binop_done; - } - __pyx_t_6 = ((__pyx_v_junction_strand != 0) != 0); - __pyx_t_12 = __pyx_t_6; - __pyx_L107_bool_binop_done:; - if (__pyx_t_12) { + } - /* "_rnaseq_utils.pyx":2168 + /* "_rnaseq_utils.pyx":2209 + * canonical[i-1] = True * - * if not all(splice) and junction_strand != 0: - * ranges, splice = self.get_splice_info(ranges, intronset, chrom, junction_strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks # <<<<<<<<<<<<<< + * return strand, ranges, canonical # <<<<<<<<<<<<<< * - * # Reconcile strand information given by start, end, and splice + * cdef (int, int, int) shift_junction(self, str chrom, int left, int right, int strand): */ - __pyx_t_32.__pyx_n = 1; - __pyx_t_32.remove_noncanonical = __pyx_v_self->remove_noncanonical; - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->get_splice_info(__pyx_v_self, __pyx_v_ranges, __pyx_v_intronset, __pyx_v_chrom, __pyx_v_junction_strand, &__pyx_t_32); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2168, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (likely(__pyx_t_2 != Py_None)) { - PyObject* sequence = __pyx_t_2; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 2)) { - if (size > 2) __Pyx_RaiseTooManyValuesError(2); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2168, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_23 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_24 = PyTuple_GET_ITEM(sequence, 1); - __Pyx_INCREF(__pyx_t_23); - __Pyx_INCREF(__pyx_t_24); - #else - __pyx_t_23 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2168, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_23); - __pyx_t_24 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2168, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_24); - #endif - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(0, 2168, __pyx_L1_error) - } - if (!(likely(PyList_CheckExact(__pyx_t_23))||((__pyx_t_23) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_23)->tp_name), 0))) __PYX_ERR(0, 2168, __pyx_L1_error) - if (!(likely(PyList_CheckExact(__pyx_t_24))||((__pyx_t_24) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_24)->tp_name), 0))) __PYX_ERR(0, 2168, __pyx_L1_error) - __Pyx_DECREF_SET(__pyx_v_ranges, ((PyObject*)__pyx_t_23)); - __pyx_t_23 = 0; - __Pyx_DECREF_SET(__pyx_v_splice, ((PyObject*)__pyx_t_24)); - __pyx_t_24 = 0; + __Pyx_XDECREF(__pyx_r); + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2209, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __Pyx_INCREF(__pyx_v_strand); + __Pyx_GIVEREF(__pyx_v_strand); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_strand); + __Pyx_INCREF(__pyx_v_ranges); + __Pyx_GIVEREF(__pyx_v_ranges); + PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_ranges); + __Pyx_INCREF(__pyx_v_canonical); + __Pyx_GIVEREF(__pyx_v_canonical); + PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_canonical); + __pyx_r = __pyx_t_9; + __pyx_t_9 = 0; + goto __pyx_L0; - /* "_rnaseq_utils.pyx":2167 - * ranges = newranges - * - * if not all(splice) and junction_strand != 0: # <<<<<<<<<<<<<< - * ranges, splice = self.get_splice_info(ranges, intronset, chrom, junction_strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks + /* "_rnaseq_utils.pyx":2189 + * return consensus_strand, canonical * + * def adjust_splice_sites(self, strand, ranges, canonical, chrom): # <<<<<<<<<<<<<< + * """Use genome motif information to version of the exon list where borders + * have been shifted to correct poorly-formed splice junctions.""" */ - } - } - __pyx_L103:; - /* "_rnaseq_utils.pyx":2171 + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_14); + __Pyx_AddTraceback("_rnaseq_utils.BAMobject.adjust_splice_sites", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XDECREF(__pyx_v_strand); + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "_rnaseq_utils.pyx":2211 + * return strand, ranges, canonical * - * # Reconcile strand information given by start, end, and splice - * junction_exists = sum(splice) > 0 # <<<<<<<<<<<<<< - * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists - * if strand != junction_strand: # Splice disagrees with end tags; remove tags + * cdef (int, int, int) shift_junction(self, str chrom, int left, int right, int strand): # <<<<<<<<<<<<<< + * """Returns a new left/right border of an intron and its strand.""" + * cdef int i, js */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_v_splice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2171, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_24 = PyObject_RichCompare(__pyx_t_2, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_24); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2171, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_24); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2171, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; - __pyx_v_junction_exists = __pyx_t_12; - /* "_rnaseq_utils.pyx":2172 - * # Reconcile strand information given by start, end, and splice - * junction_exists = sum(splice) > 0 - * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists # <<<<<<<<<<<<<< - * if strand != junction_strand: # Splice disagrees with end tags; remove tags - * strand = junction_strand +static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_shift_junction(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_chrom, int __pyx_v_left, int __pyx_v_right, int __pyx_v_strand) { + int __pyx_v_i; + int __pyx_v_js; + __pyx_ctuple_int__and_int__and_int __pyx_r; + __Pyx_RefNannyDeclarations + long __pyx_t_1; + long __pyx_t_2; + int __pyx_t_3; + int __pyx_t_4; + PyObject *__pyx_t_5 = NULL; + PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_7 = NULL; + int __pyx_t_8; + __pyx_ctuple_int__and_int__and_int __pyx_t_9; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("shift_junction", 0); + + /* "_rnaseq_utils.pyx":2214 + * """Returns a new left/right border of an intron and its strand.""" + * cdef int i, js + * for i in range(0, self.sj_shift+1): # Check SJDB, then genome # <<<<<<<<<<<<<< + * if strand >= 0: + * if (chrom, left+i, right+i, 1) in self.dataset.sj_set: */ - __pyx_t_6 = ((__pyx_v_junction_strand != 0) != 0); - if (__pyx_t_6) { - } else { - __pyx_t_12 = __pyx_t_6; - goto __pyx_L110_bool_binop_done; - } - __pyx_t_6 = (__pyx_v_junction_exists != 0); - __pyx_t_12 = __pyx_t_6; - __pyx_L110_bool_binop_done:; - if (__pyx_t_12) { + __pyx_t_1 = (__pyx_v_self->sj_shift + 1); + __pyx_t_2 = __pyx_t_1; + for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { + __pyx_v_i = __pyx_t_3; - /* "_rnaseq_utils.pyx":2173 - * junction_exists = sum(splice) > 0 - * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists - * if strand != junction_strand: # Splice disagrees with end tags; remove tags # <<<<<<<<<<<<<< - * strand = junction_strand - * s_tag = e_tag = capped = False + /* "_rnaseq_utils.pyx":2215 + * cdef int i, js + * for i in range(0, self.sj_shift+1): # Check SJDB, then genome + * if strand >= 0: # <<<<<<<<<<<<<< + * if (chrom, left+i, right+i, 1) in self.dataset.sj_set: + * # print("Found forward SJDB at shift +{}".format(i)) */ - __pyx_t_12 = ((__pyx_v_strand != __pyx_v_junction_strand) != 0); - if (__pyx_t_12) { + __pyx_t_4 = ((__pyx_v_strand >= 0) != 0); + if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2174 - * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists - * if strand != junction_strand: # Splice disagrees with end tags; remove tags - * strand = junction_strand # <<<<<<<<<<<<<< - * s_tag = e_tag = capped = False - * + /* "_rnaseq_utils.pyx":2216 + * for i in range(0, self.sj_shift+1): # Check SJDB, then genome + * if strand >= 0: + * if (chrom, left+i, right+i, 1) in self.dataset.sj_set: # <<<<<<<<<<<<<< + * # print("Found forward SJDB at shift +{}".format(i)) + * return (left+i, right+i, 1) */ - __pyx_v_strand = __pyx_v_junction_strand; + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_left + __pyx_v_i)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_right + __pyx_v_i)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2216, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_chrom); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6); + __Pyx_INCREF(__pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_1); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + if (unlikely(__pyx_v_self->dataset->sj_set == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2216, __pyx_L1_error) + } + __pyx_t_4 = (__Pyx_PySet_ContainsTF(__pyx_t_7, __pyx_v_self->dataset->sj_set, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2216, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = (__pyx_t_4 != 0); + if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":2175 - * if strand != junction_strand: # Splice disagrees with end tags; remove tags - * strand = junction_strand - * s_tag = e_tag = capped = False # <<<<<<<<<<<<<< - * - * if not stranded_method and not s_tag and not e_tag and not junction_exists: + /* "_rnaseq_utils.pyx":2218 + * if (chrom, left+i, right+i, 1) in self.dataset.sj_set: + * # print("Found forward SJDB at shift +{}".format(i)) + * return (left+i, right+i, 1) # <<<<<<<<<<<<<< + * elif (chrom, left-i, right-i, 1) in self.dataset.sj_set: + * # print("Found forward SJDB at shift -{}".format(i)) */ - __pyx_v_s_tag = 0; - __Pyx_INCREF(Py_False); - __Pyx_DECREF_SET(__pyx_v_e_tag, Py_False); - __pyx_v_capped = 0; + __pyx_t_9.f0 = (__pyx_v_left + __pyx_v_i); + __pyx_t_9.f1 = (__pyx_v_right + __pyx_v_i); + __pyx_t_9.f2 = 1; + __pyx_r = __pyx_t_9; + goto __pyx_L0; - /* "_rnaseq_utils.pyx":2173 - * junction_exists = sum(splice) > 0 - * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists - * if strand != junction_strand: # Splice disagrees with end tags; remove tags # <<<<<<<<<<<<<< - * strand = junction_strand - * s_tag = e_tag = capped = False + /* "_rnaseq_utils.pyx":2216 + * for i in range(0, self.sj_shift+1): # Check SJDB, then genome + * if strand >= 0: + * if (chrom, left+i, right+i, 1) in self.dataset.sj_set: # <<<<<<<<<<<<<< + * # print("Found forward SJDB at shift +{}".format(i)) + * return (left+i, right+i, 1) */ } - /* "_rnaseq_utils.pyx":2172 - * # Reconcile strand information given by start, end, and splice - * junction_exists = sum(splice) > 0 - * if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists # <<<<<<<<<<<<<< - * if strand != junction_strand: # Splice disagrees with end tags; remove tags - * strand = junction_strand + /* "_rnaseq_utils.pyx":2219 + * # print("Found forward SJDB at shift +{}".format(i)) + * return (left+i, right+i, 1) + * elif (chrom, left-i, right-i, 1) in self.dataset.sj_set: # <<<<<<<<<<<<<< + * # print("Found forward SJDB at shift -{}".format(i)) + * return (left-i, right-i, 1) */ - } + __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_left - __pyx_v_i)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_right - __pyx_v_i)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2219, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6); + __Pyx_INCREF(__pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_int_1); + __pyx_t_7 = 0; + __pyx_t_6 = 0; + if (unlikely(__pyx_v_self->dataset->sj_set == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2219, __pyx_L1_error) + } + __pyx_t_8 = (__Pyx_PySet_ContainsTF(__pyx_t_5, __pyx_v_self->dataset->sj_set, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2219, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = (__pyx_t_8 != 0); + if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2177 - * s_tag = e_tag = capped = False - * - * if not stranded_method and not s_tag and not e_tag and not junction_exists: # <<<<<<<<<<<<<< - * strand = 0 # No strand information can be found + /* "_rnaseq_utils.pyx":2221 + * elif (chrom, left-i, right-i, 1) in self.dataset.sj_set: + * # print("Found forward SJDB at shift -{}".format(i)) + * return (left-i, right-i, 1) # <<<<<<<<<<<<<< * + * if strand <= 0: + */ + __pyx_t_9.f0 = (__pyx_v_left - __pyx_v_i); + __pyx_t_9.f1 = (__pyx_v_right - __pyx_v_i); + __pyx_t_9.f2 = 1; + __pyx_r = __pyx_t_9; + goto __pyx_L0; + + /* "_rnaseq_utils.pyx":2219 + * # print("Found forward SJDB at shift +{}".format(i)) + * return (left+i, right+i, 1) + * elif (chrom, left-i, right-i, 1) in self.dataset.sj_set: # <<<<<<<<<<<<<< + * # print("Found forward SJDB at shift -{}".format(i)) + * return (left-i, right-i, 1) + */ + } + + /* "_rnaseq_utils.pyx":2215 + * cdef int i, js + * for i in range(0, self.sj_shift+1): # Check SJDB, then genome + * if strand >= 0: # <<<<<<<<<<<<<< + * if (chrom, left+i, right+i, 1) in self.dataset.sj_set: + * # print("Found forward SJDB at shift +{}".format(i)) */ - __pyx_t_6 = ((!(__pyx_v_stranded_method != 0)) != 0); - if (__pyx_t_6) { - } else { - __pyx_t_12 = __pyx_t_6; - goto __pyx_L114_bool_binop_done; - } - __pyx_t_6 = ((!(__pyx_v_s_tag != 0)) != 0); - if (__pyx_t_6) { - } else { - __pyx_t_12 = __pyx_t_6; - goto __pyx_L114_bool_binop_done; - } - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_e_tag); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2177, __pyx_L1_error) - __pyx_t_30 = ((!__pyx_t_6) != 0); - if (__pyx_t_30) { - } else { - __pyx_t_12 = __pyx_t_30; - goto __pyx_L114_bool_binop_done; } - __pyx_t_30 = ((!(__pyx_v_junction_exists != 0)) != 0); - __pyx_t_12 = __pyx_t_30; - __pyx_L114_bool_binop_done:; - if (__pyx_t_12) { - /* "_rnaseq_utils.pyx":2178 - * - * if not stranded_method and not s_tag and not e_tag and not junction_exists: - * strand = 0 # No strand information can be found # <<<<<<<<<<<<<< + /* "_rnaseq_utils.pyx":2223 + * return (left-i, right-i, 1) * - * # Generate a ReadObject with the parsed attributes above + * if strand <= 0: # <<<<<<<<<<<<<< + * if (chrom, left+i, right+i, -1) in self.dataset.sj_set: + * # print("Found reverse SJDB at shift +{}".format(i)) */ - __pyx_v_strand = 0; + __pyx_t_4 = ((__pyx_v_strand <= 0) != 0); + if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2177 - * s_tag = e_tag = capped = False - * - * if not stranded_method and not s_tag and not e_tag and not junction_exists: # <<<<<<<<<<<<<< - * strand = 0 # No strand information can be found + /* "_rnaseq_utils.pyx":2224 * + * if strand <= 0: + * if (chrom, left+i, right+i, -1) in self.dataset.sj_set: # <<<<<<<<<<<<<< + * # print("Found reverse SJDB at shift +{}".format(i)) + * return (left+i, right+i, -1) */ - } + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_left + __pyx_v_i)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_right + __pyx_v_i)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2224, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_chrom); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_6); + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_neg_1); + __pyx_t_5 = 0; + __pyx_t_6 = 0; + if (unlikely(__pyx_v_self->dataset->sj_set == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2224, __pyx_L1_error) + } + __pyx_t_4 = (__Pyx_PySet_ContainsTF(__pyx_t_7, __pyx_v_self->dataset->sj_set, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2224, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_8 = (__pyx_t_4 != 0); + if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":2181 + /* "_rnaseq_utils.pyx":2226 + * if (chrom, left+i, right+i, -1) in self.dataset.sj_set: + * # print("Found reverse SJDB at shift +{}".format(i)) + * return (left+i, right+i, -1) # <<<<<<<<<<<<<< + * elif (chrom, left-i, right-i, -1) in self.dataset.sj_set: + * # print("Found reverse SJDB at shift -{}".format(i)) + */ + __pyx_t_9.f0 = (__pyx_v_left + __pyx_v_i); + __pyx_t_9.f1 = (__pyx_v_right + __pyx_v_i); + __pyx_t_9.f2 = -1; + __pyx_r = __pyx_t_9; + goto __pyx_L0; + + /* "_rnaseq_utils.pyx":2224 * - * # Generate a ReadObject with the parsed attributes above - * read_data = ELdata(chrom_id, 0, strand, ranges, splice, s_tag, e_tag, capped, round(weight,2), False) # <<<<<<<<<<<<<< - * current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) - * current_mapping.e_len = e_tag_len + * if strand <= 0: + * if (chrom, left+i, right+i, -1) in self.dataset.sj_set: # <<<<<<<<<<<<<< + * # print("Found reverse SJDB at shift +{}".format(i)) + * return (left+i, right+i, -1) */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_ELdata); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_23 = __Pyx_PyInt_From_int(__pyx_v_chrom_id); if (unlikely(!__pyx_t_23)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_23); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_v_s_tag); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_capped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_33 = PyFloat_FromDouble(__pyx_v_weight); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_33); - __pyx_t_34 = PyTuple_New(2); if (unlikely(!__pyx_t_34)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_34); - __Pyx_GIVEREF(__pyx_t_33); - PyTuple_SET_ITEM(__pyx_t_34, 0, __pyx_t_33); - __Pyx_INCREF(__pyx_int_2); - __Pyx_GIVEREF(__pyx_int_2); - PyTuple_SET_ITEM(__pyx_t_34, 1, __pyx_int_2); - __pyx_t_33 = 0; - __pyx_t_33 = __Pyx_PyObject_Call(__pyx_builtin_round, __pyx_t_34, NULL); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_33); - __Pyx_DECREF(__pyx_t_34); __pyx_t_34 = 0; - __pyx_t_34 = NULL; - __pyx_t_16 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_34 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_34)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_34); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - __pyx_t_16 = 1; } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[11] = {__pyx_t_34, __pyx_t_23, __pyx_int_0, __pyx_t_3, __pyx_v_ranges, __pyx_v_splice, __pyx_t_4, __pyx_v_e_tag, __pyx_t_1, __pyx_t_33, Py_False}; - __pyx_t_24 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 10+__pyx_t_16); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_34); __pyx_t_34 = 0; - __Pyx_GOTREF(__pyx_t_24); - __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[11] = {__pyx_t_34, __pyx_t_23, __pyx_int_0, __pyx_t_3, __pyx_v_ranges, __pyx_v_splice, __pyx_t_4, __pyx_v_e_tag, __pyx_t_1, __pyx_t_33, Py_False}; - __pyx_t_24 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_16, 10+__pyx_t_16); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_34); __pyx_t_34 = 0; - __Pyx_GOTREF(__pyx_t_24); - __Pyx_DECREF(__pyx_t_23); __pyx_t_23 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; - } else - #endif - { - __pyx_t_35 = PyTuple_New(10+__pyx_t_16); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_35); - if (__pyx_t_34) { - __Pyx_GIVEREF(__pyx_t_34); PyTuple_SET_ITEM(__pyx_t_35, 0, __pyx_t_34); __pyx_t_34 = NULL; - } - __Pyx_GIVEREF(__pyx_t_23); - PyTuple_SET_ITEM(__pyx_t_35, 0+__pyx_t_16, __pyx_t_23); - __Pyx_INCREF(__pyx_int_0); - __Pyx_GIVEREF(__pyx_int_0); - PyTuple_SET_ITEM(__pyx_t_35, 1+__pyx_t_16, __pyx_int_0); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_35, 2+__pyx_t_16, __pyx_t_3); - __Pyx_INCREF(__pyx_v_ranges); - __Pyx_GIVEREF(__pyx_v_ranges); - PyTuple_SET_ITEM(__pyx_t_35, 3+__pyx_t_16, __pyx_v_ranges); - __Pyx_INCREF(__pyx_v_splice); - __Pyx_GIVEREF(__pyx_v_splice); - PyTuple_SET_ITEM(__pyx_t_35, 4+__pyx_t_16, __pyx_v_splice); - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_35, 5+__pyx_t_16, __pyx_t_4); - __Pyx_INCREF(__pyx_v_e_tag); - __Pyx_GIVEREF(__pyx_v_e_tag); - PyTuple_SET_ITEM(__pyx_t_35, 6+__pyx_t_16, __pyx_v_e_tag); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_35, 7+__pyx_t_16, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_33); - PyTuple_SET_ITEM(__pyx_t_35, 8+__pyx_t_16, __pyx_t_33); - __Pyx_INCREF(Py_False); - __Pyx_GIVEREF(Py_False); - PyTuple_SET_ITEM(__pyx_t_35, 9+__pyx_t_16, Py_False); - __pyx_t_23 = 0; - __pyx_t_3 = 0; - __pyx_t_4 = 0; - __pyx_t_1 = 0; - __pyx_t_33 = 0; - __pyx_t_24 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_35, NULL); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2181, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_24); - __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0; - } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF_SET(__pyx_v_read_data, __pyx_t_24); - __pyx_t_24 = 0; - /* "_rnaseq_utils.pyx":2182 - * # Generate a ReadObject with the parsed attributes above - * read_data = ELdata(chrom_id, 0, strand, ranges, splice, s_tag, e_tag, capped, round(weight,2), False) - * current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) # <<<<<<<<<<<<<< - * current_mapping.e_len = e_tag_len - * current_mapping.s_len = s_tag_len + /* "_rnaseq_utils.pyx":2227 + * # print("Found reverse SJDB at shift +{}".format(i)) + * return (left+i, right+i, -1) + * elif (chrom, left-i, right-i, -1) in self.dataset.sj_set: # <<<<<<<<<<<<<< + * # print("Found reverse SJDB at shift -{}".format(i)) + * return (left-i, right-i, -1) */ - __pyx_t_24 = PyTuple_New(1); if (unlikely(!__pyx_t_24)) __PYX_ERR(0, 2182, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_24); - __Pyx_INCREF(__pyx_v_read_data); - __Pyx_GIVEREF(__pyx_v_read_data); - PyTuple_SET_ITEM(__pyx_t_24, 0, __pyx_v_read_data); - __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2182, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_35 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 2182, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_35); - __pyx_t_33 = __Pyx_PyInt_From_int(__pyx_v_errors); if (unlikely(!__pyx_t_33)) __PYX_ERR(0, 2182, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_33); - if (PyDict_SetItem(__pyx_t_35, __pyx_n_u_errors, __pyx_t_33) < 0) __PYX_ERR(0, 2182, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_33); __pyx_t_33 = 0; - if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_attributes, __pyx_t_35) < 0) __PYX_ERR(0, 2182, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0; - __pyx_t_35 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_13_rnaseq_utils_RNAseqMapping), __pyx_t_24, __pyx_t_2); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 2182, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_35); - __Pyx_DECREF(__pyx_t_24); __pyx_t_24 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF_SET(__pyx_v_current_mapping, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_35)); - __pyx_t_35 = 0; + __pyx_t_7 = __Pyx_PyInt_From_int((__pyx_v_left - __pyx_v_i)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_right - __pyx_v_i)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2227, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6); + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_int_neg_1); + __pyx_t_7 = 0; + __pyx_t_6 = 0; + if (unlikely(__pyx_v_self->dataset->sj_set == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2227, __pyx_L1_error) + } + __pyx_t_8 = (__Pyx_PySet_ContainsTF(__pyx_t_5, __pyx_v_self->dataset->sj_set, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2227, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = (__pyx_t_8 != 0); + if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2183 - * read_data = ELdata(chrom_id, 0, strand, ranges, splice, s_tag, e_tag, capped, round(weight,2), False) - * current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) - * current_mapping.e_len = e_tag_len # <<<<<<<<<<<<<< - * current_mapping.s_len = s_tag_len - * if map_number not in mappings: + /* "_rnaseq_utils.pyx":2229 + * elif (chrom, left-i, right-i, -1) in self.dataset.sj_set: + * # print("Found reverse SJDB at shift -{}".format(i)) + * return (left-i, right-i, -1) # <<<<<<<<<<<<<< + * + * js = motif_strand(self.dataset.genome, chrom, left+i, right+i) */ - __pyx_v_current_mapping->e_len = __pyx_v_e_tag_len; + __pyx_t_9.f0 = (__pyx_v_left - __pyx_v_i); + __pyx_t_9.f1 = (__pyx_v_right - __pyx_v_i); + __pyx_t_9.f2 = -1; + __pyx_r = __pyx_t_9; + goto __pyx_L0; - /* "_rnaseq_utils.pyx":2184 - * current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) - * current_mapping.e_len = e_tag_len - * current_mapping.s_len = s_tag_len # <<<<<<<<<<<<<< - * if map_number not in mappings: - * mappings[map_number] = current_mapping + /* "_rnaseq_utils.pyx":2227 + * # print("Found reverse SJDB at shift +{}".format(i)) + * return (left+i, right+i, -1) + * elif (chrom, left-i, right-i, -1) in self.dataset.sj_set: # <<<<<<<<<<<<<< + * # print("Found reverse SJDB at shift -{}".format(i)) + * return (left-i, right-i, -1) */ - __pyx_v_current_mapping->s_len = __pyx_v_s_tag_len; + } - /* "_rnaseq_utils.pyx":2185 - * current_mapping.e_len = e_tag_len - * current_mapping.s_len = s_tag_len - * if map_number not in mappings: # <<<<<<<<<<<<<< - * mappings[map_number] = current_mapping - * else: # merge two mate-pair ReadObjects together + /* "_rnaseq_utils.pyx":2223 + * return (left-i, right-i, 1) + * + * if strand <= 0: # <<<<<<<<<<<<<< + * if (chrom, left+i, right+i, -1) in self.dataset.sj_set: + * # print("Found reverse SJDB at shift +{}".format(i)) */ - __pyx_t_35 = __Pyx_PyInt_From_int(__pyx_v_map_number); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 2185, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_35); - __pyx_t_12 = (__Pyx_PyDict_ContainsTF(__pyx_t_35, __pyx_v_mappings, Py_NE)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2185, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0; - __pyx_t_30 = (__pyx_t_12 != 0); - if (__pyx_t_30) { + } - /* "_rnaseq_utils.pyx":2186 - * current_mapping.s_len = s_tag_len - * if map_number not in mappings: - * mappings[map_number] = current_mapping # <<<<<<<<<<<<<< - * else: # merge two mate-pair ReadObjects together - * mate_read = mappings[map_number] + /* "_rnaseq_utils.pyx":2231 + * return (left-i, right-i, -1) + * + * js = motif_strand(self.dataset.genome, chrom, left+i, right+i) # <<<<<<<<<<<<<< + * if (js == strand and strand != 0) or (js !=0 and strand == 0): + * # print("Found {} motif at shift +{}".format(js, i)) */ - __pyx_t_35 = __Pyx_PyInt_From_int(__pyx_v_map_number); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 2186, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_35); - if (unlikely(PyDict_SetItem(__pyx_v_mappings, __pyx_t_35, ((PyObject *)__pyx_v_current_mapping)) < 0)) __PYX_ERR(0, 2186, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0; + __pyx_t_5 = __pyx_v_self->dataset->genome; + __Pyx_INCREF(__pyx_t_5); + __pyx_v_js = __pyx_f_13_rnaseq_utils_motif_strand(((PyObject*)__pyx_t_5), __pyx_v_chrom, (__pyx_v_left + __pyx_v_i), (__pyx_v_right + __pyx_v_i)); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2185 - * current_mapping.e_len = e_tag_len - * current_mapping.s_len = s_tag_len - * if map_number not in mappings: # <<<<<<<<<<<<<< - * mappings[map_number] = current_mapping - * else: # merge two mate-pair ReadObjects together + /* "_rnaseq_utils.pyx":2232 + * + * js = motif_strand(self.dataset.genome, chrom, left+i, right+i) + * if (js == strand and strand != 0) or (js !=0 and strand == 0): # <<<<<<<<<<<<<< + * # print("Found {} motif at shift +{}".format(js, i)) + * return (left+i, right+i, js) */ - goto __pyx_L118; + __pyx_t_8 = ((__pyx_v_js == __pyx_v_strand) != 0); + if (!__pyx_t_8) { + goto __pyx_L11_next_or; + } else { + } + __pyx_t_8 = ((__pyx_v_strand != 0) != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_4 = __pyx_t_8; + goto __pyx_L10_bool_binop_done; + } + __pyx_L11_next_or:; + __pyx_t_8 = ((__pyx_v_js != 0) != 0); + if (__pyx_t_8) { + } else { + __pyx_t_4 = __pyx_t_8; + goto __pyx_L10_bool_binop_done; } + __pyx_t_8 = ((__pyx_v_strand == 0) != 0); + __pyx_t_4 = __pyx_t_8; + __pyx_L10_bool_binop_done:; + if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2188 - * mappings[map_number] = current_mapping - * else: # merge two mate-pair ReadObjects together - * mate_read = mappings[map_number] # <<<<<<<<<<<<<< - * # if e_tag_added: # Mate alignment cannot extend beyond a trimmed 3' poly(A) - * # self.update_trimmed_ranges(current_mapping, mate_read, strand) + /* "_rnaseq_utils.pyx":2234 + * if (js == strand and strand != 0) or (js !=0 and strand == 0): + * # print("Found {} motif at shift +{}".format(js, i)) + * return (left+i, right+i, js) # <<<<<<<<<<<<<< + * + * js = motif_strand(self.dataset.genome, chrom, left-i, right-i) */ - /*else*/ { - __pyx_t_35 = __Pyx_PyInt_From_int(__pyx_v_map_number); if (unlikely(!__pyx_t_35)) __PYX_ERR(0, 2188, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_35); - __pyx_t_2 = __Pyx_PyDict_GetItem(__pyx_v_mappings, __pyx_t_35); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2188, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_35); __pyx_t_35 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2188, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_mate_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_2)); - __pyx_t_2 = 0; + __pyx_t_9.f0 = (__pyx_v_left + __pyx_v_i); + __pyx_t_9.f1 = (__pyx_v_right + __pyx_v_i); + __pyx_t_9.f2 = __pyx_v_js; + __pyx_r = __pyx_t_9; + goto __pyx_L0; - /* "_rnaseq_utils.pyx":2192 - * # self.update_trimmed_ranges(current_mapping, mate_read, strand) - * - * mate_read.merge(current_mapping) # <<<<<<<<<<<<<< + /* "_rnaseq_utils.pyx":2232 * - * mapping_list = self.resolve_overlapping_mappings(mappings) + * js = motif_strand(self.dataset.genome, chrom, left+i, right+i) + * if (js == strand and strand != 0) or (js !=0 and strand == 0): # <<<<<<<<<<<<<< + * # print("Found {} motif at shift +{}".format(js, i)) + * return (left+i, right+i, js) */ - (void)(((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqMapping *)__pyx_v_mate_read->__pyx_vtab)->merge(__pyx_v_mate_read, __pyx_v_current_mapping, 0)); } - __pyx_L118:; - __pyx_L10_continue:; - } - /* "_rnaseq_utils.pyx":2194 - * mate_read.merge(current_mapping) - * - * mapping_list = self.resolve_overlapping_mappings(mappings) # <<<<<<<<<<<<<< - * return mapping_list + /* "_rnaseq_utils.pyx":2236 + * return (left+i, right+i, js) * + * js = motif_strand(self.dataset.genome, chrom, left-i, right-i) # <<<<<<<<<<<<<< + * if (js == strand and strand != 0) or (js !=0 and strand == 0): + * # print("Found {} motif at shift -{}".format(js, i)) */ - __pyx_t_2 = ((struct __pyx_vtabstruct_13_rnaseq_utils_BAMobject *)__pyx_v_self->__pyx_vtab)->resolve_overlapping_mappings(__pyx_v_self, __pyx_v_mappings); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2194, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_mapping_list = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_t_5 = __pyx_v_self->dataset->genome; + __Pyx_INCREF(__pyx_t_5); + __pyx_v_js = __pyx_f_13_rnaseq_utils_motif_strand(((PyObject*)__pyx_t_5), __pyx_v_chrom, (__pyx_v_left - __pyx_v_i), (__pyx_v_right - __pyx_v_i)); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2195 + /* "_rnaseq_utils.pyx":2237 * - * mapping_list = self.resolve_overlapping_mappings(mappings) - * return mapping_list # <<<<<<<<<<<<<< + * js = motif_strand(self.dataset.genome, chrom, left-i, right-i) + * if (js == strand and strand != 0) or (js !=0 and strand == 0): # <<<<<<<<<<<<<< + * # print("Found {} motif at shift -{}".format(js, i)) + * return (left-i, right-i, js) + */ + __pyx_t_8 = ((__pyx_v_js == __pyx_v_strand) != 0); + if (!__pyx_t_8) { + goto __pyx_L16_next_or; + } else { + } + __pyx_t_8 = ((__pyx_v_strand != 0) != 0); + if (!__pyx_t_8) { + } else { + __pyx_t_4 = __pyx_t_8; + goto __pyx_L15_bool_binop_done; + } + __pyx_L16_next_or:; + __pyx_t_8 = ((__pyx_v_js != 0) != 0); + if (__pyx_t_8) { + } else { + __pyx_t_4 = __pyx_t_8; + goto __pyx_L15_bool_binop_done; + } + __pyx_t_8 = ((__pyx_v_strand == 0) != 0); + __pyx_t_4 = __pyx_t_8; + __pyx_L15_bool_binop_done:; + if (__pyx_t_4) { + + /* "_rnaseq_utils.pyx":2239 + * if (js == strand and strand != 0) or (js !=0 and strand == 0): + * # print("Found {} motif at shift -{}".format(js, i)) + * return (left-i, right-i, js) # <<<<<<<<<<<<<< * * cdef list resolve_overlapping_mappings(self, dict mappings): */ - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_v_mapping_list); - __pyx_r = __pyx_v_mapping_list; - goto __pyx_L0; + __pyx_t_9.f0 = (__pyx_v_left - __pyx_v_i); + __pyx_t_9.f1 = (__pyx_v_right - __pyx_v_i); + __pyx_t_9.f2 = __pyx_v_js; + __pyx_r = __pyx_t_9; + goto __pyx_L0; - /* "_rnaseq_utils.pyx":1995 - * self.sj_shift = self.dataset.sj_shift + /* "_rnaseq_utils.pyx":2237 * - * cpdef list generate_read(self): # <<<<<<<<<<<<<< - * cdef: - * int s_len, s_tag_len, e_len, e_tag_len, Nmap, counter, input_len, map_number, mate, strand, number_of_blocks + * js = motif_strand(self.dataset.genome, chrom, left-i, right-i) + * if (js == strand and strand != 0) or (js !=0 and strand == 0): # <<<<<<<<<<<<<< + * # print("Found {} motif at shift -{}".format(js, i)) + * return (left-i, right-i, js) */ + } + } - /* function exit code */ - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_23); - __Pyx_XDECREF(__pyx_t_24); - __Pyx_XDECREF(__pyx_t_33); - __Pyx_XDECREF(__pyx_t_34); - __Pyx_XDECREF(__pyx_t_35); - __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = 0; - __pyx_L0:; - __Pyx_XDECREF(__pyx_v_ID); - __Pyx_XDECREF(__pyx_v_chrom); - __Pyx_XDECREF(__pyx_v_seq); - __Pyx_XDECREF(__pyx_v_aligned_seq); - __Pyx_XDECREF(__pyx_v_mappings); - __Pyx_XDECREF(__pyx_v_splice); - __Pyx_XDECREF(__pyx_v_ranges); - __Pyx_XDECREF(__pyx_v_mapping_list); - __Pyx_XDECREF(__pyx_v_introns); - __Pyx_XDECREF(__pyx_v_newranges); - __Pyx_XDECREF(__pyx_v_intronset); - __Pyx_XDECREF((PyObject *)__pyx_v_current_mapping); - __Pyx_XDECREF((PyObject *)__pyx_v_mate_read); - __Pyx_XDECREF(__pyx_v_e_tag); - __Pyx_XDECREF(__pyx_v_line); - __Pyx_XDECREF(__pyx_v_mdstring); - __Pyx_XDECREF(__pyx_v_head); - __Pyx_XDECREF(__pyx_v_tail); - __Pyx_XDECREF(__pyx_v_read_data); - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_3generate_read(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_3generate_read(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("generate_read (wrapper)", 0); - __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject_2generate_read(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self)); + /* "_rnaseq_utils.pyx":2211 + * return strand, ranges, canonical + * + * cdef (int, int, int) shift_junction(self, str chrom, int left, int right, int strand): # <<<<<<<<<<<<<< + * """Returns a new left/right border of an intron and its strand.""" + * cdef int i, js + */ /* function exit code */ - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_2generate_read(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("generate_read", 0); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_13_rnaseq_utils_9BAMobject_generate_read(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __Pyx_pretend_to_initialize(&__pyx_r); goto __pyx_L0; - - /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_AddTraceback("_rnaseq_utils.BAMobject.generate_read", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; + __Pyx_XDECREF(__pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); + __Pyx_WriteUnraisable("_rnaseq_utils.BAMobject.shift_junction", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); + __Pyx_pretend_to_initialize(&__pyx_r); __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_rnaseq_utils.pyx":2197 - * return mapping_list +/* "_rnaseq_utils.pyx":2241 + * return (left-i, right-i, js) * * cdef list resolve_overlapping_mappings(self, dict mappings): # <<<<<<<<<<<<<< * """Decision tree for simplifying multimappers """ @@ -54530,9 +55641,9 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_v_previous_mapping = 0; PyObject *__pyx_v_output_mappings = 0; PyObject *__pyx_v_ordered_mappings = 0; - CYTHON_UNUSED int __pyx_9genexpr43__pyx_v_length; - struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr43__pyx_v_mapping = NULL; - struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr44__pyx_v_v = NULL; + CYTHON_UNUSED int __pyx_9genexpr46__pyx_v_length; + struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr46__pyx_v_mapping = NULL; + struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *__pyx_9genexpr47__pyx_v_v = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -54554,7 +55665,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings int __pyx_clineno = 0; __Pyx_RefNannySetupContext("resolve_overlapping_mappings", 0); - /* "_rnaseq_utils.pyx":2202 + /* "_rnaseq_utils.pyx":2246 * cdef list output_mappings, ordered_mappings * cdef int length * if len(mappings.values()) <= 1: # <<<<<<<<<<<<<< @@ -54563,16 +55674,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings */ if (unlikely(__pyx_v_mappings == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 2202, __pyx_L1_error) + __PYX_ERR(0, 2246, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_mappings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2202, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_mappings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2202, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_3 = ((__pyx_t_2 <= 1) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2203 + /* "_rnaseq_utils.pyx":2247 * cdef int length * if len(mappings.values()) <= 1: * output_mappings = list(mappings.values()) # <<<<<<<<<<<<<< @@ -54581,17 +55692,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings */ if (unlikely(__pyx_v_mappings == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 2203, __pyx_L1_error) + __PYX_ERR(0, 2247, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_mappings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2203, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_Values(__pyx_v_mappings); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2203, __pyx_L1_error) + __pyx_t_4 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2247, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_output_mappings = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2202 + /* "_rnaseq_utils.pyx":2246 * cdef list output_mappings, ordered_mappings * cdef int length * if len(mappings.values()) <= 1: # <<<<<<<<<<<<<< @@ -54601,7 +55712,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings goto __pyx_L3; } - /* "_rnaseq_utils.pyx":2205 + /* "_rnaseq_utils.pyx":2249 * output_mappings = list(mappings.values()) * else: * output_mappings = [] # <<<<<<<<<<<<<< @@ -54609,12 +55720,12 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings * for mapping in ordered_mappings: */ /*else*/ { - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2205, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2249, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_output_mappings = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2206 + /* "_rnaseq_utils.pyx":2250 * else: * output_mappings = [] * ordered_mappings = [mapping for length,mapping in sorted([(v.span[1]-v.span[0],v) for v in mappings.values()])] # <<<<<<<<<<<<<< @@ -54622,17 +55733,17 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings * for previous_mapping in output_mappings: */ { /* enter inner scope */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2206, __pyx_L6_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2250, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_4); { /* enter inner scope */ - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2206, __pyx_L11_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2250, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_2 = 0; if (unlikely(__pyx_v_mappings == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "values"); - __PYX_ERR(0, 2206, __pyx_L11_error) + __PYX_ERR(0, 2250, __pyx_L11_error) } - __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_mappings, 1, __pyx_n_s_values, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2206, __pyx_L11_error) + __pyx_t_9 = __Pyx_dict_iterator(__pyx_v_mappings, 1, __pyx_n_s_values, (&__pyx_t_7), (&__pyx_t_8)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2250, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_9; @@ -54640,47 +55751,47 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings while (1) { __pyx_t_10 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_7, &__pyx_t_2, NULL, &__pyx_t_9, NULL, __pyx_t_8); if (unlikely(__pyx_t_10 == 0)) break; - if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 2206, __pyx_L11_error) + if (unlikely(__pyx_t_10 == -1)) __PYX_ERR(0, 2250, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_9); - if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2206, __pyx_L11_error) - __Pyx_XDECREF_SET(__pyx_9genexpr44__pyx_v_v, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_9)); + if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2250, __pyx_L11_error) + __Pyx_XDECREF_SET(__pyx_9genexpr47__pyx_v_v, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_9)); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_9genexpr44__pyx_v_v->span.f1 - __pyx_9genexpr44__pyx_v_v->span.f0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2206, __pyx_L11_error) + __pyx_t_9 = __Pyx_PyInt_From_int((__pyx_9genexpr47__pyx_v_v->span.f1 - __pyx_9genexpr47__pyx_v_v->span.f0)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2250, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2206, __pyx_L11_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2250, __pyx_L11_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); - __Pyx_INCREF(((PyObject *)__pyx_9genexpr44__pyx_v_v)); - __Pyx_GIVEREF(((PyObject *)__pyx_9genexpr44__pyx_v_v)); - PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_9genexpr44__pyx_v_v)); + __Pyx_INCREF(((PyObject *)__pyx_9genexpr47__pyx_v_v)); + __Pyx_GIVEREF(((PyObject *)__pyx_9genexpr47__pyx_v_v)); + PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_9genexpr47__pyx_v_v)); __pyx_t_9 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 2206, __pyx_L11_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 2250, __pyx_L11_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_XDECREF((PyObject *)__pyx_9genexpr44__pyx_v_v); __pyx_9genexpr44__pyx_v_v = 0; + __Pyx_XDECREF((PyObject *)__pyx_9genexpr47__pyx_v_v); __pyx_9genexpr47__pyx_v_v = 0; goto __pyx_L14_exit_scope; __pyx_L11_error:; - __Pyx_XDECREF((PyObject *)__pyx_9genexpr44__pyx_v_v); __pyx_9genexpr44__pyx_v_v = 0; + __Pyx_XDECREF((PyObject *)__pyx_9genexpr47__pyx_v_v); __pyx_9genexpr47__pyx_v_v = 0; goto __pyx_L6_error; __pyx_L14_exit_scope:; } /* exit inner scope */ __pyx_t_1 = ((PyObject*)__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_12 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2206, __pyx_L6_error) + __pyx_t_12 = PyList_Sort(__pyx_t_1); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2250, __pyx_L6_error) if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 2206, __pyx_L6_error) + __PYX_ERR(0, 2250, __pyx_L6_error) } __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2206, __pyx_L6_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2250, __pyx_L6_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2206, __pyx_L6_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2250, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_1); #endif if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { @@ -54689,7 +55800,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 2206, __pyx_L6_error) + __PYX_ERR(0, 2250, __pyx_L6_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -54702,15 +55813,15 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_11); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2206, __pyx_L6_error) + __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2250, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2206, __pyx_L6_error) + __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2250, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_11); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2206, __pyx_L6_error) + __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2250, __pyx_L6_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_13 = Py_TYPE(__pyx_t_9)->tp_iternext; @@ -54718,7 +55829,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings __Pyx_GOTREF(__pyx_t_6); index = 1; __pyx_t_11 = __pyx_t_13(__pyx_t_9); if (unlikely(!__pyx_t_11)) goto __pyx_L15_unpacking_failed; __Pyx_GOTREF(__pyx_t_11); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2206, __pyx_L6_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_13(__pyx_t_9), 2) < 0) __PYX_ERR(0, 2250, __pyx_L6_error) __pyx_t_13 = NULL; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L16_unpacking_done; @@ -54726,29 +55837,29 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_13 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 2206, __pyx_L6_error) + __PYX_ERR(0, 2250, __pyx_L6_error) __pyx_L16_unpacking_done:; } - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2206, __pyx_L6_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2250, __pyx_L6_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2206, __pyx_L6_error) - __pyx_9genexpr43__pyx_v_length = __pyx_t_8; - __Pyx_XDECREF_SET(__pyx_9genexpr43__pyx_v_mapping, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_11)); + if (!(likely(((__pyx_t_11) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_11, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2250, __pyx_L6_error) + __pyx_9genexpr46__pyx_v_length = __pyx_t_8; + __Pyx_XDECREF_SET(__pyx_9genexpr46__pyx_v_mapping, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_11)); __pyx_t_11 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_9genexpr43__pyx_v_mapping))) __PYX_ERR(0, 2206, __pyx_L6_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_9genexpr46__pyx_v_mapping))) __PYX_ERR(0, 2250, __pyx_L6_error) } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_XDECREF((PyObject *)__pyx_9genexpr43__pyx_v_mapping); __pyx_9genexpr43__pyx_v_mapping = 0; + __Pyx_XDECREF((PyObject *)__pyx_9genexpr46__pyx_v_mapping); __pyx_9genexpr46__pyx_v_mapping = 0; goto __pyx_L17_exit_scope; __pyx_L6_error:; - __Pyx_XDECREF((PyObject *)__pyx_9genexpr43__pyx_v_mapping); __pyx_9genexpr43__pyx_v_mapping = 0; + __Pyx_XDECREF((PyObject *)__pyx_9genexpr46__pyx_v_mapping); __pyx_9genexpr46__pyx_v_mapping = 0; goto __pyx_L1_error; __pyx_L17_exit_scope:; } /* exit inner scope */ __pyx_v_ordered_mappings = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2207 + /* "_rnaseq_utils.pyx":2251 * output_mappings = [] * ordered_mappings = [mapping for length,mapping in sorted([(v.span[1]-v.span[0],v) for v in mappings.values()])] * for mapping in ordered_mappings: # <<<<<<<<<<<<<< @@ -54759,16 +55870,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings for (;;) { if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2207, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2251, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2207, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2251, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2207, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2251, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_mapping, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_5)); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2208 + /* "_rnaseq_utils.pyx":2252 * ordered_mappings = [mapping for length,mapping in sorted([(v.span[1]-v.span[0],v) for v in mappings.values()])] * for mapping in ordered_mappings: * for previous_mapping in output_mappings: # <<<<<<<<<<<<<< @@ -54779,16 +55890,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings for (;;) { if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2208, __pyx_L1_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2252, __pyx_L1_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2252, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); #endif - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2208, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2252, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_previous_mapping, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2209 + /* "_rnaseq_utils.pyx":2253 * for mapping in ordered_mappings: * for previous_mapping in output_mappings: * if mapping.overlaps(previous_mapping) and previous_mapping.attributes.get('errors',0) <= mapping.attributes.get('errors', 0): # <<<<<<<<<<<<<< @@ -54803,26 +55914,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings } if (unlikely(__pyx_v_previous_mapping->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 2209, __pyx_L1_error) + __PYX_ERR(0, 2253, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_previous_mapping->attributes, __pyx_n_u_errors, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2209, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_previous_mapping->attributes, __pyx_n_u_errors, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_mapping->attributes == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "get"); - __PYX_ERR(0, 2209, __pyx_L1_error) + __PYX_ERR(0, 2253, __pyx_L1_error) } - __pyx_t_11 = __Pyx_PyDict_GetItemDefault(__pyx_v_mapping->attributes, __pyx_n_u_errors, __pyx_int_0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2209, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyDict_GetItemDefault(__pyx_v_mapping->attributes, __pyx_n_u_errors, __pyx_int_0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2253, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_11, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2209, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_1, __pyx_t_11, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 2209, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_14 < 0)) __PYX_ERR(0, 2253, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = __pyx_t_14; __pyx_L23_bool_binop_done:; if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2210 + /* "_rnaseq_utils.pyx":2254 * for previous_mapping in output_mappings: * if mapping.overlaps(previous_mapping) and previous_mapping.attributes.get('errors',0) <= mapping.attributes.get('errors', 0): * continue # <<<<<<<<<<<<<< @@ -54831,7 +55942,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings */ goto __pyx_L20_continue; - /* "_rnaseq_utils.pyx":2209 + /* "_rnaseq_utils.pyx":2253 * for mapping in ordered_mappings: * for previous_mapping in output_mappings: * if mapping.overlaps(previous_mapping) and previous_mapping.attributes.get('errors',0) <= mapping.attributes.get('errors', 0): # <<<<<<<<<<<<<< @@ -54840,7 +55951,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings */ } - /* "_rnaseq_utils.pyx":2208 + /* "_rnaseq_utils.pyx":2252 * ordered_mappings = [mapping for length,mapping in sorted([(v.span[1]-v.span[0],v) for v in mappings.values()])] * for mapping in ordered_mappings: * for previous_mapping in output_mappings: # <<<<<<<<<<<<<< @@ -54851,16 +55962,16 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2212 + /* "_rnaseq_utils.pyx":2256 * continue * * output_mappings.append(mapping) # <<<<<<<<<<<<<< * * return output_mappings */ - __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_output_mappings, ((PyObject *)__pyx_v_mapping)); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2212, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_output_mappings, ((PyObject *)__pyx_v_mapping)); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2256, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2207 + /* "_rnaseq_utils.pyx":2251 * output_mappings = [] * ordered_mappings = [mapping for length,mapping in sorted([(v.span[1]-v.span[0],v) for v in mappings.values()])] * for mapping in ordered_mappings: # <<<<<<<<<<<<<< @@ -54872,7 +55983,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings } __pyx_L3:; - /* "_rnaseq_utils.pyx":2214 + /* "_rnaseq_utils.pyx":2258 * output_mappings.append(mapping) * * return output_mappings # <<<<<<<<<<<<<< @@ -54884,8 +55995,8 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings __pyx_r = __pyx_v_output_mappings; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2197 - * return mapping_list + /* "_rnaseq_utils.pyx":2241 + * return (left-i, right-i, js) * * cdef list resolve_overlapping_mappings(self, dict mappings): # <<<<<<<<<<<<<< * """Decision tree for simplifying multimappers """ @@ -54907,14 +56018,14 @@ static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings __Pyx_XDECREF((PyObject *)__pyx_v_previous_mapping); __Pyx_XDECREF(__pyx_v_output_mappings); __Pyx_XDECREF(__pyx_v_ordered_mappings); - __Pyx_XDECREF((PyObject *)__pyx_9genexpr43__pyx_v_mapping); - __Pyx_XDECREF((PyObject *)__pyx_9genexpr44__pyx_v_v); + __Pyx_XDECREF((PyObject *)__pyx_9genexpr46__pyx_v_mapping); + __Pyx_XDECREF((PyObject *)__pyx_9genexpr47__pyx_v_v); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_rnaseq_utils.pyx":2216 +/* "_rnaseq_utils.pyx":2260 * return output_mappings * * cdef int get_mapping_number(self): # <<<<<<<<<<<<<< @@ -54943,7 +56054,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_mapping_number", 0); - /* "_rnaseq_utils.pyx":2219 + /* "_rnaseq_utils.pyx":2263 * """Given a list of pysam objects, determine * how many locations in the genome the read (pair) mapped.""" * cdef int Nmap = 0 # <<<<<<<<<<<<<< @@ -54952,7 +56063,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob */ __pyx_v_Nmap = 0; - /* "_rnaseq_utils.pyx":2220 + /* "_rnaseq_utils.pyx":2264 * how many locations in the genome the read (pair) mapped.""" * cdef int Nmap = 0 * cdef int num_lines = len(self.input_lines) # <<<<<<<<<<<<<< @@ -54963,13 +56074,13 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2220, __pyx_L1_error) + __PYX_ERR(0, 2264, __pyx_L1_error) } - __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2220, __pyx_L1_error) + __pyx_t_2 = PyList_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2264, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_num_lines = __pyx_t_2; - /* "_rnaseq_utils.pyx":2221 + /* "_rnaseq_utils.pyx":2265 * cdef int Nmap = 0 * cdef int num_lines = len(self.input_lines) * if num_lines > 0: # Process the line(s) # <<<<<<<<<<<<<< @@ -54979,7 +56090,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob __pyx_t_3 = ((__pyx_v_num_lines > 0) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2222 + /* "_rnaseq_utils.pyx":2266 * cdef int num_lines = len(self.input_lines) * if num_lines > 0: # Process the line(s) * if num_lines == 1: # <<<<<<<<<<<<<< @@ -54989,7 +56100,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob __pyx_t_3 = ((__pyx_v_num_lines == 1) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2223 + /* "_rnaseq_utils.pyx":2267 * if num_lines > 0: # Process the line(s) * if num_lines == 1: * Nmap = 1 # <<<<<<<<<<<<<< @@ -54998,7 +56109,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob */ __pyx_v_Nmap = 1; - /* "_rnaseq_utils.pyx":2222 + /* "_rnaseq_utils.pyx":2266 * cdef int num_lines = len(self.input_lines) * if num_lines > 0: # Process the line(s) * if num_lines == 1: # <<<<<<<<<<<<<< @@ -55008,7 +56119,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob goto __pyx_L4; } - /* "_rnaseq_utils.pyx":2225 + /* "_rnaseq_utils.pyx":2269 * Nmap = 1 * else: # More than one line, could be multimapper and/or paired * line = self.input_lines[0] # <<<<<<<<<<<<<< @@ -55018,14 +56129,14 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob /*else*/ { if (unlikely(__pyx_v_self->input_lines == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2225, __pyx_L1_error) + __PYX_ERR(0, 2269, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->input_lines, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2225, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_self->input_lines, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_line = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2226 + /* "_rnaseq_utils.pyx":2270 * else: # More than one line, could be multimapper and/or paired * line = self.input_lines[0] * try: # <<<<<<<<<<<<<< @@ -55041,14 +56152,14 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob __Pyx_XGOTREF(__pyx_t_6); /*try:*/ { - /* "_rnaseq_utils.pyx":2227 + /* "_rnaseq_utils.pyx":2271 * line = self.input_lines[0] * try: * Nmap = line.get_tag('NH') # <<<<<<<<<<<<<< * except KeyError: * if line.is_paired: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2227, __pyx_L5_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2271, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -55062,14 +56173,14 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob } __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_n_u_NH) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_n_u_NH); __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2227, __pyx_L5_error) + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2271, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2227, __pyx_L5_error) + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2271, __pyx_L5_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_Nmap = __pyx_t_9; - /* "_rnaseq_utils.pyx":2226 + /* "_rnaseq_utils.pyx":2270 * else: # More than one line, could be multimapper and/or paired * line = self.input_lines[0] * try: # <<<<<<<<<<<<<< @@ -55086,7 +56197,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "_rnaseq_utils.pyx":2228 + /* "_rnaseq_utils.pyx":2272 * try: * Nmap = line.get_tag('NH') * except KeyError: # <<<<<<<<<<<<<< @@ -55096,25 +56207,25 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("_rnaseq_utils.BAMobject.get_mapping_number", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 2228, __pyx_L7_except_error) + if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 2272, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_t_8); - /* "_rnaseq_utils.pyx":2229 + /* "_rnaseq_utils.pyx":2273 * Nmap = line.get_tag('NH') * except KeyError: * if line.is_paired: # <<<<<<<<<<<<<< * Nmap = int(num_lines*0.5) * else: */ - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2229, __pyx_L7_except_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2273, __pyx_L7_except_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2229, __pyx_L7_except_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2273, __pyx_L7_except_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2230 + /* "_rnaseq_utils.pyx":2274 * except KeyError: * if line.is_paired: * Nmap = int(num_lines*0.5) # <<<<<<<<<<<<<< @@ -55123,7 +56234,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob */ __pyx_v_Nmap = ((int)(__pyx_v_num_lines * 0.5)); - /* "_rnaseq_utils.pyx":2229 + /* "_rnaseq_utils.pyx":2273 * Nmap = line.get_tag('NH') * except KeyError: * if line.is_paired: # <<<<<<<<<<<<<< @@ -55133,7 +56244,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob goto __pyx_L13; } - /* "_rnaseq_utils.pyx":2232 + /* "_rnaseq_utils.pyx":2276 * Nmap = int(num_lines*0.5) * else: * Nmap = num_lines # <<<<<<<<<<<<<< @@ -55152,7 +56263,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob goto __pyx_L7_except_error; __pyx_L7_except_error:; - /* "_rnaseq_utils.pyx":2226 + /* "_rnaseq_utils.pyx":2270 * else: # More than one line, could be multimapper and/or paired * line = self.input_lines[0] * try: # <<<<<<<<<<<<<< @@ -55174,7 +56285,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob } __pyx_L4:; - /* "_rnaseq_utils.pyx":2221 + /* "_rnaseq_utils.pyx":2265 * cdef int Nmap = 0 * cdef int num_lines = len(self.input_lines) * if num_lines > 0: # Process the line(s) # <<<<<<<<<<<<<< @@ -55183,7 +56294,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob */ } - /* "_rnaseq_utils.pyx":2234 + /* "_rnaseq_utils.pyx":2278 * Nmap = num_lines * * return Nmap # <<<<<<<<<<<<<< @@ -55193,7 +56304,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob __pyx_r = __pyx_v_Nmap; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2216 + /* "_rnaseq_utils.pyx":2260 * return output_mappings * * cdef int get_mapping_number(self): # <<<<<<<<<<<<<< @@ -55215,7 +56326,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number(struct __pyx_ob return __pyx_r; } -/* "_rnaseq_utils.pyx":2236 +/* "_rnaseq_utils.pyx":2280 * return Nmap * * cdef (int, int) determine_strand(self, line, bint stranded, bint reverse=False): # <<<<<<<<<<<<<< @@ -55248,90 +56359,90 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_determine_st } } - /* "_rnaseq_utils.pyx":2239 + /* "_rnaseq_utils.pyx":2283 * """Determine the RNA strand of a pysam object""" * cdef int mate, strand * mate = int(not(line.is_read1 or line.is_read2)) + line.is_read1 + 2*line.is_read2 # <<<<<<<<<<<<<< * strand = stranded * (((mate==1) ^ (reverse ^ line.is_reverse))*2 - 1) * return mate, strand */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L3_bool_binop_done:; - __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyNumber_Multiply(__pyx_int_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_4 = PyNumber_Multiply(__pyx_int_2, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2239, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_mate = __pyx_t_6; - /* "_rnaseq_utils.pyx":2240 + /* "_rnaseq_utils.pyx":2284 * cdef int mate, strand * mate = int(not(line.is_read1 or line.is_read2)) + line.is_read1 + 2*line.is_read2 * strand = stranded * (((mate==1) ^ (reverse ^ line.is_reverse))*2 - 1) # <<<<<<<<<<<<<< * return mate, strand * */ - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_stranded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_stranded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_mate == 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyBool_FromLong((__pyx_v_mate == 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_reverse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_reverse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyNumber_Xor(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_8 = PyNumber_Xor(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Xor(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_7 = PyNumber_Xor(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Multiply(__pyx_t_7, __pyx_int_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_7, __pyx_int_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_t_8, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_t_8, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Multiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_8 = PyNumber_Multiply(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2240, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2284, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_v_strand = __pyx_t_6; - /* "_rnaseq_utils.pyx":2241 + /* "_rnaseq_utils.pyx":2285 * mate = int(not(line.is_read1 or line.is_read2)) + line.is_read1 + 2*line.is_read2 * strand = stranded * (((mate==1) ^ (reverse ^ line.is_reverse))*2 - 1) * return mate, strand # <<<<<<<<<<<<<< @@ -55343,7 +56454,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_determine_st __pyx_r = __pyx_t_9; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2236 + /* "_rnaseq_utils.pyx":2280 * return Nmap * * cdef (int, int) determine_strand(self, line, bint stranded, bint reverse=False): # <<<<<<<<<<<<<< @@ -55365,7 +56476,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_determine_st return __pyx_r; } -/* "_rnaseq_utils.pyx":2243 +/* "_rnaseq_utils.pyx":2287 * return mate, strand * * cdef bint should_skip(self, line): # <<<<<<<<<<<<<< @@ -55385,34 +56496,34 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_should_skip(struct __pyx_obj_13_rn int __pyx_clineno = 0; __Pyx_RefNannySetupContext("should_skip", 0); - /* "_rnaseq_utils.pyx":2245 + /* "_rnaseq_utils.pyx":2289 * cdef bint should_skip(self, line): * """The read should not be processed.""" * return line.is_unmapped or line.is_supplementary or (line.is_secondary and not self.secondary) or (line.is_paired and not line.is_proper_pair) # <<<<<<<<<<<<<< * * cdef bint fails_stringent_filters(self, int Nmap, int match_length, int head, int tail, int errors): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (!__pyx_t_3) { goto __pyx_L6_next_or; @@ -55425,18 +56536,18 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_should_skip(struct __pyx_obj_13_rn goto __pyx_L3_bool_binop_done; } __pyx_L6_next_or:; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L3_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2245, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); __pyx_t_1 = __pyx_t_4; @@ -55444,7 +56555,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_should_skip(struct __pyx_obj_13_rn __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2243 + /* "_rnaseq_utils.pyx":2287 * return mate, strand * * cdef bint should_skip(self, line): # <<<<<<<<<<<<<< @@ -55462,7 +56573,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_should_skip(struct __pyx_obj_13_rn return __pyx_r; } -/* "_rnaseq_utils.pyx":2247 +/* "_rnaseq_utils.pyx":2291 * return line.is_unmapped or line.is_supplementary or (line.is_secondary and not self.secondary) or (line.is_paired and not line.is_proper_pair) * * cdef bint fails_stringent_filters(self, int Nmap, int match_length, int head, int tail, int errors): # <<<<<<<<<<<<<< @@ -55477,7 +56588,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_fails_stringent_filters(struct __p int __pyx_t_2; __Pyx_RefNannySetupContext("fails_stringent_filters", 0); - /* "_rnaseq_utils.pyx":2251 + /* "_rnaseq_utils.pyx":2295 * more stringently: no allowed softclipping, multimapping, or mismatches. * Absolutely require the length to be longer than minlen_strict.""" * return (head > 0 or tail > 0 or errors > 0 or Nmap > 1) and match_length < self.dataset.minlen_strict # <<<<<<<<<<<<<< @@ -55512,7 +56623,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_fails_stringent_filters(struct __p __pyx_r = __pyx_t_1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2247 + /* "_rnaseq_utils.pyx":2291 * return line.is_unmapped or line.is_supplementary or (line.is_secondary and not self.secondary) or (line.is_paired and not line.is_proper_pair) * * cdef bint fails_stringent_filters(self, int Nmap, int match_length, int head, int tail, int errors): # <<<<<<<<<<<<<< @@ -55526,7 +56637,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_fails_stringent_filters(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":2253 +/* "_rnaseq_utils.pyx":2297 * return (head > 0 or tail > 0 or errors > 0 or Nmap > 1) and match_length < self.dataset.minlen_strict * * cdef int get_alignment_strand(self, line, int strand): # <<<<<<<<<<<<<< @@ -55559,7 +56670,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED int __pyx_clineno = 0; __Pyx_RefNannySetupContext("get_alignment_strand", 0); - /* "_rnaseq_utils.pyx":2258 + /* "_rnaseq_utils.pyx":2302 * cdef str js * cdef int alignment_strand * alignment_strand = strand # <<<<<<<<<<<<<< @@ -55568,7 +56679,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED */ __pyx_v_alignment_strand = __pyx_v_strand; - /* "_rnaseq_utils.pyx":2259 + /* "_rnaseq_utils.pyx":2303 * cdef int alignment_strand * alignment_strand = strand * try: # <<<<<<<<<<<<<< @@ -55584,14 +56695,14 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "_rnaseq_utils.pyx":2260 + /* "_rnaseq_utils.pyx":2304 * alignment_strand = strand * try: * js = line.get_tag('XS') # <<<<<<<<<<<<<< * if js == '+': * alignment_strand = 1 */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2260, __pyx_L3_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2304, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { @@ -55605,25 +56716,25 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED } __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_n_u_XS) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_n_u_XS); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2260, __pyx_L3_error) + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2304, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 2260, __pyx_L3_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 2304, __pyx_L3_error) __pyx_v_js = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2261 + /* "_rnaseq_utils.pyx":2305 * try: * js = line.get_tag('XS') * if js == '+': # <<<<<<<<<<<<<< * alignment_strand = 1 * elif js == '-': */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_js, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2261, __pyx_L3_error) + __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_js, __pyx_kp_u__10, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2305, __pyx_L3_error) __pyx_t_8 = (__pyx_t_7 != 0); if (__pyx_t_8) { - /* "_rnaseq_utils.pyx":2262 + /* "_rnaseq_utils.pyx":2306 * js = line.get_tag('XS') * if js == '+': * alignment_strand = 1 # <<<<<<<<<<<<<< @@ -55632,7 +56743,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED */ __pyx_v_alignment_strand = 1; - /* "_rnaseq_utils.pyx":2261 + /* "_rnaseq_utils.pyx":2305 * try: * js = line.get_tag('XS') * if js == '+': # <<<<<<<<<<<<<< @@ -55642,18 +56753,18 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED goto __pyx_L9; } - /* "_rnaseq_utils.pyx":2263 + /* "_rnaseq_utils.pyx":2307 * if js == '+': * alignment_strand = 1 * elif js == '-': # <<<<<<<<<<<<<< * alignment_strand = -1 * except KeyError: */ - __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_js, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2263, __pyx_L3_error) + __pyx_t_8 = (__Pyx_PyUnicode_Equals(__pyx_v_js, __pyx_kp_u__11, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2307, __pyx_L3_error) __pyx_t_7 = (__pyx_t_8 != 0); if (__pyx_t_7) { - /* "_rnaseq_utils.pyx":2264 + /* "_rnaseq_utils.pyx":2308 * alignment_strand = 1 * elif js == '-': * alignment_strand = -1 # <<<<<<<<<<<<<< @@ -55662,7 +56773,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED */ __pyx_v_alignment_strand = -1; - /* "_rnaseq_utils.pyx":2263 + /* "_rnaseq_utils.pyx":2307 * if js == '+': * alignment_strand = 1 * elif js == '-': # <<<<<<<<<<<<<< @@ -55672,7 +56783,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED } __pyx_L9:; - /* "_rnaseq_utils.pyx":2259 + /* "_rnaseq_utils.pyx":2303 * cdef int alignment_strand * alignment_strand = strand * try: # <<<<<<<<<<<<<< @@ -55689,7 +56800,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":2265 + /* "_rnaseq_utils.pyx":2309 * elif js == '-': * alignment_strand = -1 * except KeyError: # <<<<<<<<<<<<<< @@ -55699,12 +56810,12 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("_rnaseq_utils.BAMobject.get_alignment_strand", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 2265, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6) < 0) __PYX_ERR(0, 2309, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); - /* "_rnaseq_utils.pyx":2266 + /* "_rnaseq_utils.pyx":2310 * alignment_strand = -1 * except KeyError: * try: # <<<<<<<<<<<<<< @@ -55720,14 +56831,14 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED __Pyx_XGOTREF(__pyx_t_12); /*try:*/ { - /* "_rnaseq_utils.pyx":2267 + /* "_rnaseq_utils.pyx":2311 * except KeyError: * try: * js = line.get_tag('ts') # <<<<<<<<<<<<<< * alignment_strand = {'+':strand, '-':-strand}[js] * except KeyError: */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2267, __pyx_L12_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_get_tag); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2311, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { @@ -55741,38 +56852,38 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED } __pyx_t_13 = (__pyx_t_15) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_15, __pyx_n_u_ts) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_n_u_ts); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2267, __pyx_L12_error) + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2311, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (!(likely(PyUnicode_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_13)->tp_name), 0))) __PYX_ERR(0, 2267, __pyx_L12_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_13)->tp_name), 0))) __PYX_ERR(0, 2311, __pyx_L12_error) __Pyx_XDECREF_SET(__pyx_v_js, ((PyObject*)__pyx_t_13)); __pyx_t_13 = 0; - /* "_rnaseq_utils.pyx":2268 + /* "_rnaseq_utils.pyx":2312 * try: * js = line.get_tag('ts') * alignment_strand = {'+':strand, '-':-strand}[js] # <<<<<<<<<<<<<< * except KeyError: * alignment_strand = 0 */ - __pyx_t_13 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2268, __pyx_L12_error) + __pyx_t_13 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2312, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2268, __pyx_L12_error) + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2312, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_14); - if (PyDict_SetItem(__pyx_t_13, __pyx_kp_u__10, __pyx_t_14) < 0) __PYX_ERR(0, 2268, __pyx_L12_error) + if (PyDict_SetItem(__pyx_t_13, __pyx_kp_u__10, __pyx_t_14) < 0) __PYX_ERR(0, 2312, __pyx_L12_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyInt_From_int((-__pyx_v_strand)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2268, __pyx_L12_error) + __pyx_t_14 = __Pyx_PyInt_From_int((-__pyx_v_strand)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2312, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_14); - if (PyDict_SetItem(__pyx_t_13, __pyx_kp_u__11, __pyx_t_14) < 0) __PYX_ERR(0, 2268, __pyx_L12_error) + if (PyDict_SetItem(__pyx_t_13, __pyx_kp_u__11, __pyx_t_14) < 0) __PYX_ERR(0, 2312, __pyx_L12_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_t_13, __pyx_v_js); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2268, __pyx_L12_error) + __pyx_t_14 = __Pyx_PyDict_GetItem(__pyx_t_13, __pyx_v_js); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2312, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2268, __pyx_L12_error) + __pyx_t_9 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_9 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2312, __pyx_L12_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_alignment_strand = __pyx_t_9; - /* "_rnaseq_utils.pyx":2266 + /* "_rnaseq_utils.pyx":2310 * alignment_strand = -1 * except KeyError: * try: # <<<<<<<<<<<<<< @@ -55789,7 +56900,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - /* "_rnaseq_utils.pyx":2269 + /* "_rnaseq_utils.pyx":2313 * js = line.get_tag('ts') * alignment_strand = {'+':strand, '-':-strand}[js] * except KeyError: # <<<<<<<<<<<<<< @@ -55799,12 +56910,12 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError); if (__pyx_t_9) { __Pyx_AddTraceback("_rnaseq_utils.BAMobject.get_alignment_strand", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_15) < 0) __PYX_ERR(0, 2269, __pyx_L14_except_error) + if (__Pyx_GetException(&__pyx_t_14, &__pyx_t_13, &__pyx_t_15) < 0) __PYX_ERR(0, 2313, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_t_13); __Pyx_GOTREF(__pyx_t_15); - /* "_rnaseq_utils.pyx":2270 + /* "_rnaseq_utils.pyx":2314 * alignment_strand = {'+':strand, '-':-strand}[js] * except KeyError: * alignment_strand = 0 # <<<<<<<<<<<<<< @@ -55820,7 +56931,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED goto __pyx_L14_except_error; __pyx_L14_except_error:; - /* "_rnaseq_utils.pyx":2266 + /* "_rnaseq_utils.pyx":2310 * alignment_strand = -1 * except KeyError: * try: # <<<<<<<<<<<<<< @@ -55847,7 +56958,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "_rnaseq_utils.pyx":2259 + /* "_rnaseq_utils.pyx":2303 * cdef int alignment_strand * alignment_strand = strand * try: # <<<<<<<<<<<<<< @@ -55867,17 +56978,17 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED __pyx_L8_try_end:; } - /* "_rnaseq_utils.pyx":2272 + /* "_rnaseq_utils.pyx":2316 * alignment_strand = 0 * * return alignment_strand # <<<<<<<<<<<<<< * - * cdef tuple get_splice_info(self, list ranges, set introns, str chrom, int alignment_strand, bint remove_noncanonical=False): + * cdef int check_sjdb(self, str chrom, int start, int end): */ __pyx_r = __pyx_v_alignment_strand; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2253 + /* "_rnaseq_utils.pyx":2297 * return (head > 0 or tail > 0 or errors > 0 or Nmap > 1) and match_length < self.dataset.minlen_strict * * cdef int get_alignment_strand(self, line, int strand): # <<<<<<<<<<<<<< @@ -55901,406 +57012,163 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand(CYTHON_UNUSED return __pyx_r; } -/* "_rnaseq_utils.pyx":2274 +/* "_rnaseq_utils.pyx":2318 * return alignment_strand * - * cdef tuple get_splice_info(self, list ranges, set introns, str chrom, int alignment_strand, bint remove_noncanonical=False): # <<<<<<<<<<<<<< - * """Returns a list of booleans denoting whether each gap - * between ranges is a splice junction or not on the given alignment strand.""" + * cdef int check_sjdb(self, str chrom, int start, int end): # <<<<<<<<<<<<<< + * '''Returns the strand of''' + * cdef int strand */ -static PyObject *__pyx_f_13_rnaseq_utils_9BAMobject_get_splice_info(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_ranges, PyObject *__pyx_v_introns, PyObject *__pyx_v_chrom, int __pyx_v_alignment_strand, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_get_splice_info *__pyx_optional_args) { - PyObject *__pyx_v_splice = 0; - Py_ssize_t __pyx_v_i; - Py_ssize_t __pyx_v_range_len; - Py_ssize_t __pyx_v_gap_len; - __pyx_ctuple_int__and_int __pyx_v_g; - __pyx_ctuple_int__and_int __pyx_v_shift_g; - CYTHON_UNUSED PyObject *__pyx_v_junction = 0; - PyObject *__pyx_v_gaps = NULL; - Py_ssize_t __pyx_9genexpr45__pyx_v_i; - PyObject *__pyx_r = NULL; +static int __pyx_f_13_rnaseq_utils_9BAMobject_check_sjdb(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v_chrom, int __pyx_v_start, int __pyx_v_end) { + int __pyx_v_strand; + int __pyx_r; __Pyx_RefNannyDeclarations - Py_ssize_t __pyx_t_1; + PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - Py_ssize_t __pyx_t_3; - Py_ssize_t __pyx_t_4; - PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - Py_ssize_t __pyx_t_7; - PyObject *__pyx_t_8 = NULL; - __pyx_ctuple_int__and_int __pyx_t_9; - int __pyx_t_10; - int __pyx_t_11; + PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; + int __pyx_t_5; + int __pyx_t_6; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("get_splice_info", 0); - if (__pyx_optional_args) { - } - - /* "_rnaseq_utils.pyx":2283 - * cdef tuple junction - * cdef int strand, l, r, s - * range_len = len(ranges) # <<<<<<<<<<<<<< - * gap_len = range_len - 1 - * gaps = [(ranges[i][1], ranges[i+1][0]) for i in range(range_len-1)] # List of all gaps between ranges - */ - if (unlikely(__pyx_v_ranges == Py_None)) { - PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2283, __pyx_L1_error) - } - __pyx_t_1 = PyList_GET_SIZE(__pyx_v_ranges); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2283, __pyx_L1_error) - __pyx_v_range_len = __pyx_t_1; - - /* "_rnaseq_utils.pyx":2284 - * cdef int strand, l, r, s - * range_len = len(ranges) - * gap_len = range_len - 1 # <<<<<<<<<<<<<< - * gaps = [(ranges[i][1], ranges[i+1][0]) for i in range(range_len-1)] # List of all gaps between ranges - * splice = [False]*gap_len # List of booleans indicating whether each gap is a splice junction - */ - __pyx_v_gap_len = (__pyx_v_range_len - 1); + __Pyx_RefNannySetupContext("check_sjdb", 0); - /* "_rnaseq_utils.pyx":2285 - * range_len = len(ranges) - * gap_len = range_len - 1 - * gaps = [(ranges[i][1], ranges[i+1][0]) for i in range(range_len-1)] # List of all gaps between ranges # <<<<<<<<<<<<<< - * splice = [False]*gap_len # List of booleans indicating whether each gap is a splice junction - * for i in range(gap_len): + /* "_rnaseq_utils.pyx":2321 + * '''Returns the strand of''' + * cdef int strand + * strand = 0 # <<<<<<<<<<<<<< + * strand += int((chrom, start, end, 1) in self.dataset.sj_set) + * strand -= int((chrom, start, end, -1) in self.dataset.sj_set) */ - { /* enter inner scope */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = (__pyx_v_range_len - 1); - __pyx_t_3 = __pyx_t_1; - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { - __pyx_9genexpr45__pyx_v_i = __pyx_t_4; - if (unlikely(__pyx_v_ranges == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2285, __pyx_L1_error) - } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ranges, __pyx_9genexpr45__pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(__pyx_v_ranges == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2285, __pyx_L1_error) - } - __pyx_t_7 = (__pyx_9genexpr45__pyx_v_i + 1); - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ranges, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8); - __pyx_t_6 = 0; - __pyx_t_8 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 2285, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } /* exit inner scope */ - __pyx_v_gaps = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; + __pyx_v_strand = 0; - /* "_rnaseq_utils.pyx":2286 - * gap_len = range_len - 1 - * gaps = [(ranges[i][1], ranges[i+1][0]) for i in range(range_len-1)] # List of all gaps between ranges - * splice = [False]*gap_len # List of booleans indicating whether each gap is a splice junction # <<<<<<<<<<<<<< - * for i in range(gap_len): - * g = gaps[i] + /* "_rnaseq_utils.pyx":2322 + * cdef int strand + * strand = 0 + * strand += int((chrom, start, end, 1) in self.dataset.sj_set) # <<<<<<<<<<<<<< + * strand -= int((chrom, start, end, -1) in self.dataset.sj_set) + * return strand */ - __pyx_t_2 = PyList_New(1 * ((__pyx_v_gap_len<0) ? 0:__pyx_v_gap_len)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2286, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - { Py_ssize_t __pyx_temp; - for (__pyx_temp=0; __pyx_temp < __pyx_v_gap_len; __pyx_temp++) { - __Pyx_INCREF(Py_False); - __Pyx_GIVEREF(Py_False); - PyList_SET_ITEM(__pyx_t_2, __pyx_temp, Py_False); - } - } - __pyx_v_splice = ((PyObject*)__pyx_t_2); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_chrom); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); + __Pyx_INCREF(__pyx_int_1); + __Pyx_GIVEREF(__pyx_int_1); + PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_int_1); __pyx_t_2 = 0; + __pyx_t_3 = 0; + if (unlikely(__pyx_v_self->dataset->sj_set == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2322, __pyx_L1_error) + } + __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_t_4, __pyx_v_self->dataset->sj_set, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2322, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_v_strand = __pyx_t_6; - /* "_rnaseq_utils.pyx":2287 - * gaps = [(ranges[i][1], ranges[i+1][0]) for i in range(range_len-1)] # List of all gaps between ranges - * splice = [False]*gap_len # List of booleans indicating whether each gap is a splice junction - * for i in range(gap_len): # <<<<<<<<<<<<<< - * g = gaps[i] - * splice[i] = g in introns - */ - __pyx_t_1 = __pyx_v_gap_len; - __pyx_t_3 = __pyx_t_1; - for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) { - __pyx_v_i = __pyx_t_4; - - /* "_rnaseq_utils.pyx":2288 - * splice = [False]*gap_len # List of booleans indicating whether each gap is a splice junction - * for i in range(gap_len): - * g = gaps[i] # <<<<<<<<<<<<<< - * splice[i] = g in introns - * junction = (chrom, g[0], g[1], alignment_strand) - */ - __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_gaps, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2288, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_9 = __pyx_convert__from_py___pyx_ctuple_int__and_int(__pyx_t_2); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 2288, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_g = __pyx_t_9; - - /* "_rnaseq_utils.pyx":2289 - * for i in range(gap_len): - * g = gaps[i] - * splice[i] = g in introns # <<<<<<<<<<<<<< - * junction = (chrom, g[0], g[1], alignment_strand) - * shift_g = shift_junction(self.dataset.sj_set, chrom, g[0], g[1], alignment_strand, self.sj_shift) - */ - __pyx_t_2 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_g); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__pyx_v_introns == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 2289, __pyx_L1_error) - } - __pyx_t_10 = (__Pyx_PySet_ContainsTF(__pyx_t_2, __pyx_v_introns, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 2289, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - if (unlikely(__Pyx_SetItemInt(__pyx_v_splice, __pyx_v_i, __pyx_t_2, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 2289, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - - /* "_rnaseq_utils.pyx":2290 - * g = gaps[i] - * splice[i] = g in introns - * junction = (chrom, g[0], g[1], alignment_strand) # <<<<<<<<<<<<<< - * shift_g = shift_junction(self.dataset.sj_set, chrom, g[0], g[1], alignment_strand, self.sj_shift) - * if shift_g != g: # Update ranges with the shifted junction - */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_g.f0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2290, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_g.f1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2290, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_alignment_strand); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2290, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2290, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_v_chrom); - __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_chrom); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_8); - __pyx_t_2 = 0; - __pyx_t_5 = 0; - __pyx_t_8 = 0; - __Pyx_XDECREF_SET(__pyx_v_junction, ((PyObject*)__pyx_t_6)); - __pyx_t_6 = 0; - - /* "_rnaseq_utils.pyx":2291 - * splice[i] = g in introns - * junction = (chrom, g[0], g[1], alignment_strand) - * shift_g = shift_junction(self.dataset.sj_set, chrom, g[0], g[1], alignment_strand, self.sj_shift) # <<<<<<<<<<<<<< - * if shift_g != g: # Update ranges with the shifted junction - * ranges[i] = (ranges[i][0], g[0]) - */ - __pyx_t_6 = __pyx_v_self->dataset->sj_set; - __Pyx_INCREF(__pyx_t_6); - __pyx_v_shift_g = __pyx_f_13_rnaseq_utils_shift_junction(((PyObject*)__pyx_t_6), __pyx_v_chrom, __pyx_v_g.f0, __pyx_v_g.f1, __pyx_v_alignment_strand, __pyx_v_self->sj_shift); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "_rnaseq_utils.pyx":2292 - * junction = (chrom, g[0], g[1], alignment_strand) - * shift_g = shift_junction(self.dataset.sj_set, chrom, g[0], g[1], alignment_strand, self.sj_shift) - * if shift_g != g: # Update ranges with the shifted junction # <<<<<<<<<<<<<< - * ranges[i] = (ranges[i][0], g[0]) - * ranges[i+1] = (g[1], ranges[i+1][1]) - */ - __pyx_t_6 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_shift_g); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2292, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_v_g); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2292, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2292, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 2292, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (__pyx_t_10) { - - /* "_rnaseq_utils.pyx":2293 - * shift_g = shift_junction(self.dataset.sj_set, chrom, g[0], g[1], alignment_strand, self.sj_shift) - * if shift_g != g: # Update ranges with the shifted junction - * ranges[i] = (ranges[i][0], g[0]) # <<<<<<<<<<<<<< - * ranges[i+1] = (g[1], ranges[i+1][1]) - * - */ - if (unlikely(__pyx_v_ranges == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2293, __pyx_L1_error) - } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ranges, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_g.f0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); - __pyx_t_8 = 0; - __pyx_t_5 = 0; - if (unlikely(__pyx_v_ranges == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2293, __pyx_L1_error) - } - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, __pyx_v_i, __pyx_t_6, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 2293, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - - /* "_rnaseq_utils.pyx":2294 - * if shift_g != g: # Update ranges with the shifted junction - * ranges[i] = (ranges[i][0], g[0]) - * ranges[i+1] = (g[1], ranges[i+1][1]) # <<<<<<<<<<<<<< - * - * if self.dataset.has_genome and self.remove_noncanonical: # Filter noncanonical junctions - */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_g.f1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (unlikely(__pyx_v_ranges == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2294, __pyx_L1_error) - } - __pyx_t_7 = (__pyx_v_i + 1); - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ranges, __pyx_t_7, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2294, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8); - __pyx_t_6 = 0; - __pyx_t_8 = 0; - if (unlikely(__pyx_v_ranges == Py_None)) { - PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2294, __pyx_L1_error) - } - __pyx_t_7 = (__pyx_v_i + 1); - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, __pyx_t_7, __pyx_t_5, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 2294, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - - /* "_rnaseq_utils.pyx":2292 - * junction = (chrom, g[0], g[1], alignment_strand) - * shift_g = shift_junction(self.dataset.sj_set, chrom, g[0], g[1], alignment_strand, self.sj_shift) - * if shift_g != g: # Update ranges with the shifted junction # <<<<<<<<<<<<<< - * ranges[i] = (ranges[i][0], g[0]) - * ranges[i+1] = (g[1], ranges[i+1][1]) - */ - } - - /* "_rnaseq_utils.pyx":2296 - * ranges[i+1] = (g[1], ranges[i+1][1]) - * - * if self.dataset.has_genome and self.remove_noncanonical: # Filter noncanonical junctions # <<<<<<<<<<<<<< - * splice[i] = junction_is_canonical(self.dataset.genome, chrom, g[0], g[1], alignment_strand) - * - */ - __pyx_t_11 = (__pyx_v_self->dataset->has_genome != 0); - if (__pyx_t_11) { - } else { - __pyx_t_10 = __pyx_t_11; - goto __pyx_L9_bool_binop_done; - } - __pyx_t_11 = (__pyx_v_self->remove_noncanonical != 0); - __pyx_t_10 = __pyx_t_11; - __pyx_L9_bool_binop_done:; - if (__pyx_t_10) { - - /* "_rnaseq_utils.pyx":2297 - * - * if self.dataset.has_genome and self.remove_noncanonical: # Filter noncanonical junctions - * splice[i] = junction_is_canonical(self.dataset.genome, chrom, g[0], g[1], alignment_strand) # <<<<<<<<<<<<<< - * - * return ranges, splice - */ - __pyx_t_5 = __pyx_v_self->dataset->genome; - __Pyx_INCREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_junction_is_canonical(((PyObject*)__pyx_t_5), __pyx_v_chrom, __pyx_v_g.f0, __pyx_v_g.f1, __pyx_v_alignment_strand)); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2297, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_v_splice, __pyx_v_i, __pyx_t_8, Py_ssize_t, 1, PyInt_FromSsize_t, 1, 1, 1) < 0)) __PYX_ERR(0, 2297, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - - /* "_rnaseq_utils.pyx":2296 - * ranges[i+1] = (g[1], ranges[i+1][1]) - * - * if self.dataset.has_genome and self.remove_noncanonical: # Filter noncanonical junctions # <<<<<<<<<<<<<< - * splice[i] = junction_is_canonical(self.dataset.genome, chrom, g[0], g[1], alignment_strand) + /* "_rnaseq_utils.pyx":2323 + * strand = 0 + * strand += int((chrom, start, end, 1) in self.dataset.sj_set) + * strand -= int((chrom, start, end, -1) in self.dataset.sj_set) # <<<<<<<<<<<<<< + * return strand * */ - } + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_chrom); + __Pyx_GIVEREF(__pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_chrom); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_1); + __Pyx_INCREF(__pyx_int_neg_1); + __Pyx_GIVEREF(__pyx_int_neg_1); + PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_int_neg_1); + __pyx_t_3 = 0; + __pyx_t_1 = 0; + if (unlikely(__pyx_v_self->dataset->sj_set == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + __PYX_ERR(0, 2323, __pyx_L1_error) } + __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_t_2, __pyx_v_self->dataset->sj_set, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyInt_Type)), __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2323, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_v_strand = __pyx_t_6; - /* "_rnaseq_utils.pyx":2299 - * splice[i] = junction_is_canonical(self.dataset.genome, chrom, g[0], g[1], alignment_strand) - * - * return ranges, splice # <<<<<<<<<<<<<< + /* "_rnaseq_utils.pyx":2324 + * strand += int((chrom, start, end, 1) in self.dataset.sj_set) + * strand -= int((chrom, start, end, -1) in self.dataset.sj_set) + * return strand # <<<<<<<<<<<<<< * * cdef int orient_read_by_softclip(self, str seq, int head, int tail, int eval_length=15): */ - __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2299, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_INCREF(__pyx_v_ranges); - __Pyx_GIVEREF(__pyx_v_ranges); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_ranges); - __Pyx_INCREF(__pyx_v_splice); - __Pyx_GIVEREF(__pyx_v_splice); - PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v_splice); - __pyx_r = ((PyObject*)__pyx_t_8); - __pyx_t_8 = 0; + __pyx_r = __pyx_v_strand; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2274 + /* "_rnaseq_utils.pyx":2318 * return alignment_strand * - * cdef tuple get_splice_info(self, list ranges, set introns, str chrom, int alignment_strand, bint remove_noncanonical=False): # <<<<<<<<<<<<<< - * """Returns a list of booleans denoting whether each gap - * between ranges is a splice junction or not on the given alignment strand.""" + * cdef int check_sjdb(self, str chrom, int start, int end): # <<<<<<<<<<<<<< + * '''Returns the strand of''' + * cdef int strand */ /* function exit code */ __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_8); - __Pyx_AddTraceback("_rnaseq_utils.BAMobject.get_splice_info", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); + __Pyx_WriteUnraisable("_rnaseq_utils.BAMobject.check_sjdb", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0); __pyx_r = 0; __pyx_L0:; - __Pyx_XDECREF(__pyx_v_splice); - __Pyx_XDECREF(__pyx_v_junction); - __Pyx_XDECREF(__pyx_v_gaps); - __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "_rnaseq_utils.pyx":2301 - * return ranges, splice +/* "_rnaseq_utils.pyx":2326 + * return strand * * cdef int orient_read_by_softclip(self, str seq, int head, int tail, int eval_length=15): # <<<<<<<<<<<<<< * """Assume end labels are present as softclipped sequences on @@ -56312,8 +57180,8 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p int __pyx_v_strand; int __pyx_v_minus_score; int __pyx_v_plus_score; - Py_UCS4 __pyx_9genexpr46__pyx_v_s; - Py_UCS4 __pyx_9genexpr47__pyx_v_s; + Py_UCS4 __pyx_9genexpr48__pyx_v_s; + Py_UCS4 __pyx_9genexpr49__pyx_v_s; int __pyx_r; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -56338,7 +57206,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p } } - /* "_rnaseq_utils.pyx":2307 + /* "_rnaseq_utils.pyx":2332 * cdef int strand, minus_score, plus_score * cdef str headseq, tailseq, i * strand = 0 # <<<<<<<<<<<<<< @@ -56347,7 +57215,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p */ __pyx_v_strand = 0; - /* "_rnaseq_utils.pyx":2308 + /* "_rnaseq_utils.pyx":2333 * cdef str headseq, tailseq, i * strand = 0 * minus_score = sum([1 for s in seq[max(0,head-eval_length):head] if s == 'T']) # <<<<<<<<<<<<<< @@ -56355,11 +57223,11 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p * if plus_score > minus_score and plus_score >= (1-self.error_rate)*eval_length: */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2308, __pyx_L1_error) + __PYX_ERR(0, 2333, __pyx_L1_error) } __pyx_t_2 = (__pyx_v_head - __pyx_v_eval_length); __pyx_t_3 = 0; @@ -56368,27 +57236,27 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p } else { __pyx_t_4 = __pyx_t_3; } - __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_seq, __pyx_t_4, __pyx_v_head); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_seq, __pyx_t_4, __pyx_v_head); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_init_unicode_iteration(__pyx_t_5, (&__pyx_t_7), (&__pyx_t_8), (&__pyx_t_2)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_9 = __Pyx_init_unicode_iteration(__pyx_t_5, (&__pyx_t_7), (&__pyx_t_8), (&__pyx_t_2)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2333, __pyx_L1_error) for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_7; __pyx_t_10++) { __pyx_t_6 = __pyx_t_10; - __pyx_9genexpr46__pyx_v_s = __Pyx_PyUnicode_READ(__pyx_t_2, __pyx_t_8, __pyx_t_6); - __pyx_t_11 = ((__pyx_9genexpr46__pyx_v_s == 84) != 0); + __pyx_9genexpr48__pyx_v_s = __Pyx_PyUnicode_READ(__pyx_t_2, __pyx_t_8, __pyx_t_6); + __pyx_t_11 = ((__pyx_9genexpr48__pyx_v_s == 84) != 0); if (__pyx_t_11) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_int_1))) __PYX_ERR(0, 2308, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_int_1))) __PYX_ERR(0, 2333, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } /* exit inner scope */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2308, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2333, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_minus_score = __pyx_t_2; - /* "_rnaseq_utils.pyx":2309 + /* "_rnaseq_utils.pyx":2334 * strand = 0 * minus_score = sum([1 for s in seq[max(0,head-eval_length):head] if s == 'T']) * plus_score = sum([1 for s in seq[-tail:len(seq)-tail+eval_length] if s == 'A']) # <<<<<<<<<<<<<< @@ -56396,38 +57264,38 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p * strand = 1 */ { /* enter inner scope */ - __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2309, __pyx_L1_error) + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2309, __pyx_L1_error) + __PYX_ERR(0, 2334, __pyx_L1_error) } if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2309, __pyx_L1_error) + __PYX_ERR(0, 2334, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_seq); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2309, __pyx_L1_error) - __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_seq, (-__pyx_v_tail), ((__pyx_t_7 - __pyx_v_tail) + __pyx_v_eval_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2309, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_seq); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2334, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Substring(__pyx_v_seq, (-__pyx_v_tail), ((__pyx_t_7 - __pyx_v_tail) + __pyx_v_eval_length)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_init_unicode_iteration(__pyx_t_1, (&__pyx_t_6), (&__pyx_t_8), (&__pyx_t_2)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2309, __pyx_L1_error) + __pyx_t_9 = __Pyx_init_unicode_iteration(__pyx_t_1, (&__pyx_t_6), (&__pyx_t_8), (&__pyx_t_2)); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 2334, __pyx_L1_error) for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_6; __pyx_t_10++) { __pyx_t_7 = __pyx_t_10; - __pyx_9genexpr47__pyx_v_s = __Pyx_PyUnicode_READ(__pyx_t_2, __pyx_t_8, __pyx_t_7); - __pyx_t_11 = ((__pyx_9genexpr47__pyx_v_s == 65) != 0); + __pyx_9genexpr49__pyx_v_s = __Pyx_PyUnicode_READ(__pyx_t_2, __pyx_t_8, __pyx_t_7); + __pyx_t_11 = ((__pyx_9genexpr49__pyx_v_s == 65) != 0); if (__pyx_t_11) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_int_1))) __PYX_ERR(0, 2309, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_int_1))) __PYX_ERR(0, 2334, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } /* exit inner scope */ - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2309, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_builtin_sum, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2309, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2334, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_plus_score = __pyx_t_2; - /* "_rnaseq_utils.pyx":2310 + /* "_rnaseq_utils.pyx":2335 * minus_score = sum([1 for s in seq[max(0,head-eval_length):head] if s == 'T']) * plus_score = sum([1 for s in seq[-tail:len(seq)-tail+eval_length] if s == 'A']) * if plus_score > minus_score and plus_score >= (1-self.error_rate)*eval_length: # <<<<<<<<<<<<<< @@ -56445,7 +57313,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p __pyx_L10_bool_binop_done:; if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":2311 + /* "_rnaseq_utils.pyx":2336 * plus_score = sum([1 for s in seq[-tail:len(seq)-tail+eval_length] if s == 'A']) * if plus_score > minus_score and plus_score >= (1-self.error_rate)*eval_length: * strand = 1 # <<<<<<<<<<<<<< @@ -56454,7 +57322,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p */ __pyx_v_strand = 1; - /* "_rnaseq_utils.pyx":2310 + /* "_rnaseq_utils.pyx":2335 * minus_score = sum([1 for s in seq[max(0,head-eval_length):head] if s == 'T']) * plus_score = sum([1 for s in seq[-tail:len(seq)-tail+eval_length] if s == 'A']) * if plus_score > minus_score and plus_score >= (1-self.error_rate)*eval_length: # <<<<<<<<<<<<<< @@ -56464,7 +57332,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p goto __pyx_L9; } - /* "_rnaseq_utils.pyx":2312 + /* "_rnaseq_utils.pyx":2337 * if plus_score > minus_score and plus_score >= (1-self.error_rate)*eval_length: * strand = 1 * elif minus_score > plus_score and minus_score >= (1-self.error_rate)*eval_length: # <<<<<<<<<<<<<< @@ -56482,7 +57350,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p __pyx_L12_bool_binop_done:; if (__pyx_t_11) { - /* "_rnaseq_utils.pyx":2313 + /* "_rnaseq_utils.pyx":2338 * strand = 1 * elif minus_score > plus_score and minus_score >= (1-self.error_rate)*eval_length: * strand = -1 # <<<<<<<<<<<<<< @@ -56491,7 +57359,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p */ __pyx_v_strand = -1; - /* "_rnaseq_utils.pyx":2312 + /* "_rnaseq_utils.pyx":2337 * if plus_score > minus_score and plus_score >= (1-self.error_rate)*eval_length: * strand = 1 * elif minus_score > plus_score and minus_score >= (1-self.error_rate)*eval_length: # <<<<<<<<<<<<<< @@ -56501,7 +57369,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p } __pyx_L9:; - /* "_rnaseq_utils.pyx":2315 + /* "_rnaseq_utils.pyx":2340 * strand = -1 * * return strand # <<<<<<<<<<<<<< @@ -56511,8 +57379,8 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p __pyx_r = __pyx_v_strand; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2301 - * return ranges, splice + /* "_rnaseq_utils.pyx":2326 + * return strand * * cdef int orient_read_by_softclip(self, str seq, int head, int tail, int eval_length=15): # <<<<<<<<<<<<<< * """Assume end labels are present as softclipped sequences on @@ -56530,7 +57398,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":2317 +/* "_rnaseq_utils.pyx":2342 * return strand * * cdef (bint, bint, bint) filter_labels_by_softclip_length(self, bint s_tag, bint e_tag, bint capped, bint fiveprime, bint threeprime, int strand, int head, int tail, int max_headclip): # <<<<<<<<<<<<<< @@ -56546,7 +57414,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil int __pyx_t_3; __Pyx_RefNannySetupContext("filter_labels_by_softclip_length", 0); - /* "_rnaseq_utils.pyx":2320 + /* "_rnaseq_utils.pyx":2345 * """Determines whether the s_tag, e_tag and capped parameters * should be removed an alignment that has softclipping on its edges.""" * if strand == 0: # <<<<<<<<<<<<<< @@ -56556,7 +57424,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_t_1 = ((__pyx_v_strand == 0) != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2321 + /* "_rnaseq_utils.pyx":2346 * should be removed an alignment that has softclipping on its edges.""" * if strand == 0: * return False, False, False # <<<<<<<<<<<<<< @@ -56569,7 +57437,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2320 + /* "_rnaseq_utils.pyx":2345 * """Determines whether the s_tag, e_tag and capped parameters * should be removed an alignment that has softclipping on its edges.""" * if strand == 0: # <<<<<<<<<<<<<< @@ -56578,7 +57446,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil */ } - /* "_rnaseq_utils.pyx":2323 + /* "_rnaseq_utils.pyx":2348 * return False, False, False * * if not fiveprime: # <<<<<<<<<<<<<< @@ -56588,7 +57456,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_t_1 = ((!(__pyx_v_fiveprime != 0)) != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2324 + /* "_rnaseq_utils.pyx":2349 * * if not fiveprime: * s_tag = capped = False # <<<<<<<<<<<<<< @@ -56598,7 +57466,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_v_s_tag = 0; __pyx_v_capped = 0; - /* "_rnaseq_utils.pyx":2323 + /* "_rnaseq_utils.pyx":2348 * return False, False, False * * if not fiveprime: # <<<<<<<<<<<<<< @@ -56608,7 +57476,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil goto __pyx_L4; } - /* "_rnaseq_utils.pyx":2326 + /* "_rnaseq_utils.pyx":2351 * s_tag = capped = False * else: * if strand == 1 and (head == -1 or head > max_headclip): # <<<<<<<<<<<<<< @@ -56633,7 +57501,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_L6_bool_binop_done:; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2327 + /* "_rnaseq_utils.pyx":2352 * else: * if strand == 1 and (head == -1 or head > max_headclip): * s_tag = capped = False # <<<<<<<<<<<<<< @@ -56643,7 +57511,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_v_s_tag = 0; __pyx_v_capped = 0; - /* "_rnaseq_utils.pyx":2326 + /* "_rnaseq_utils.pyx":2351 * s_tag = capped = False * else: * if strand == 1 and (head == -1 or head > max_headclip): # <<<<<<<<<<<<<< @@ -56653,7 +57521,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil goto __pyx_L5; } - /* "_rnaseq_utils.pyx":2328 + /* "_rnaseq_utils.pyx":2353 * if strand == 1 and (head == -1 or head > max_headclip): * s_tag = capped = False * elif strand == -1 and (tail == -1 or tail > max_headclip): # <<<<<<<<<<<<<< @@ -56677,7 +57545,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_L9_bool_binop_done:; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2329 + /* "_rnaseq_utils.pyx":2354 * s_tag = capped = False * elif strand == -1 and (tail == -1 or tail > max_headclip): * s_tag = capped = False # <<<<<<<<<<<<<< @@ -56687,7 +57555,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_v_s_tag = 0; __pyx_v_capped = 0; - /* "_rnaseq_utils.pyx":2328 + /* "_rnaseq_utils.pyx":2353 * if strand == 1 and (head == -1 or head > max_headclip): * s_tag = capped = False * elif strand == -1 and (tail == -1 or tail > max_headclip): # <<<<<<<<<<<<<< @@ -56699,7 +57567,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil } __pyx_L4:; - /* "_rnaseq_utils.pyx":2331 + /* "_rnaseq_utils.pyx":2356 * s_tag = capped = False * * if not threeprime: # <<<<<<<<<<<<<< @@ -56709,7 +57577,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_t_1 = ((!(__pyx_v_threeprime != 0)) != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2332 + /* "_rnaseq_utils.pyx":2357 * * if not threeprime: * e_tag = False # <<<<<<<<<<<<<< @@ -56718,7 +57586,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil */ __pyx_v_e_tag = 0; - /* "_rnaseq_utils.pyx":2331 + /* "_rnaseq_utils.pyx":2356 * s_tag = capped = False * * if not threeprime: # <<<<<<<<<<<<<< @@ -56728,7 +57596,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil goto __pyx_L12; } - /* "_rnaseq_utils.pyx":2334 + /* "_rnaseq_utils.pyx":2359 * e_tag = False * else: * if strand == 1 and tail == -1: # <<<<<<<<<<<<<< @@ -56747,7 +57615,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_L14_bool_binop_done:; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2335 + /* "_rnaseq_utils.pyx":2360 * else: * if strand == 1 and tail == -1: * e_tag = False # <<<<<<<<<<<<<< @@ -56756,7 +57624,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil */ __pyx_v_e_tag = 0; - /* "_rnaseq_utils.pyx":2334 + /* "_rnaseq_utils.pyx":2359 * e_tag = False * else: * if strand == 1 and tail == -1: # <<<<<<<<<<<<<< @@ -56766,7 +57634,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil goto __pyx_L13; } - /* "_rnaseq_utils.pyx":2336 + /* "_rnaseq_utils.pyx":2361 * if strand == 1 and tail == -1: * e_tag = False * elif strand == -1 and head == -1: # <<<<<<<<<<<<<< @@ -56784,7 +57652,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_L16_bool_binop_done:; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2337 + /* "_rnaseq_utils.pyx":2362 * e_tag = False * elif strand == -1 and head == -1: * e_tag = False # <<<<<<<<<<<<<< @@ -56793,7 +57661,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil */ __pyx_v_e_tag = 0; - /* "_rnaseq_utils.pyx":2336 + /* "_rnaseq_utils.pyx":2361 * if strand == 1 and tail == -1: * e_tag = False * elif strand == -1 and head == -1: # <<<<<<<<<<<<<< @@ -56805,7 +57673,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil } __pyx_L12:; - /* "_rnaseq_utils.pyx":2339 + /* "_rnaseq_utils.pyx":2364 * e_tag = False * * return s_tag, e_tag, capped # <<<<<<<<<<<<<< @@ -56818,7 +57686,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2317 + /* "_rnaseq_utils.pyx":2342 * return strand * * cdef (bint, bint, bint) filter_labels_by_softclip_length(self, bint s_tag, bint e_tag, bint capped, bint fiveprime, bint threeprime, int strand, int head, int tail, int max_headclip): # <<<<<<<<<<<<<< @@ -56832,7 +57700,7 @@ static __pyx_ctuple_int__and_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_fil return __pyx_r; } -/* "_rnaseq_utils.pyx":2341 +/* "_rnaseq_utils.pyx":2366 * return s_tag, e_tag, capped * * cdef bint untemplated_upstream_g(self, int strand, int head, int tail, str seq, str chrom, list ranges): # <<<<<<<<<<<<<< @@ -56856,7 +57724,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py int __pyx_clineno = 0; __Pyx_RefNannySetupContext("untemplated_upstream_g", 0); - /* "_rnaseq_utils.pyx":2345 + /* "_rnaseq_utils.pyx":2370 * is an oligomer of G and (2) if that oligomer does not match the genome. * Returns True if evidence supports a cap.""" * if strand == 1: # <<<<<<<<<<<<<< @@ -56866,7 +57734,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":2346 + /* "_rnaseq_utils.pyx":2371 * Returns True if evidence supports a cap.""" * if strand == 1: * if head <= 0 or head > 4: # <<<<<<<<<<<<<< @@ -56884,7 +57752,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2347 + /* "_rnaseq_utils.pyx":2372 * if strand == 1: * if head <= 0 or head > 4: * return False # <<<<<<<<<<<<<< @@ -56894,7 +57762,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2346 + /* "_rnaseq_utils.pyx":2371 * Returns True if evidence supports a cap.""" * if strand == 1: * if head <= 0 or head > 4: # <<<<<<<<<<<<<< @@ -56903,7 +57771,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py */ } - /* "_rnaseq_utils.pyx":2349 + /* "_rnaseq_utils.pyx":2374 * return False * * if seq[head-1] == 'G': # Softclipped nucleotides are G # <<<<<<<<<<<<<< @@ -56911,11 +57779,11 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py * return True # One or more upstream untemplated Gs were detected */ __pyx_t_3 = (__pyx_v_head - 1); - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_seq, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 2349, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_seq, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 2374, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_4 == 71) != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2350 + /* "_rnaseq_utils.pyx":2375 * * if seq[head-1] == 'G': # Softclipped nucleotides are G * if get_flank(self.dataset.genome, chrom, ranges[0][0], 1, 'S', 1) != 'G': # The flanking nucleotide is NOT G # <<<<<<<<<<<<<< @@ -56926,24 +57794,24 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py __Pyx_INCREF(__pyx_t_5); if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2350, __pyx_L1_error) + __PYX_ERR(0, 2375, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2350, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2350, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2350, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_5), __pyx_v_chrom, __pyx_t_8, 1, __pyx_n_u_S, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2350, __pyx_L1_error) + __pyx_t_7 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_5), __pyx_v_chrom, __pyx_t_8, 1, __pyx_n_u_S, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_G, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2350, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_7, __pyx_n_u_G, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2375, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":2351 + /* "_rnaseq_utils.pyx":2376 * if seq[head-1] == 'G': # Softclipped nucleotides are G * if get_flank(self.dataset.genome, chrom, ranges[0][0], 1, 'S', 1) != 'G': # The flanking nucleotide is NOT G * return True # One or more upstream untemplated Gs were detected # <<<<<<<<<<<<<< @@ -56953,7 +57821,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2350 + /* "_rnaseq_utils.pyx":2375 * * if seq[head-1] == 'G': # Softclipped nucleotides are G * if get_flank(self.dataset.genome, chrom, ranges[0][0], 1, 'S', 1) != 'G': # The flanking nucleotide is NOT G # <<<<<<<<<<<<<< @@ -56962,7 +57830,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py */ } - /* "_rnaseq_utils.pyx":2353 + /* "_rnaseq_utils.pyx":2378 * return True # One or more upstream untemplated Gs were detected * else: * return False # <<<<<<<<<<<<<< @@ -56974,7 +57842,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py goto __pyx_L0; } - /* "_rnaseq_utils.pyx":2349 + /* "_rnaseq_utils.pyx":2374 * return False * * if seq[head-1] == 'G': # Softclipped nucleotides are G # <<<<<<<<<<<<<< @@ -56983,7 +57851,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py */ } - /* "_rnaseq_utils.pyx":2345 + /* "_rnaseq_utils.pyx":2370 * is an oligomer of G and (2) if that oligomer does not match the genome. * Returns True if evidence supports a cap.""" * if strand == 1: # <<<<<<<<<<<<<< @@ -56993,7 +57861,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py break; case -1L: - /* "_rnaseq_utils.pyx":2355 + /* "_rnaseq_utils.pyx":2380 * return False * elif strand == -1: * if tail <= 0 or tail > 4: # <<<<<<<<<<<<<< @@ -57011,7 +57879,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py __pyx_L9_bool_binop_done:; if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":2356 + /* "_rnaseq_utils.pyx":2381 * elif strand == -1: * if tail <= 0 or tail > 4: * return False # <<<<<<<<<<<<<< @@ -57021,7 +57889,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2355 + /* "_rnaseq_utils.pyx":2380 * return False * elif strand == -1: * if tail <= 0 or tail > 4: # <<<<<<<<<<<<<< @@ -57030,7 +57898,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py */ } - /* "_rnaseq_utils.pyx":2358 + /* "_rnaseq_utils.pyx":2383 * return False * * if seq[-tail] == 'C': # Sofclipped nucleotides are (antisense) G # <<<<<<<<<<<<<< @@ -57038,11 +57906,11 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py * return True */ __pyx_t_8 = (-__pyx_v_tail); - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_seq, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 2358, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_seq, __pyx_t_8, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 2383, __pyx_L1_error) __pyx_t_2 = ((__pyx_t_4 == 67) != 0); if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":2359 + /* "_rnaseq_utils.pyx":2384 * * if seq[-tail] == 'C': # Sofclipped nucleotides are (antisense) G * if get_flank(self.dataset.genome, chrom, ranges[-1][-1]-1, -1, 'S', 1) != 'G': # The flanking nucleotide is NOT G # <<<<<<<<<<<<<< @@ -57053,27 +57921,27 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py __Pyx_INCREF(__pyx_t_7); if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2359, __pyx_L1_error) + __PYX_ERR(0, 2384, __pyx_L1_error) } - __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2359, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2359, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2359, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_SubtractObjC(__pyx_t_6, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2359, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_8 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_7), __pyx_v_chrom, __pyx_t_8, -1, __pyx_n_u_S, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2359, __pyx_L1_error) + __pyx_t_5 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_7), __pyx_v_chrom, __pyx_t_8, -1, __pyx_n_u_S, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_G, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2359, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_t_5, __pyx_n_u_G, Py_NE)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = (__pyx_t_2 != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2360 + /* "_rnaseq_utils.pyx":2385 * if seq[-tail] == 'C': # Sofclipped nucleotides are (antisense) G * if get_flank(self.dataset.genome, chrom, ranges[-1][-1]-1, -1, 'S', 1) != 'G': # The flanking nucleotide is NOT G * return True # <<<<<<<<<<<<<< @@ -57083,7 +57951,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2359 + /* "_rnaseq_utils.pyx":2384 * * if seq[-tail] == 'C': # Sofclipped nucleotides are (antisense) G * if get_flank(self.dataset.genome, chrom, ranges[-1][-1]-1, -1, 'S', 1) != 'G': # The flanking nucleotide is NOT G # <<<<<<<<<<<<<< @@ -57092,7 +57960,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py */ } - /* "_rnaseq_utils.pyx":2362 + /* "_rnaseq_utils.pyx":2387 * return True * else: * return False # <<<<<<<<<<<<<< @@ -57104,7 +57972,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py goto __pyx_L0; } - /* "_rnaseq_utils.pyx":2358 + /* "_rnaseq_utils.pyx":2383 * return False * * if seq[-tail] == 'C': # Sofclipped nucleotides are (antisense) G # <<<<<<<<<<<<<< @@ -57113,7 +57981,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py */ } - /* "_rnaseq_utils.pyx":2354 + /* "_rnaseq_utils.pyx":2379 * else: * return False * elif strand == -1: # <<<<<<<<<<<<<< @@ -57124,7 +57992,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py default: break; } - /* "_rnaseq_utils.pyx":2341 + /* "_rnaseq_utils.pyx":2366 * return s_tag, e_tag, capped * * cdef bint untemplated_upstream_g(self, int strand, int head, int tail, str seq, str chrom, list ranges): # <<<<<<<<<<<<<< @@ -57146,7 +58014,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g(struct __py return __pyx_r; } -/* "_rnaseq_utils.pyx":2364 +/* "_rnaseq_utils.pyx":2389 * return False * * cdef (bint, int) softclipped_polya(self, int strand, int head, int tail, str seq, str chrom, list ranges): # <<<<<<<<<<<<<< @@ -57175,7 +58043,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("softclipped_polya", 0); - /* "_rnaseq_utils.pyx":2369 + /* "_rnaseq_utils.pyx":2394 * cdef str l * cdef int trim, trim_end, polya_length * if strand >= 0: # <<<<<<<<<<<<<< @@ -57185,7 +58053,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ __pyx_t_1 = ((__pyx_v_strand >= 0) != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2370 + /* "_rnaseq_utils.pyx":2395 * cdef int trim, trim_end, polya_length * if strand >= 0: * polya_length = min(tail, 10) # <<<<<<<<<<<<<< @@ -57201,7 +58069,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ } __pyx_v_polya_length = __pyx_t_4; - /* "_rnaseq_utils.pyx":2371 + /* "_rnaseq_utils.pyx":2396 * if strand >= 0: * polya_length = min(tail, 10) * trim_end = len(seq) if polya_length == tail else -tail+polya_length # <<<<<<<<<<<<<< @@ -57211,16 +58079,16 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ if (((__pyx_v_polya_length == __pyx_v_tail) != 0)) { if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2371, __pyx_L1_error) + __PYX_ERR(0, 2396, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_seq); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2371, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_seq); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2396, __pyx_L1_error) __pyx_t_5 = __pyx_t_6; } else { __pyx_t_5 = ((-__pyx_v_tail) + __pyx_v_polya_length); } __pyx_v_trim_end = __pyx_t_5; - /* "_rnaseq_utils.pyx":2372 + /* "_rnaseq_utils.pyx":2397 * polya_length = min(tail, 10) * trim_end = len(seq) if polya_length == tail else -tail+polya_length * if tail > 1 and set(seq[-tail:trim_end]) == {'A'}: # Softclipped nucleotides are A # <<<<<<<<<<<<<< @@ -57235,26 +58103,26 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ } if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2372, __pyx_L1_error) + __PYX_ERR(0, 2397, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyUnicode_Substring(__pyx_v_seq, (-__pyx_v_tail), __pyx_v_trim_end); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2372, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyUnicode_Substring(__pyx_v_seq, (-__pyx_v_tail), __pyx_v_trim_end); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PySet_New(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2372, __pyx_L1_error) + __pyx_t_9 = PySet_New(__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2372, __pyx_L1_error) + __pyx_t_8 = PySet_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - if (PySet_Add(__pyx_t_8, __pyx_n_u_A) < 0) __PYX_ERR(0, 2372, __pyx_L1_error) - __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2372, __pyx_L1_error) + if (PySet_Add(__pyx_t_8, __pyx_n_u_A) < 0) __PYX_ERR(0, 2397, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_t_9, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2397, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2372, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2397, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __pyx_t_7; __pyx_L5_bool_binop_done:; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2373 + /* "_rnaseq_utils.pyx":2398 * trim_end = len(seq) if polya_length == tail else -tail+polya_length * if tail > 1 and set(seq[-tail:trim_end]) == {'A'}: # Softclipped nucleotides are A * if get_flank(self.dataset.genome, chrom, ranges[-1][-1]-1, 1, 'E', tail) != 'A'*polya_length: # The flanking nucleotides are NOT A # <<<<<<<<<<<<<< @@ -57265,32 +58133,32 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ __Pyx_INCREF(__pyx_t_10); if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2373, __pyx_L1_error) + __PYX_ERR(0, 2398, __pyx_L1_error) } - __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_t_9, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_SubtractObjC(__pyx_t_9, __pyx_int_1, 1, 0, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_10), __pyx_v_chrom, __pyx_t_3, 1, __pyx_n_u_E, __pyx_v_tail, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_8 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_10), __pyx_v_chrom, __pyx_t_3, 1, __pyx_n_u_E, __pyx_v_tail, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_polya_length); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_polya_length); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = PyNumber_Multiply(__pyx_n_u_A, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_9 = PyNumber_Multiply(__pyx_n_u_A, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_t_9, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2373, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_t_9, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2375 + /* "_rnaseq_utils.pyx":2400 * if get_flank(self.dataset.genome, chrom, ranges[-1][-1]-1, 1, 'E', tail) != 'A'*polya_length: # The flanking nucleotides are NOT A * # One or more downstream untemplated As were detected * return True, 1 # <<<<<<<<<<<<<< @@ -57302,7 +58170,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ __pyx_r = __pyx_t_11; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2373 + /* "_rnaseq_utils.pyx":2398 * trim_end = len(seq) if polya_length == tail else -tail+polya_length * if tail > 1 and set(seq[-tail:trim_end]) == {'A'}: # Softclipped nucleotides are A * if get_flank(self.dataset.genome, chrom, ranges[-1][-1]-1, 1, 'E', tail) != 'A'*polya_length: # The flanking nucleotides are NOT A # <<<<<<<<<<<<<< @@ -57311,7 +58179,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ */ } - /* "_rnaseq_utils.pyx":2377 + /* "_rnaseq_utils.pyx":2402 * return True, 1 * else: * return False, strand # <<<<<<<<<<<<<< @@ -57325,7 +58193,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ goto __pyx_L0; } - /* "_rnaseq_utils.pyx":2372 + /* "_rnaseq_utils.pyx":2397 * polya_length = min(tail, 10) * trim_end = len(seq) if polya_length == tail else -tail+polya_length * if tail > 1 and set(seq[-tail:trim_end]) == {'A'}: # Softclipped nucleotides are A # <<<<<<<<<<<<<< @@ -57334,7 +58202,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ */ } - /* "_rnaseq_utils.pyx":2369 + /* "_rnaseq_utils.pyx":2394 * cdef str l * cdef int trim, trim_end, polya_length * if strand >= 0: # <<<<<<<<<<<<<< @@ -57343,7 +58211,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ */ } - /* "_rnaseq_utils.pyx":2379 + /* "_rnaseq_utils.pyx":2404 * return False, strand * * if strand <= 0: # <<<<<<<<<<<<<< @@ -57353,7 +58221,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ __pyx_t_1 = ((__pyx_v_strand <= 0) != 0); if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2380 + /* "_rnaseq_utils.pyx":2405 * * if strand <= 0: * polya_length = min(head, 10) # <<<<<<<<<<<<<< @@ -57369,7 +58237,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ } __pyx_v_polya_length = __pyx_t_2; - /* "_rnaseq_utils.pyx":2381 + /* "_rnaseq_utils.pyx":2406 * if strand <= 0: * polya_length = min(head, 10) * if head > 1 and set(seq[head-polya_length:head]) == {'T'}: # Sofclipped nucleotides are (antisense) A # <<<<<<<<<<<<<< @@ -57384,26 +58252,26 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ } if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2381, __pyx_L1_error) + __PYX_ERR(0, 2406, __pyx_L1_error) } - __pyx_t_9 = __Pyx_PyUnicode_Substring(__pyx_v_seq, (__pyx_v_head - __pyx_v_polya_length), __pyx_v_head); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2381, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyUnicode_Substring(__pyx_v_seq, (__pyx_v_head - __pyx_v_polya_length), __pyx_v_head); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = PySet_New(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2381, __pyx_L1_error) + __pyx_t_8 = PySet_New(__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = PySet_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2381, __pyx_L1_error) + __pyx_t_9 = PySet_New(0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (PySet_Add(__pyx_t_9, __pyx_n_u_T) < 0) __PYX_ERR(0, 2381, __pyx_L1_error) - __pyx_t_10 = PyObject_RichCompare(__pyx_t_8, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2381, __pyx_L1_error) + if (PySet_Add(__pyx_t_9, __pyx_n_u_T) < 0) __PYX_ERR(0, 2406, __pyx_L1_error) + __pyx_t_10 = PyObject_RichCompare(__pyx_t_8, __pyx_t_9, Py_EQ); __Pyx_XGOTREF(__pyx_t_10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2381, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_10); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2406, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_1 = __pyx_t_7; __pyx_L10_bool_binop_done:; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2382 + /* "_rnaseq_utils.pyx":2407 * polya_length = min(head, 10) * if head > 1 and set(seq[head-polya_length:head]) == {'T'}: # Sofclipped nucleotides are (antisense) A * if get_flank(self.dataset.genome, chrom, ranges[0][0], -1, 'E', head) != 'A'*polya_length: # <<<<<<<<<<<<<< @@ -57414,29 +58282,29 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ __Pyx_INCREF(__pyx_t_10); if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2382, __pyx_L1_error) + __PYX_ERR(0, 2407, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_10), __pyx_v_chrom, __pyx_t_3, -1, __pyx_n_u_E, __pyx_v_head, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_8 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_10), __pyx_v_chrom, __pyx_t_3, -1, __pyx_n_u_E, __pyx_v_head, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_polya_length); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_From_int(__pyx_v_polya_length); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = PyNumber_Multiply(__pyx_n_u_A, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_9 = PyNumber_Multiply(__pyx_n_u_A, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_t_9, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2382, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_t_9, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; if (__pyx_t_1) { - /* "_rnaseq_utils.pyx":2384 + /* "_rnaseq_utils.pyx":2409 * if get_flank(self.dataset.genome, chrom, ranges[0][0], -1, 'E', head) != 'A'*polya_length: * # One or more upstream untemplated Ts were detected * return True, -1 # <<<<<<<<<<<<<< @@ -57448,7 +58316,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ __pyx_r = __pyx_t_11; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2382 + /* "_rnaseq_utils.pyx":2407 * polya_length = min(head, 10) * if head > 1 and set(seq[head-polya_length:head]) == {'T'}: # Sofclipped nucleotides are (antisense) A * if get_flank(self.dataset.genome, chrom, ranges[0][0], -1, 'E', head) != 'A'*polya_length: # <<<<<<<<<<<<<< @@ -57457,7 +58325,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ */ } - /* "_rnaseq_utils.pyx":2386 + /* "_rnaseq_utils.pyx":2411 * return True, -1 * else: * return False, strand # <<<<<<<<<<<<<< @@ -57471,7 +58339,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ goto __pyx_L0; } - /* "_rnaseq_utils.pyx":2381 + /* "_rnaseq_utils.pyx":2406 * if strand <= 0: * polya_length = min(head, 10) * if head > 1 and set(seq[head-polya_length:head]) == {'T'}: # Sofclipped nucleotides are (antisense) A # <<<<<<<<<<<<<< @@ -57480,7 +58348,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ */ } - /* "_rnaseq_utils.pyx":2379 + /* "_rnaseq_utils.pyx":2404 * return False, strand * * if strand <= 0: # <<<<<<<<<<<<<< @@ -57489,7 +58357,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ */ } - /* "_rnaseq_utils.pyx":2388 + /* "_rnaseq_utils.pyx":2413 * return False, strand * * return False, strand # <<<<<<<<<<<<<< @@ -57501,7 +58369,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ __pyx_r = __pyx_t_11; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2364 + /* "_rnaseq_utils.pyx":2389 * return False * * cdef (bint, int) softclipped_polya(self, int strand, int head, int tail, str seq, str chrom, list ranges): # <<<<<<<<<<<<<< @@ -57521,7 +58389,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_9BAMobject_softclipped_ return __pyx_r; } -/* "_rnaseq_utils.pyx":2431 +/* "_rnaseq_utils.pyx":2456 * * * cdef void restore_terminal_mismatches(self, int strand, int head, int tail, list ranges): # <<<<<<<<<<<<<< @@ -57543,7 +58411,7 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO int __pyx_clineno = 0; __Pyx_RefNannySetupContext("restore_terminal_mismatches", 0); - /* "_rnaseq_utils.pyx":2434 + /* "_rnaseq_utils.pyx":2459 * """Updates the mapping ranges of a read with a softclipped * sequenced added back to one end.""" * if strand == 1: # <<<<<<<<<<<<<< @@ -57553,7 +58421,7 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO switch (__pyx_v_strand) { case 1: - /* "_rnaseq_utils.pyx":2435 + /* "_rnaseq_utils.pyx":2460 * sequenced added back to one end.""" * if strand == 1: * if 0 < tail < 4: # Short right clip exists # <<<<<<<<<<<<<< @@ -57567,7 +58435,7 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":2436 + /* "_rnaseq_utils.pyx":2461 * if strand == 1: * if 0 < tail < 4: # Short right clip exists * ranges[-1] = (ranges[-1][0],ranges[-1][1]+tail) # <<<<<<<<<<<<<< @@ -57576,29 +58444,29 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2436, __pyx_L1_error) + __PYX_ERR(0, 2461, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2436, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2436, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2436, __pyx_L1_error) + __PYX_ERR(0, 2461, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2436, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ranges, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2436, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2436, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_tail); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2436, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2436, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); @@ -57608,12 +58476,12 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO __pyx_t_6 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2436, __pyx_L1_error) + __PYX_ERR(0, 2461, __pyx_L1_error) } - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, -1L, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 2436, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, -1L, __pyx_t_3, long, 1, __Pyx_PyInt_From_long, 1, 1, 1) < 0)) __PYX_ERR(0, 2461, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "_rnaseq_utils.pyx":2435 + /* "_rnaseq_utils.pyx":2460 * sequenced added back to one end.""" * if strand == 1: * if 0 < tail < 4: # Short right clip exists # <<<<<<<<<<<<<< @@ -57622,7 +58490,7 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO */ } - /* "_rnaseq_utils.pyx":2434 + /* "_rnaseq_utils.pyx":2459 * """Updates the mapping ranges of a read with a softclipped * sequenced added back to one end.""" * if strand == 1: # <<<<<<<<<<<<<< @@ -57632,7 +58500,7 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO break; case -1L: - /* "_rnaseq_utils.pyx":2438 + /* "_rnaseq_utils.pyx":2463 * ranges[-1] = (ranges[-1][0],ranges[-1][1]+tail) * elif strand == -1: * if 0 < head < 4 and ranges[0][0] > head: # Short left clip exists # <<<<<<<<<<<<<< @@ -57651,25 +58519,25 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO } if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2438, __pyx_L1_error) + __PYX_ERR(0, 2463, __pyx_L1_error) } - __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2438, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2438, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_head); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2438, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_head); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2438, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_6, __pyx_t_3, Py_GT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2438, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2463, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_2 = __pyx_t_7; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":2439 + /* "_rnaseq_utils.pyx":2464 * elif strand == -1: * if 0 < head < 4 and ranges[0][0] > head: # Short left clip exists * ranges[0] = (ranges[0][0]-head,ranges[0][1]) # <<<<<<<<<<<<<< @@ -57678,29 +58546,29 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO */ if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2439, __pyx_L1_error) + __PYX_ERR(0, 2464, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2439, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_head); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_head); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2439, __pyx_L1_error) + __pyx_t_6 = PyNumber_Subtract(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2439, __pyx_L1_error) + __PYX_ERR(0, 2464, __pyx_L1_error) } - __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_ranges, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2439, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2439, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); @@ -57710,12 +58578,12 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO __pyx_t_3 = 0; if (unlikely(__pyx_v_ranges == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2439, __pyx_L1_error) + __PYX_ERR(0, 2464, __pyx_L1_error) } - if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, 0, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 2439, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_v_ranges, 0, __pyx_t_4, long, 1, __Pyx_PyInt_From_long, 1, 0, 1) < 0)) __PYX_ERR(0, 2464, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "_rnaseq_utils.pyx":2438 + /* "_rnaseq_utils.pyx":2463 * ranges[-1] = (ranges[-1][0],ranges[-1][1]+tail) * elif strand == -1: * if 0 < head < 4 and ranges[0][0] > head: # Short left clip exists # <<<<<<<<<<<<<< @@ -57724,7 +58592,7 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO */ } - /* "_rnaseq_utils.pyx":2437 + /* "_rnaseq_utils.pyx":2462 * if 0 < tail < 4: # Short right clip exists * ranges[-1] = (ranges[-1][0],ranges[-1][1]+tail) * elif strand == -1: # <<<<<<<<<<<<<< @@ -57735,7 +58603,7 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO default: break; } - /* "_rnaseq_utils.pyx":2431 + /* "_rnaseq_utils.pyx":2456 * * * cdef void restore_terminal_mismatches(self, int strand, int head, int tail, list ranges): # <<<<<<<<<<<<<< @@ -57755,7 +58623,7 @@ static void __pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches(CYTHO __Pyx_RefNannyFinishContext(); } -/* "_rnaseq_utils.pyx":2441 +/* "_rnaseq_utils.pyx":2466 * ranges[0] = (ranges[0][0]-head,ranges[0][1]) * * cdef bint matches_masking_sequence(self, str chrom, int position, int strand, str readtype, int length): # <<<<<<<<<<<<<< @@ -57783,7 +58651,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("matches_masking_sequence", 0); - /* "_rnaseq_utils.pyx":2446 + /* "_rnaseq_utils.pyx":2471 * false positive end signal""" * ## 5' * flank = get_flank(self.dataset.genome, chrom, position, strand, readtype, length) # Get upstream flanking sequence to start # <<<<<<<<<<<<<< @@ -57792,13 +58660,13 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ */ __pyx_t_1 = __pyx_v_self->dataset->genome; __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_1), __pyx_v_chrom, __pyx_v_position, __pyx_v_strand, __pyx_v_readtype, __pyx_v_length, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2446, __pyx_L1_error) + __pyx_t_2 = __pyx_f_13_rnaseq_utils_get_flank(((PyObject*)__pyx_t_1), __pyx_v_chrom, __pyx_v_position, __pyx_v_strand, __pyx_v_readtype, __pyx_v_length, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2471, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_flank = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":2447 + /* "_rnaseq_utils.pyx":2472 * ## 5' * flank = get_flank(self.dataset.genome, chrom, position, strand, readtype, length) # Get upstream flanking sequence to start * if len(flank) > 0: # <<<<<<<<<<<<<< @@ -57807,51 +58675,51 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ */ if (unlikely(__pyx_v_flank == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2447, __pyx_L1_error) + __PYX_ERR(0, 2472, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_flank); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2447, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_flank); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2472, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 0) != 0); if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2448 + /* "_rnaseq_utils.pyx":2473 * flank = get_flank(self.dataset.genome, chrom, position, strand, readtype, length) # Get upstream flanking sequence to start * if len(flank) > 0: * if readtype == 'S': # <<<<<<<<<<<<<< * flankmatch = self.dataset.start_array[-length:][::-1] * flank = flank[::-1] */ - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_readtype, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2448, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_readtype, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2473, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":2449 + /* "_rnaseq_utils.pyx":2474 * if len(flank) > 0: * if readtype == 'S': * flankmatch = self.dataset.start_array[-length:][::-1] # <<<<<<<<<<<<<< * flank = flank[::-1] * elif readtype == 'E': */ - __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->dataset->start_array), (-__pyx_v_length), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->dataset->start_array), (-__pyx_v_length), 0, NULL, NULL, NULL, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_slice__61); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_t_2, __pyx_slice__61); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_flankmatch = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2450 + /* "_rnaseq_utils.pyx":2475 * if readtype == 'S': * flankmatch = self.dataset.start_array[-length:][::-1] * flank = flank[::-1] # <<<<<<<<<<<<<< * elif readtype == 'E': * flankmatch = self.dataset.end_array[:length] */ - __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_flank, __pyx_slice__61); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2450, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_flank, __pyx_slice__61); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2475, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF_SET(__pyx_v_flank, ((PyObject*)__pyx_t_1)); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2448 + /* "_rnaseq_utils.pyx":2473 * flank = get_flank(self.dataset.genome, chrom, position, strand, readtype, length) # Get upstream flanking sequence to start * if len(flank) > 0: * if readtype == 'S': # <<<<<<<<<<<<<< @@ -57861,30 +58729,30 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ goto __pyx_L4; } - /* "_rnaseq_utils.pyx":2451 + /* "_rnaseq_utils.pyx":2476 * flankmatch = self.dataset.start_array[-length:][::-1] * flank = flank[::-1] * elif readtype == 'E': # <<<<<<<<<<<<<< * flankmatch = self.dataset.end_array[:length] * */ - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_readtype, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2451, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_readtype, __pyx_n_u_E, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2476, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2452 + /* "_rnaseq_utils.pyx":2477 * flank = flank[::-1] * elif readtype == 'E': * flankmatch = self.dataset.end_array[:length] # <<<<<<<<<<<<<< * * if fu.oligo_match(fu.nuc_to_int(flank), flankmatch, self.dataset.mismatch_rate): */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->dataset->end_array), 0, __pyx_v_length, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2452, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self->dataset->end_array), 0, __pyx_v_length, NULL, NULL, NULL, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_flankmatch = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2451 + /* "_rnaseq_utils.pyx":2476 * flankmatch = self.dataset.start_array[-length:][::-1] * flank = flank[::-1] * elif readtype == 'E': # <<<<<<<<<<<<<< @@ -57894,21 +58762,21 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ } __pyx_L4:; - /* "_rnaseq_utils.pyx":2454 + /* "_rnaseq_utils.pyx":2479 * flankmatch = self.dataset.end_array[:length] * * if fu.oligo_match(fu.nuc_to_int(flank), flankmatch, self.dataset.mismatch_rate): # <<<<<<<<<<<<<< * return True * */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2454, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_fu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_oligo_match); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_oligo_match); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_fu); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2454, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_fu); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_nuc_to_int); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -57923,11 +58791,11 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ } __pyx_t_2 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_v_flank) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_flank); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2454, __pyx_L1_error) + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (unlikely(!__pyx_v_flankmatch)) { __Pyx_RaiseUnboundLocalError("flankmatch"); __PYX_ERR(0, 2454, __pyx_L1_error) } - __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->dataset->mismatch_rate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2454, __pyx_L1_error) + if (unlikely(!__pyx_v_flankmatch)) { __Pyx_RaiseUnboundLocalError("flankmatch"); __PYX_ERR(0, 2479, __pyx_L1_error) } + __pyx_t_8 = PyFloat_FromDouble(__pyx_v_self->dataset->mismatch_rate); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = NULL; __pyx_t_9 = 0; @@ -57944,7 +58812,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_2, __pyx_v_flankmatch, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -57954,7 +58822,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_2, __pyx_v_flankmatch, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -57962,7 +58830,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ } else #endif { - __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -57976,16 +58844,16 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_8); __pyx_t_2 = 0; __pyx_t_8 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2454, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2479, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "_rnaseq_utils.pyx":2455 + /* "_rnaseq_utils.pyx":2480 * * if fu.oligo_match(fu.nuc_to_int(flank), flankmatch, self.dataset.mismatch_rate): * return True # <<<<<<<<<<<<<< @@ -57995,7 +58863,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ __pyx_r = 1; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2454 + /* "_rnaseq_utils.pyx":2479 * flankmatch = self.dataset.end_array[:length] * * if fu.oligo_match(fu.nuc_to_int(flank), flankmatch, self.dataset.mismatch_rate): # <<<<<<<<<<<<<< @@ -58004,7 +58872,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ */ } - /* "_rnaseq_utils.pyx":2447 + /* "_rnaseq_utils.pyx":2472 * ## 5' * flank = get_flank(self.dataset.genome, chrom, position, strand, readtype, length) # Get upstream flanking sequence to start * if len(flank) > 0: # <<<<<<<<<<<<<< @@ -58013,7 +58881,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ */ } - /* "_rnaseq_utils.pyx":2457 + /* "_rnaseq_utils.pyx":2482 * return True * * return False # <<<<<<<<<<<<<< @@ -58023,7 +58891,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2441 + /* "_rnaseq_utils.pyx":2466 * ranges[0] = (ranges[0][0]-head,ranges[0][1]) * * cdef bint matches_masking_sequence(self, str chrom, int position, int strand, str readtype, int length): # <<<<<<<<<<<<<< @@ -58048,7 +58916,7 @@ static int __pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence(struct __ return __pyx_r; } -/* "_rnaseq_utils.pyx":1971 +/* "_rnaseq_utils.pyx":1923 * * cdef class BAMobject: * cdef readonly RNAseqDataset dataset # <<<<<<<<<<<<<< @@ -58085,7 +58953,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_7dataset___get__(struct __p return __pyx_r; } -/* "_rnaseq_utils.pyx":1972 +/* "_rnaseq_utils.pyx":1924 * cdef class BAMobject: * cdef readonly RNAseqDataset dataset * cdef readonly list input_lines # <<<<<<<<<<<<<< @@ -58122,7 +58990,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_11input_lines___get__(struc return __pyx_r; } -/* "_rnaseq_utils.pyx":1973 +/* "_rnaseq_utils.pyx":1925 * cdef readonly RNAseqDataset dataset * cdef readonly list input_lines * cdef readonly float error_rate # <<<<<<<<<<<<<< @@ -58152,7 +59020,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_10error_rate___get__(struct int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->error_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1973, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_self->error_rate); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1925, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58169,7 +59037,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_10error_rate___get__(struct return __pyx_r; } -/* "_rnaseq_utils.pyx":1974 +/* "_rnaseq_utils.pyx":1926 * cdef readonly list input_lines * cdef readonly float error_rate * cdef readonly bint ignore_ends, secondary, remove_noncanonical, quality_filter # <<<<<<<<<<<<<< @@ -58199,7 +59067,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_11ignore_ends___get__(struc int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->ignore_ends); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->ignore_ends); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58238,7 +59106,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_9secondary___get__(struct _ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->secondary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->secondary); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58277,7 +59145,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_19remove_noncanonical___get int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->remove_noncanonical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->remove_noncanonical); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58316,7 +59184,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_14quality_filter___get__(st int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->quality_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1974, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_v_self->quality_filter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58333,7 +59201,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_14quality_filter___get__(st return __pyx_r; } -/* "_rnaseq_utils.pyx":1975 +/* "_rnaseq_utils.pyx":1927 * cdef readonly float error_rate * cdef readonly bint ignore_ends, secondary, remove_noncanonical, quality_filter * cdef readonly int max_headclip, sj_shift # <<<<<<<<<<<<<< @@ -58363,7 +59231,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_12max_headclip___get__(stru int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_headclip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1975, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->max_headclip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58402,7 +59270,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_8sj_shift___get__(struct __ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->sj_shift); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1975, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->sj_shift); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -58426,19 +59294,19 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_8sj_shift___get__(struct __ */ /* Python wrapper */ -static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_5__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_9__reduce_cython__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject_4__reduce_cython__(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self)); + __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject_8__reduce_cython__(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_4__reduce_cython__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self) { +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_8__reduce_cython__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self) { PyObject *__pyx_v_state = 0; PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; @@ -58720,19 +59588,19 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_4__reduce_cython__(struct _ */ /* Python wrapper */ -static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ -static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_7__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state); /*proto*/ +static PyObject *__pyx_pw_13_rnaseq_utils_9BAMobject_11__setstate_cython__(PyObject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0); - __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject_6__setstate_cython__(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); + __pyx_r = __pyx_pf_13_rnaseq_utils_9BAMobject_10__setstate_cython__(((struct __pyx_obj_13_rnaseq_utils_BAMobject *)__pyx_v_self), ((PyObject *)__pyx_v___pyx_state)); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_6__setstate_cython__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { +static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_10__setstate_cython__(struct __pyx_obj_13_rnaseq_utils_BAMobject *__pyx_v_self, PyObject *__pyx_v___pyx_state) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -58772,7 +59640,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_9BAMobject_6__setstate_cython__(struct } static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_rnaseq_utils.pyx":2459 +/* "_rnaseq_utils.pyx":2484 * return False * * def read_generator(fileconn, RNAseqDataset dataset, str file_type, int max_gap, float minimum_proportion): # <<<<<<<<<<<<<< @@ -58825,29 +59693,29 @@ static PyObject *__pyx_pw_13_rnaseq_utils_31read_generator(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_dataset)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, 1); __PYX_ERR(0, 2459, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, 1); __PYX_ERR(0, 2484, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_file_type)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, 2); __PYX_ERR(0, 2459, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, 2); __PYX_ERR(0, 2484, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_max_gap)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, 3); __PYX_ERR(0, 2459, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, 3); __PYX_ERR(0, 2484, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_minimum_proportion)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, 4); __PYX_ERR(0, 2459, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, 4); __PYX_ERR(0, 2484, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_generator") < 0)) __PYX_ERR(0, 2459, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "read_generator") < 0)) __PYX_ERR(0, 2484, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 5) { goto __pyx_L5_argtuple_error; @@ -58861,19 +59729,19 @@ static PyObject *__pyx_pw_13_rnaseq_utils_31read_generator(PyObject *__pyx_self, __pyx_v_fileconn = values[0]; __pyx_v_dataset = ((struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *)values[1]); __pyx_v_file_type = ((PyObject*)values[2]); - __pyx_v_max_gap = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_max_gap == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2459, __pyx_L3_error) - __pyx_v_minimum_proportion = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_minimum_proportion == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2459, __pyx_L3_error) + __pyx_v_max_gap = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_max_gap == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2484, __pyx_L3_error) + __pyx_v_minimum_proportion = __pyx_PyFloat_AsFloat(values[4]); if (unlikely((__pyx_v_minimum_proportion == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2484, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2459, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("read_generator", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2484, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.read_generator", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dataset), __pyx_ptype_13_rnaseq_utils_RNAseqDataset, 1, "dataset", 0))) __PYX_ERR(0, 2459, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_type), (&PyUnicode_Type), 1, "file_type", 1))) __PYX_ERR(0, 2459, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_dataset), __pyx_ptype_13_rnaseq_utils_RNAseqDataset, 1, "dataset", 0))) __PYX_ERR(0, 2484, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_file_type), (&PyUnicode_Type), 1, "file_type", 1))) __PYX_ERR(0, 2484, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_30read_generator(__pyx_self, __pyx_v_fileconn, __pyx_v_dataset, __pyx_v_file_type, __pyx_v_max_gap, __pyx_v_minimum_proportion); /* function exit code */ @@ -58897,7 +59765,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_30read_generator(CYTHON_UNUSED PyObjec if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_5_read_generator *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 2459, __pyx_L1_error) + __PYX_ERR(0, 2484, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -58913,7 +59781,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_30read_generator(CYTHON_UNUSED PyObjec __pyx_cur_scope->__pyx_v_max_gap = __pyx_v_max_gap; __pyx_cur_scope->__pyx_v_minimum_proportion = __pyx_v_minimum_proportion; { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_32generator3, __pyx_codeobj__62, (PyObject *) __pyx_cur_scope, __pyx_n_s_read_generator, __pyx_n_s_read_generator, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 2459, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_32generator3, __pyx_codeobj__62, (PyObject *) __pyx_cur_scope, __pyx_n_s_read_generator, __pyx_n_s_read_generator, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 2484, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -58968,9 +59836,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2459, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2484, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2467 + /* "_rnaseq_utils.pyx":2492 * cdef set covered_positions * cdef list passed_positions * if file_type in ['elr','elr.gz']: # <<<<<<<<<<<<<< @@ -58979,14 +59847,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_file_type); __pyx_t_1 = __pyx_cur_scope->__pyx_v_file_type; - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_elr, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2467, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_n_u_elr, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2492, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u_elr_gz, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2467, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u_elr_gz, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2492, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L5_bool_binop_done:; @@ -58994,20 +59862,20 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2468 + /* "_rnaseq_utils.pyx":2493 * cdef list passed_positions * if file_type in ['elr','elr.gz']: * add_read = dataset.add_read_from_ELR # <<<<<<<<<<<<<< * elif file_type == 'bed': * add_read = dataset.add_read_from_BED */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_dataset), __pyx_n_s_add_read_from_ELR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2468, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_dataset), __pyx_n_s_add_read_from_ELR); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2493, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_add_read = __pyx_t_5; __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2467 + /* "_rnaseq_utils.pyx":2492 * cdef set covered_positions * cdef list passed_positions * if file_type in ['elr','elr.gz']: # <<<<<<<<<<<<<< @@ -59017,31 +59885,31 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ goto __pyx_L4; } - /* "_rnaseq_utils.pyx":2469 + /* "_rnaseq_utils.pyx":2494 * if file_type in ['elr','elr.gz']: * add_read = dataset.add_read_from_ELR * elif file_type == 'bed': # <<<<<<<<<<<<<< * add_read = dataset.add_read_from_BED * elif file_type == 'bam' or file_type == 'sam': */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_file_type, __pyx_n_u_bed_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2469, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_file_type, __pyx_n_u_bed_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2494, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":2470 + /* "_rnaseq_utils.pyx":2495 * add_read = dataset.add_read_from_ELR * elif file_type == 'bed': * add_read = dataset.add_read_from_BED # <<<<<<<<<<<<<< * elif file_type == 'bam' or file_type == 'sam': * add_read = dataset.add_read_from_BAM */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_dataset), __pyx_n_s_add_read_from_BED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2470, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_dataset), __pyx_n_s_add_read_from_BED); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2495, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_add_read = __pyx_t_5; __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2469 + /* "_rnaseq_utils.pyx":2494 * if file_type in ['elr','elr.gz']: * add_read = dataset.add_read_from_ELR * elif file_type == 'bed': # <<<<<<<<<<<<<< @@ -59051,40 +59919,40 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ goto __pyx_L4; } - /* "_rnaseq_utils.pyx":2471 + /* "_rnaseq_utils.pyx":2496 * elif file_type == 'bed': * add_read = dataset.add_read_from_BED * elif file_type == 'bam' or file_type == 'sam': # <<<<<<<<<<<<<< * add_read = dataset.add_read_from_BAM * else: */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_file_type, __pyx_n_u_bam, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2471, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_file_type, __pyx_n_u_bam, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2496, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L7_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_file_type, __pyx_n_u_sam, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2471, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_cur_scope->__pyx_v_file_type, __pyx_n_u_sam, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2496, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_3; __pyx_L7_bool_binop_done:; if (__pyx_t_2) { - /* "_rnaseq_utils.pyx":2472 + /* "_rnaseq_utils.pyx":2497 * add_read = dataset.add_read_from_BED * elif file_type == 'bam' or file_type == 'sam': * add_read = dataset.add_read_from_BAM # <<<<<<<<<<<<<< * else: * return */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_dataset), __pyx_n_s_add_read_from_BAM); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2472, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_cur_scope->__pyx_v_dataset), __pyx_n_s_add_read_from_BAM); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2497, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_add_read = __pyx_t_5; __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2471 + /* "_rnaseq_utils.pyx":2496 * elif file_type == 'bed': * add_read = dataset.add_read_from_BED * elif file_type == 'bam' or file_type == 'sam': # <<<<<<<<<<<<<< @@ -59094,7 +59962,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ goto __pyx_L4; } - /* "_rnaseq_utils.pyx":2474 + /* "_rnaseq_utils.pyx":2499 * add_read = dataset.add_read_from_BAM * else: * return # <<<<<<<<<<<<<< @@ -59108,14 +59976,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_L4:; - /* "_rnaseq_utils.pyx":2476 + /* "_rnaseq_utils.pyx":2501 * return * * end_positions = Counter() # Keep track of where reads end to maintain a tally of coverage depth # <<<<<<<<<<<<<< * old_chrom, old_l, old_r, rightmost, span_start = -1, -1, -1, -1, -1 * current_cov = 0 */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Counter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2476, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Counter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -59129,14 +59997,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2476, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2501, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GIVEREF(__pyx_t_5); __pyx_cur_scope->__pyx_v_end_positions = __pyx_t_5; __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2477 + /* "_rnaseq_utils.pyx":2502 * * end_positions = Counter() # Keep track of where reads end to maintain a tally of coverage depth * old_chrom, old_l, old_r, rightmost, span_start = -1, -1, -1, -1, -1 # <<<<<<<<<<<<<< @@ -59157,7 +60025,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_cur_scope->__pyx_v_span_start = __pyx_t_5; __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2478 + /* "_rnaseq_utils.pyx":2503 * end_positions = Counter() # Keep track of where reads end to maintain a tally of coverage depth * old_chrom, old_l, old_r, rightmost, span_start = -1, -1, -1, -1, -1 * current_cov = 0 # <<<<<<<<<<<<<< @@ -59166,7 +60034,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_current_cov = 0.0; - /* "_rnaseq_utils.pyx":2479 + /* "_rnaseq_utils.pyx":2504 * old_chrom, old_l, old_r, rightmost, span_start = -1, -1, -1, -1, -1 * current_cov = 0 * span_weight = 0 # <<<<<<<<<<<<<< @@ -59175,7 +60043,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_span_weight = 0.0; - /* "_rnaseq_utils.pyx":2480 + /* "_rnaseq_utils.pyx":2505 * current_cov = 0 * span_weight = 0 * for line in fileconn: # <<<<<<<<<<<<<< @@ -59186,26 +60054,26 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_t_5 = __pyx_cur_scope->__pyx_v_fileconn; __Pyx_INCREF(__pyx_t_5); __pyx_t_12 = 0; __pyx_t_13 = NULL; } else { - __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_fileconn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2480, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_fileconn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2480, __pyx_L1_error) + __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2505, __pyx_L1_error) } for (;;) { if (likely(!__pyx_t_13)) { if (likely(PyList_CheckExact(__pyx_t_5))) { if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2480, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2505, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2480, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2480, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2505, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2480, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_5, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -59215,7 +60083,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 2480, __pyx_L1_error) + else __PYX_ERR(0, 2505, __pyx_L1_error) } break; } @@ -59226,7 +60094,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":2481 + /* "_rnaseq_utils.pyx":2506 * span_weight = 0 * for line in fileconn: * if type(line) is str: # <<<<<<<<<<<<<< @@ -59237,27 +60105,27 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2482 + /* "_rnaseq_utils.pyx":2507 * for line in fileconn: * if type(line) is str: * if line[0] == '#': # <<<<<<<<<<<<<< * header_line = line.rstrip().split(' ') * if header_line[0] == '#S': */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2482, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u__26, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2482, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u__26, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2507, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2483 + /* "_rnaseq_utils.pyx":2508 * if type(line) is str: * if line[0] == '#': * header_line = line.rstrip().split(' ') # <<<<<<<<<<<<<< * if header_line[0] == '#S': * dataset.add_source(header_line[-1]) */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { @@ -59271,10 +60139,10 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_t_7 = (__pyx_t_15) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_15) : __Pyx_PyObject_CallNoArg(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2483, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2483, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -59289,7 +60157,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_7, __pyx_kp_u__19) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_kp_u__19); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2483, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2508, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_header_line); @@ -59297,34 +60165,34 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":2484 + /* "_rnaseq_utils.pyx":2509 * if line[0] == '#': * header_line = line.rstrip().split(' ') * if header_line[0] == '#S': # <<<<<<<<<<<<<< * dataset.add_source(header_line[-1]) * elif header_line[0] == '#C': */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_header_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2484, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_header_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_S_3, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2484, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u_S_3, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2509, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2485 + /* "_rnaseq_utils.pyx":2510 * header_line = line.rstrip().split(' ') * if header_line[0] == '#S': * dataset.add_source(header_line[-1]) # <<<<<<<<<<<<<< * elif header_line[0] == '#C': * dataset.add_chrom(header_line[-1]) */ - __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_header_line, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2485, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_header_line, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_cur_scope->__pyx_v_dataset->__pyx_vtab)->add_source(__pyx_cur_scope->__pyx_v_dataset, __pyx_t_6, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2485, __pyx_L1_error) + __pyx_t_14 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_cur_scope->__pyx_v_dataset->__pyx_vtab)->add_source(__pyx_cur_scope->__pyx_v_dataset, __pyx_t_6, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2510, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2484 + /* "_rnaseq_utils.pyx":2509 * if line[0] == '#': * header_line = line.rstrip().split(' ') * if header_line[0] == '#S': # <<<<<<<<<<<<<< @@ -59334,34 +60202,34 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ goto __pyx_L13; } - /* "_rnaseq_utils.pyx":2486 + /* "_rnaseq_utils.pyx":2511 * if header_line[0] == '#S': * dataset.add_source(header_line[-1]) * elif header_line[0] == '#C': # <<<<<<<<<<<<<< * dataset.add_chrom(header_line[-1]) * */ - __pyx_t_14 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_header_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2486, __pyx_L1_error) + __pyx_t_14 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_header_line, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2511, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_kp_u_C_3, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2486, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_t_14, __pyx_kp_u_C_3, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2511, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2487 + /* "_rnaseq_utils.pyx":2512 * dataset.add_source(header_line[-1]) * elif header_line[0] == '#C': * dataset.add_chrom(header_line[-1]) # <<<<<<<<<<<<<< * * continue */ - __pyx_t_14 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_header_line, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2487, __pyx_L1_error) + __pyx_t_14 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_header_line, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_6 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_cur_scope->__pyx_v_dataset->__pyx_vtab)->add_chrom(__pyx_cur_scope->__pyx_v_dataset, __pyx_t_14, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2487, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_13_rnaseq_utils_RNAseqDataset *)__pyx_cur_scope->__pyx_v_dataset->__pyx_vtab)->add_chrom(__pyx_cur_scope->__pyx_v_dataset, __pyx_t_14, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2512, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":2486 + /* "_rnaseq_utils.pyx":2511 * if header_line[0] == '#S': * dataset.add_source(header_line[-1]) * elif header_line[0] == '#C': # <<<<<<<<<<<<<< @@ -59371,7 +60239,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_L13:; - /* "_rnaseq_utils.pyx":2489 + /* "_rnaseq_utils.pyx":2514 * dataset.add_chrom(header_line[-1]) * * continue # <<<<<<<<<<<<<< @@ -59380,7 +60248,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ goto __pyx_L9_continue; - /* "_rnaseq_utils.pyx":2482 + /* "_rnaseq_utils.pyx":2507 * for line in fileconn: * if type(line) is str: * if line[0] == '#': # <<<<<<<<<<<<<< @@ -59389,7 +60257,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ } - /* "_rnaseq_utils.pyx":2481 + /* "_rnaseq_utils.pyx":2506 * span_weight = 0 * for line in fileconn: * if type(line) is str: # <<<<<<<<<<<<<< @@ -59398,7 +60266,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ } - /* "_rnaseq_utils.pyx":2491 + /* "_rnaseq_utils.pyx":2516 * continue * * add_read(line) # <<<<<<<<<<<<<< @@ -59418,12 +60286,12 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_t_6 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_14, __pyx_t_7, __pyx_cur_scope->__pyx_v_line) : __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_cur_scope->__pyx_v_line); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2491, __pyx_L1_error) + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2516, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":2492 + /* "_rnaseq_utils.pyx":2517 * * add_read(line) * if len(dataset.read_list) == 0: # <<<<<<<<<<<<<< @@ -59434,14 +60302,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_INCREF(__pyx_t_6); if (unlikely(__pyx_t_6 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 2492, __pyx_L1_error) + __PYX_ERR(0, 2517, __pyx_L1_error) } - __pyx_t_16 = PyList_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2492, __pyx_L1_error) + __pyx_t_16 = PyList_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_16 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2517, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_3 = ((__pyx_t_16 == 0) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2493 + /* "_rnaseq_utils.pyx":2518 * add_read(line) * if len(dataset.read_list) == 0: * continue # <<<<<<<<<<<<<< @@ -59450,7 +60318,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ goto __pyx_L9_continue; - /* "_rnaseq_utils.pyx":2492 + /* "_rnaseq_utils.pyx":2517 * * add_read(line) * if len(dataset.read_list) == 0: # <<<<<<<<<<<<<< @@ -59459,7 +60327,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ } - /* "_rnaseq_utils.pyx":2495 + /* "_rnaseq_utils.pyx":2520 * continue * * read = dataset.read_list[-1] # <<<<<<<<<<<<<< @@ -59468,17 +60336,17 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ if (unlikely(__pyx_cur_scope->__pyx_v_dataset->read_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2495, __pyx_L1_error) + __PYX_ERR(0, 2520, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_dataset->read_list, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2495, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_dataset->read_list, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2495, __pyx_L1_error) + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2520, __pyx_L1_error) __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_read)); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_6)); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":2496 + /* "_rnaseq_utils.pyx":2521 * * read = dataset.read_list[-1] * l, r = read.span # <<<<<<<<<<<<<< @@ -59491,7 +60359,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_cur_scope->__pyx_v_l = __pyx_t_11; __pyx_cur_scope->__pyx_v_r = __pyx_t_10; - /* "_rnaseq_utils.pyx":2497 + /* "_rnaseq_utils.pyx":2522 * read = dataset.read_list[-1] * l, r = read.span * read_weight = read.weight * (r-l) # <<<<<<<<<<<<<< @@ -59500,7 +60368,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_read_weight = (__pyx_cur_scope->__pyx_v_read->weight * (__pyx_cur_scope->__pyx_v_r - __pyx_cur_scope->__pyx_v_l)); - /* "_rnaseq_utils.pyx":2498 + /* "_rnaseq_utils.pyx":2523 * l, r = read.span * read_weight = read.weight * (r-l) * current_cov += read.weight # <<<<<<<<<<<<<< @@ -59509,7 +60377,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_current_cov = (__pyx_cur_scope->__pyx_v_current_cov + __pyx_cur_scope->__pyx_v_read->weight); - /* "_rnaseq_utils.pyx":2499 + /* "_rnaseq_utils.pyx":2524 * read_weight = read.weight * (r-l) * current_cov += read.weight * if old_chrom == -1: # Uninitialized; add the read and make no other decisions # <<<<<<<<<<<<<< @@ -59519,30 +60387,30 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_old_chrom == -1L) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2500 + /* "_rnaseq_utils.pyx":2525 * current_cov += read.weight * if old_chrom == -1: # Uninitialized; add the read and make no other decisions * span_start = l # <<<<<<<<<<<<<< * span_length = r - span_start * rightmost = r */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_l); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2500, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_l); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_span_start); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_span_start, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - /* "_rnaseq_utils.pyx":2501 + /* "_rnaseq_utils.pyx":2526 * if old_chrom == -1: # Uninitialized; add the read and make no other decisions * span_start = l * span_length = r - span_start # <<<<<<<<<<<<<< * rightmost = r * elif read.chrom != old_chrom or l >= rightmost + max_gap: # The last locus is definitely finished; dump the read list */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2501, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_r); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_14 = PyNumber_Subtract(__pyx_t_6, __pyx_cur_scope->__pyx_v_span_start); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2501, __pyx_L1_error) + __pyx_t_14 = PyNumber_Subtract(__pyx_t_6, __pyx_cur_scope->__pyx_v_span_start); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_span_length); @@ -59550,7 +60418,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2502 + /* "_rnaseq_utils.pyx":2527 * span_start = l * span_length = r - span_start * rightmost = r # <<<<<<<<<<<<<< @@ -59559,7 +60427,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_rightmost = __pyx_cur_scope->__pyx_v_r; - /* "_rnaseq_utils.pyx":2499 + /* "_rnaseq_utils.pyx":2524 * read_weight = read.weight * (r-l) * current_cov += read.weight * if old_chrom == -1: # Uninitialized; add the read and make no other decisions # <<<<<<<<<<<<<< @@ -59569,7 +60437,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ goto __pyx_L15; } - /* "_rnaseq_utils.pyx":2503 + /* "_rnaseq_utils.pyx":2528 * span_length = r - span_start * rightmost = r * elif read.chrom != old_chrom or l >= rightmost + max_gap: # The last locus is definitely finished; dump the read list # <<<<<<<<<<<<<< @@ -59587,7 +60455,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_L16_bool_binop_done:; if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2504 + /* "_rnaseq_utils.pyx":2529 * rightmost = r * elif read.chrom != old_chrom or l >= rightmost + max_gap: # The last locus is definitely finished; dump the read list * if read.chrom != old_chrom: # <<<<<<<<<<<<<< @@ -59597,7 +60465,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_read->chrom != __pyx_cur_scope->__pyx_v_old_chrom) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2505 + /* "_rnaseq_utils.pyx":2530 * elif read.chrom != old_chrom or l >= rightmost + max_gap: # The last locus is definitely finished; dump the read list * if read.chrom != old_chrom: * yield [outread for outread in dataset.read_list[:-1]] # <<<<<<<<<<<<<< @@ -59605,30 +60473,30 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ * yield [outread for outread in dataset.read_list[:-1] if outread.span[1] < l] */ { /* enter inner scope */ - __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2505, __pyx_L1_error) + __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (unlikely(__pyx_cur_scope->__pyx_v_dataset->read_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2505, __pyx_L1_error) + __PYX_ERR(0, 2530, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_dataset->read_list, 0, -1L); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2505, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_dataset->read_list, 0, -1L); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 2505, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_16); __Pyx_INCREF(__pyx_t_6); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 2530, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2505, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif - if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2505, __pyx_L1_error) - __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_9genexpr48__pyx_v_outread)); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_9genexpr48__pyx_v_outread, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_6)); + if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2530, __pyx_L1_error) + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_9genexpr50__pyx_v_outread)); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_9genexpr50__pyx_v_outread, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_6)); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_14, (PyObject*)__pyx_cur_scope->__pyx_9genexpr48__pyx_v_outread))) __PYX_ERR(0, 2505, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_14, (PyObject*)__pyx_cur_scope->__pyx_9genexpr50__pyx_v_outread))) __PYX_ERR(0, 2530, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } /* exit inner scope */ @@ -59650,9 +60518,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_XGOTREF(__pyx_t_5); __pyx_t_12 = __pyx_cur_scope->__pyx_t_1; __pyx_t_13 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2505, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2530, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2504 + /* "_rnaseq_utils.pyx":2529 * rightmost = r * elif read.chrom != old_chrom or l >= rightmost + max_gap: # The last locus is definitely finished; dump the read list * if read.chrom != old_chrom: # <<<<<<<<<<<<<< @@ -59662,7 +60530,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ goto __pyx_L18; } - /* "_rnaseq_utils.pyx":2507 + /* "_rnaseq_utils.pyx":2532 * yield [outread for outread in dataset.read_list[:-1]] * else: * yield [outread for outread in dataset.read_list[:-1] if outread.span[1] < l] # <<<<<<<<<<<<<< @@ -59671,32 +60539,32 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ /*else*/ { { /* enter inner scope */ - __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (unlikely(__pyx_cur_scope->__pyx_v_dataset->read_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2507, __pyx_L1_error) + __PYX_ERR(0, 2532, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_dataset->read_list, 0, -1L); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_dataset->read_list, 0, -1L); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_6 = __pyx_t_7; __Pyx_INCREF(__pyx_t_6); __pyx_t_16 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; for (;;) { if (__pyx_t_16 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_t_7 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_16); __Pyx_INCREF(__pyx_t_7); __pyx_t_16++; if (unlikely(0 < 0)) __PYX_ERR(0, 2532, __pyx_L1_error) #else - __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2507, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(__pyx_t_6, __pyx_t_16); __pyx_t_16++; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); #endif - if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2507, __pyx_L1_error) - __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_9genexpr49__pyx_v_outread)); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_9genexpr49__pyx_v_outread, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_7)); + if (!(likely(((__pyx_t_7) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_7, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2532, __pyx_L1_error) + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_9genexpr51__pyx_v_outread)); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_9genexpr51__pyx_v_outread, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_7)); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_3 = ((__pyx_cur_scope->__pyx_9genexpr49__pyx_v_outread->span.f1 < __pyx_cur_scope->__pyx_v_l) != 0); + __pyx_t_3 = ((__pyx_cur_scope->__pyx_9genexpr51__pyx_v_outread->span.f1 < __pyx_cur_scope->__pyx_v_l) != 0); if (__pyx_t_3) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_14, (PyObject*)__pyx_cur_scope->__pyx_9genexpr49__pyx_v_outread))) __PYX_ERR(0, 2507, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_14, (PyObject*)__pyx_cur_scope->__pyx_9genexpr51__pyx_v_outread))) __PYX_ERR(0, 2532, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; @@ -59719,18 +60587,18 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_XGOTREF(__pyx_t_5); __pyx_t_12 = __pyx_cur_scope->__pyx_t_1; __pyx_t_13 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2507, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2532, __pyx_L1_error) } __pyx_L18:; - /* "_rnaseq_utils.pyx":2509 + /* "_rnaseq_utils.pyx":2534 * yield [outread for outread in dataset.read_list[:-1] if outread.span[1] < l] * * dataset.read_list = [read] # <<<<<<<<<<<<<< * span_start = l * span_weight = 0 */ - __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2509, __pyx_L1_error) + __pyx_t_14 = PyList_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_read)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_read)); @@ -59741,21 +60609,21 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_cur_scope->__pyx_v_dataset->read_list = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2510 + /* "_rnaseq_utils.pyx":2535 * * dataset.read_list = [read] * span_start = l # <<<<<<<<<<<<<< * span_weight = 0 * current_cov = read.weight */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_l); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2510, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_l); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_span_start); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_span_start, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2511 + /* "_rnaseq_utils.pyx":2536 * dataset.read_list = [read] * span_start = l * span_weight = 0 # <<<<<<<<<<<<<< @@ -59764,7 +60632,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_span_weight = 0.0; - /* "_rnaseq_utils.pyx":2512 + /* "_rnaseq_utils.pyx":2537 * span_start = l * span_weight = 0 * current_cov = read.weight # <<<<<<<<<<<<<< @@ -59774,14 +60642,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_t_18 = __pyx_cur_scope->__pyx_v_read->weight; __pyx_cur_scope->__pyx_v_current_cov = __pyx_t_18; - /* "_rnaseq_utils.pyx":2513 + /* "_rnaseq_utils.pyx":2538 * span_weight = 0 * current_cov = read.weight * end_positions = Counter() # <<<<<<<<<<<<<< * rightmost = r * elif l > old_l: # Read advanced, but not by enough to automatically cut */ - __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Counter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2513, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_Counter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { @@ -59795,7 +60663,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_t_14 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2513, __pyx_L1_error) + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_end_positions); @@ -59803,7 +60671,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2514 + /* "_rnaseq_utils.pyx":2539 * current_cov = read.weight * end_positions = Counter() * rightmost = r # <<<<<<<<<<<<<< @@ -59812,7 +60680,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_rightmost = __pyx_cur_scope->__pyx_v_r; - /* "_rnaseq_utils.pyx":2503 + /* "_rnaseq_utils.pyx":2528 * span_length = r - span_start * rightmost = r * elif read.chrom != old_chrom or l >= rightmost + max_gap: # The last locus is definitely finished; dump the read list # <<<<<<<<<<<<<< @@ -59822,7 +60690,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ goto __pyx_L15; } - /* "_rnaseq_utils.pyx":2515 + /* "_rnaseq_utils.pyx":2540 * end_positions = Counter() * rightmost = r * elif l > old_l: # Read advanced, but not by enough to automatically cut # <<<<<<<<<<<<<< @@ -59832,7 +60700,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_t_3 = ((__pyx_cur_scope->__pyx_v_l > __pyx_cur_scope->__pyx_v_old_l) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2516 + /* "_rnaseq_utils.pyx":2541 * rightmost = r * elif l > old_l: # Read advanced, but not by enough to automatically cut * passed_positions = [k for k in end_positions.keys() if k <= l] # <<<<<<<<<<<<<< @@ -59840,14 +60708,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ * current_cov -= end_positions.pop(k) */ { /* enter inner scope */ - __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_14 = PyList_New(0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_16 = 0; if (unlikely(__pyx_cur_scope->__pyx_v_end_positions == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "keys"); - __PYX_ERR(0, 2516, __pyx_L1_error) + __PYX_ERR(0, 2541, __pyx_L1_error) } - __pyx_t_7 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_end_positions, 0, __pyx_n_s_keys, (&__pyx_t_19), (&__pyx_t_10)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_7 = __Pyx_dict_iterator(__pyx_cur_scope->__pyx_v_end_positions, 0, __pyx_n_s_keys, (&__pyx_t_19), (&__pyx_t_10)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = __pyx_t_7; @@ -59855,16 +60723,16 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ while (1) { __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_6, __pyx_t_19, &__pyx_t_16, &__pyx_t_7, NULL, NULL, __pyx_t_10); if (unlikely(__pyx_t_11 == 0)) break; - if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 2516, __pyx_L1_error) + if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 2541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_7); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_cur_scope->__pyx_9genexpr50__pyx_v_k = __pyx_t_11; - __pyx_t_3 = ((__pyx_cur_scope->__pyx_9genexpr50__pyx_v_k <= __pyx_cur_scope->__pyx_v_l) != 0); + __pyx_cur_scope->__pyx_9genexpr52__pyx_v_k = __pyx_t_11; + __pyx_t_3 = ((__pyx_cur_scope->__pyx_9genexpr52__pyx_v_k <= __pyx_cur_scope->__pyx_v_l) != 0); if (__pyx_t_3) { - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_9genexpr50__pyx_v_k); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2516, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_9genexpr52__pyx_v_k); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_14, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 2516, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_14, (PyObject*)__pyx_t_7))) __PYX_ERR(0, 2541, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } } @@ -59875,7 +60743,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2517 + /* "_rnaseq_utils.pyx":2542 * elif l > old_l: # Read advanced, but not by enough to automatically cut * passed_positions = [k for k in end_positions.keys() if k <= l] * for k in passed_positions: # <<<<<<<<<<<<<< @@ -59886,35 +60754,35 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ for (;;) { if (__pyx_t_19 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 2517, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_19); __Pyx_INCREF(__pyx_t_6); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 2542, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_14, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2517, __pyx_L1_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_14, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); #endif - __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2517, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_10 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2542, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_cur_scope->__pyx_v_k = __pyx_t_10; - /* "_rnaseq_utils.pyx":2518 + /* "_rnaseq_utils.pyx":2543 * passed_positions = [k for k in end_positions.keys() if k <= l] * for k in passed_positions: * current_cov -= end_positions.pop(k) # <<<<<<<<<<<<<< * * if current_cov * span_length < minimum_proportion * span_weight: # Current cov is sufficiently lower than mean cov to cause a break */ - __pyx_t_6 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_current_cov); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2518, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_current_cov); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_PopIndex(__pyx_cur_scope->__pyx_v_end_positions, Py_None, __pyx_cur_scope->__pyx_v_k, 1, int, __Pyx_PyInt_From_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2518, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_PopIndex(__pyx_cur_scope->__pyx_v_end_positions, Py_None, __pyx_cur_scope->__pyx_v_k, 1, int, __Pyx_PyInt_From_int); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_15 = PyNumber_InPlaceSubtract(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2518, __pyx_L1_error) + __pyx_t_15 = PyNumber_InPlaceSubtract(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_18 = __pyx_PyFloat_AsFloat(__pyx_t_15); if (unlikely((__pyx_t_18 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2518, __pyx_L1_error) + __pyx_t_18 = __pyx_PyFloat_AsFloat(__pyx_t_15); if (unlikely((__pyx_t_18 == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2543, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_cur_scope->__pyx_v_current_cov = __pyx_t_18; - /* "_rnaseq_utils.pyx":2517 + /* "_rnaseq_utils.pyx":2542 * elif l > old_l: # Read advanced, but not by enough to automatically cut * passed_positions = [k for k in end_positions.keys() if k <= l] * for k in passed_positions: # <<<<<<<<<<<<<< @@ -59924,29 +60792,29 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2520 + /* "_rnaseq_utils.pyx":2545 * current_cov -= end_positions.pop(k) * * if current_cov * span_length < minimum_proportion * span_weight: # Current cov is sufficiently lower than mean cov to cause a break # <<<<<<<<<<<<<< * yield [outread for outread in dataset.read_list[:-1] if outread.span[1] < l] * dataset.read_list = [read] */ - __pyx_t_14 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_current_cov); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_14 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_current_cov); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (unlikely(!__pyx_cur_scope->__pyx_v_span_length)) { __Pyx_RaiseUnboundLocalError("span_length"); __PYX_ERR(0, 2520, __pyx_L1_error) } - __pyx_t_15 = PyNumber_Multiply(__pyx_t_14, __pyx_cur_scope->__pyx_v_span_length); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2520, __pyx_L1_error) + if (unlikely(!__pyx_cur_scope->__pyx_v_span_length)) { __Pyx_RaiseUnboundLocalError("span_length"); __PYX_ERR(0, 2545, __pyx_L1_error) } + __pyx_t_15 = PyNumber_Multiply(__pyx_t_14, __pyx_cur_scope->__pyx_v_span_length); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_minimum_proportion * __pyx_cur_scope->__pyx_v_span_weight)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_14 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_minimum_proportion * __pyx_cur_scope->__pyx_v_span_weight)); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_15, __pyx_t_14, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_7 = PyObject_RichCompare(__pyx_t_15, __pyx_t_14, Py_LT); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2520, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2545, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2521 + /* "_rnaseq_utils.pyx":2546 * * if current_cov * span_length < minimum_proportion * span_weight: # Current cov is sufficiently lower than mean cov to cause a break * yield [outread for outread in dataset.read_list[:-1] if outread.span[1] < l] # <<<<<<<<<<<<<< @@ -59954,32 +60822,32 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ * span_start = l */ { /* enter inner scope */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); if (unlikely(__pyx_cur_scope->__pyx_v_dataset->read_list == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2521, __pyx_L1_error) + __PYX_ERR(0, 2546, __pyx_L1_error) } - __pyx_t_14 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_dataset->read_list, 0, -1L); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_dataset->read_list, 0, -1L); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __pyx_t_14; __Pyx_INCREF(__pyx_t_15); __pyx_t_19 = 0; __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; for (;;) { if (__pyx_t_19 >= PyList_GET_SIZE(__pyx_t_15)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_14 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_19); __Pyx_INCREF(__pyx_t_14); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_14 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_19); __Pyx_INCREF(__pyx_t_14); __pyx_t_19++; if (unlikely(0 < 0)) __PYX_ERR(0, 2546, __pyx_L1_error) #else - __pyx_t_14 = PySequence_ITEM(__pyx_t_15, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2521, __pyx_L1_error) + __pyx_t_14 = PySequence_ITEM(__pyx_t_15, __pyx_t_19); __pyx_t_19++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2546, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif - if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2521, __pyx_L1_error) - __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_9genexpr51__pyx_v_outread)); - __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_9genexpr51__pyx_v_outread, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_14)); + if (!(likely(((__pyx_t_14) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_14, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2546, __pyx_L1_error) + __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_9genexpr53__pyx_v_outread)); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_9genexpr53__pyx_v_outread, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_14)); __Pyx_GIVEREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_3 = ((__pyx_cur_scope->__pyx_9genexpr51__pyx_v_outread->span.f1 < __pyx_cur_scope->__pyx_v_l) != 0); + __pyx_t_3 = ((__pyx_cur_scope->__pyx_9genexpr53__pyx_v_outread->span.f1 < __pyx_cur_scope->__pyx_v_l) != 0); if (__pyx_t_3) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_cur_scope->__pyx_9genexpr51__pyx_v_outread))) __PYX_ERR(0, 2521, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_cur_scope->__pyx_9genexpr53__pyx_v_outread))) __PYX_ERR(0, 2546, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -60002,16 +60870,16 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_XGOTREF(__pyx_t_5); __pyx_t_12 = __pyx_cur_scope->__pyx_t_1; __pyx_t_13 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2521, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2546, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2522 + /* "_rnaseq_utils.pyx":2547 * if current_cov * span_length < minimum_proportion * span_weight: # Current cov is sufficiently lower than mean cov to cause a break * yield [outread for outread in dataset.read_list[:-1] if outread.span[1] < l] * dataset.read_list = [read] # <<<<<<<<<<<<<< * span_start = l * span_weight = 0 */ - __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2522, __pyx_L1_error) + __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_v_read)); __Pyx_GIVEREF(((PyObject *)__pyx_cur_scope->__pyx_v_read)); @@ -60022,21 +60890,21 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_cur_scope->__pyx_v_dataset->read_list = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":2523 + /* "_rnaseq_utils.pyx":2548 * yield [outread for outread in dataset.read_list[:-1] if outread.span[1] < l] * dataset.read_list = [read] * span_start = l # <<<<<<<<<<<<<< * span_weight = 0 * current_cov = read.weight */ - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_l); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2523, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_l); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2548, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_span_start); __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_span_start, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":2524 + /* "_rnaseq_utils.pyx":2549 * dataset.read_list = [read] * span_start = l * span_weight = 0 # <<<<<<<<<<<<<< @@ -60045,7 +60913,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_span_weight = 0.0; - /* "_rnaseq_utils.pyx":2525 + /* "_rnaseq_utils.pyx":2550 * span_start = l * span_weight = 0 * current_cov = read.weight # <<<<<<<<<<<<<< @@ -60055,14 +60923,14 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_t_18 = __pyx_cur_scope->__pyx_v_read->weight; __pyx_cur_scope->__pyx_v_current_cov = __pyx_t_18; - /* "_rnaseq_utils.pyx":2526 + /* "_rnaseq_utils.pyx":2551 * span_weight = 0 * current_cov = read.weight * end_positions = Counter() # <<<<<<<<<<<<<< * rightmost = r * */ - __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_Counter); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2526, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_15, __pyx_n_s_Counter); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) { @@ -60076,7 +60944,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_t_7 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_15); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2526, __pyx_L1_error) + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_end_positions); @@ -60084,7 +60952,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_GIVEREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":2527 + /* "_rnaseq_utils.pyx":2552 * current_cov = read.weight * end_positions = Counter() * rightmost = r # <<<<<<<<<<<<<< @@ -60093,7 +60961,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_rightmost = __pyx_cur_scope->__pyx_v_r; - /* "_rnaseq_utils.pyx":2520 + /* "_rnaseq_utils.pyx":2545 * current_cov -= end_positions.pop(k) * * if current_cov * span_length < minimum_proportion * span_weight: # Current cov is sufficiently lower than mean cov to cause a break # <<<<<<<<<<<<<< @@ -60102,7 +60970,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ } - /* "_rnaseq_utils.pyx":2515 + /* "_rnaseq_utils.pyx":2540 * end_positions = Counter() * rightmost = r * elif l > old_l: # Read advanced, but not by enough to automatically cut # <<<<<<<<<<<<<< @@ -60112,7 +60980,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_L15:; - /* "_rnaseq_utils.pyx":2529 + /* "_rnaseq_utils.pyx":2554 * rightmost = r * * end_positions[r] += read.weight # Add the read's weight to the position where the read ends # <<<<<<<<<<<<<< @@ -60120,18 +60988,18 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ * if r > rightmost: rightmost = r */ __pyx_t_10 = __pyx_cur_scope->__pyx_v_r; - __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_end_positions, __pyx_t_10, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2529, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_end_positions, __pyx_t_10, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_15 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_read->weight); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2529, __pyx_L1_error) + __pyx_t_15 = PyFloat_FromDouble(__pyx_cur_scope->__pyx_v_read->weight); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2529, __pyx_L1_error) + __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_t_7, __pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2554, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; - if (unlikely(__Pyx_SetItemInt(__pyx_cur_scope->__pyx_v_end_positions, __pyx_t_10, __pyx_t_14, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 2529, __pyx_L1_error) + if (unlikely(__Pyx_SetItemInt(__pyx_cur_scope->__pyx_v_end_positions, __pyx_t_10, __pyx_t_14, int, 1, __Pyx_PyInt_From_int, 0, 1, 1) < 0)) __PYX_ERR(0, 2554, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2530 + /* "_rnaseq_utils.pyx":2555 * * end_positions[r] += read.weight # Add the read's weight to the position where the read ends * span_weight += read_weight # <<<<<<<<<<<<<< @@ -60140,7 +61008,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_span_weight = (__pyx_cur_scope->__pyx_v_span_weight + __pyx_cur_scope->__pyx_v_read_weight); - /* "_rnaseq_utils.pyx":2531 + /* "_rnaseq_utils.pyx":2556 * end_positions[r] += read.weight # Add the read's weight to the position where the read ends * span_weight += read_weight * if r > rightmost: rightmost = r # <<<<<<<<<<<<<< @@ -60152,16 +61020,16 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_cur_scope->__pyx_v_rightmost = __pyx_cur_scope->__pyx_v_r; } - /* "_rnaseq_utils.pyx":2532 + /* "_rnaseq_utils.pyx":2557 * span_weight += read_weight * if r > rightmost: rightmost = r * span_length = rightmost - span_start # <<<<<<<<<<<<<< * old_chrom, old_l, old_r = read.chrom, l, r * */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_rightmost); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2532, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_rightmost); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = PyNumber_Subtract(__pyx_t_14, __pyx_cur_scope->__pyx_v_span_start); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2532, __pyx_L1_error) + __pyx_t_15 = PyNumber_Subtract(__pyx_t_14, __pyx_cur_scope->__pyx_v_span_start); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_span_length); @@ -60169,7 +61037,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __Pyx_GIVEREF(__pyx_t_15); __pyx_t_15 = 0; - /* "_rnaseq_utils.pyx":2533 + /* "_rnaseq_utils.pyx":2558 * if r > rightmost: rightmost = r * span_length = rightmost - span_start * old_chrom, old_l, old_r = read.chrom, l, r # <<<<<<<<<<<<<< @@ -60183,7 +61051,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_cur_scope->__pyx_v_old_l = __pyx_t_11; __pyx_cur_scope->__pyx_v_old_r = __pyx_t_9; - /* "_rnaseq_utils.pyx":2480 + /* "_rnaseq_utils.pyx":2505 * current_cov = 0 * span_weight = 0 * for line in fileconn: # <<<<<<<<<<<<<< @@ -60194,7 +61062,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "_rnaseq_utils.pyx":2536 + /* "_rnaseq_utils.pyx":2561 * * # Dump the remaining reads * yield dataset.read_list # <<<<<<<<<<<<<< @@ -60210,16 +61078,16 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ __pyx_generator->resume_label = 4; return __pyx_r; __pyx_L37_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2536, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2561, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2537 + /* "_rnaseq_utils.pyx":2562 * # Dump the remaining reads * yield dataset.read_list * fileconn.close() # <<<<<<<<<<<<<< * * def generate_subchunks(list list_of_reads, list split_positions): */ - __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fileconn, __pyx_n_s_close); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2537, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_fileconn, __pyx_n_s_close); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 2562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) { @@ -60233,13 +61101,13 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } __pyx_t_5 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_15); __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2537, __pyx_L1_error) + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_rnaseq_utils.pyx":2459 + /* "_rnaseq_utils.pyx":2484 * return False * * def read_generator(fileconn, RNAseqDataset dataset, str file_type, int max_gap, float minimum_proportion): # <<<<<<<<<<<<<< @@ -60270,7 +61138,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_32generator3(__pyx_CoroutineObject *__ } static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */ -/* "_rnaseq_utils.pyx":2539 +/* "_rnaseq_utils.pyx":2564 * fileconn.close() * * def generate_subchunks(list list_of_reads, list split_positions): # <<<<<<<<<<<<<< @@ -60313,11 +61181,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_34generate_subchunks(PyObject *__pyx_s case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_split_positions)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("generate_subchunks", 1, 2, 2, 1); __PYX_ERR(0, 2539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("generate_subchunks", 1, 2, 2, 1); __PYX_ERR(0, 2564, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_subchunks") < 0)) __PYX_ERR(0, 2539, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_subchunks") < 0)) __PYX_ERR(0, 2564, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -60330,14 +61198,14 @@ static PyObject *__pyx_pw_13_rnaseq_utils_34generate_subchunks(PyObject *__pyx_s } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("generate_subchunks", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2539, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("generate_subchunks", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2564, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.generate_subchunks", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_reads), (&PyList_Type), 1, "list_of_reads", 1))) __PYX_ERR(0, 2539, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_split_positions), (&PyList_Type), 1, "split_positions", 1))) __PYX_ERR(0, 2539, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_reads), (&PyList_Type), 1, "list_of_reads", 1))) __PYX_ERR(0, 2564, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_split_positions), (&PyList_Type), 1, "split_positions", 1))) __PYX_ERR(0, 2564, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_33generate_subchunks(__pyx_self, __pyx_v_list_of_reads, __pyx_v_split_positions); /* function exit code */ @@ -60361,7 +61229,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_33generate_subchunks(CYTHON_UNUSED PyO if (unlikely(!__pyx_cur_scope)) { __pyx_cur_scope = ((struct __pyx_obj_13_rnaseq_utils___pyx_scope_struct_6_generate_subchunks *)Py_None); __Pyx_INCREF(Py_None); - __PYX_ERR(0, 2539, __pyx_L1_error) + __PYX_ERR(0, 2564, __pyx_L1_error) } else { __Pyx_GOTREF(__pyx_cur_scope); } @@ -60372,7 +61240,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_33generate_subchunks(CYTHON_UNUSED PyO __Pyx_INCREF(__pyx_cur_scope->__pyx_v_split_positions); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_split_positions); { - __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_35generator4, __pyx_codeobj__63, (PyObject *) __pyx_cur_scope, __pyx_n_s_generate_subchunks, __pyx_n_s_generate_subchunks, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 2539, __pyx_L1_error) + __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_13_rnaseq_utils_35generator4, __pyx_codeobj__63, (PyObject *) __pyx_cur_scope, __pyx_n_s_generate_subchunks, __pyx_n_s_generate_subchunks, __pyx_n_s_rnaseq_utils); if (unlikely(!gen)) __PYX_ERR(0, 2564, __pyx_L1_error) __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; @@ -60421,9 +61289,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ return NULL; } __pyx_L3_first_run:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2539, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2564, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2545 + /* "_rnaseq_utils.pyx":2570 * set ignore * * lasti = 0 # <<<<<<<<<<<<<< @@ -60432,46 +61300,46 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_lasti = 0; - /* "_rnaseq_utils.pyx":2546 + /* "_rnaseq_utils.pyx":2571 * * lasti = 0 * position = iter(split_positions) # <<<<<<<<<<<<<< * sp = next(position) * ignore = set() */ - __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_split_positions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2546, __pyx_L1_error) + __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_split_positions); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_position = __pyx_t_1; __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2547 + /* "_rnaseq_utils.pyx":2572 * lasti = 0 * position = iter(split_positions) * sp = next(position) # <<<<<<<<<<<<<< * ignore = set() * for i,read in enumerate(list_of_reads): */ - __pyx_t_1 = __Pyx_PyIter_Next(__pyx_cur_scope->__pyx_v_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyIter_Next(__pyx_cur_scope->__pyx_v_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2547, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2572, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_cur_scope->__pyx_v_sp = __pyx_t_2; - /* "_rnaseq_utils.pyx":2548 + /* "_rnaseq_utils.pyx":2573 * position = iter(split_positions) * sp = next(position) * ignore = set() # <<<<<<<<<<<<<< * for i,read in enumerate(list_of_reads): * if read.span[0] > sp: # The current read passes the split */ - __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2548, __pyx_L1_error) + __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2573, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_v_ignore = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2549 + /* "_rnaseq_utils.pyx":2574 * sp = next(position) * ignore = set() * for i,read in enumerate(list_of_reads): # <<<<<<<<<<<<<< @@ -60483,12 +61351,12 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ for (;;) { if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2549, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_4); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2574, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2549, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif - if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2549, __pyx_L1_error) + if (!(likely(((__pyx_t_4) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_4, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2574, __pyx_L1_error) __Pyx_XGOTREF(((PyObject *)__pyx_cur_scope->__pyx_v_read)); __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_4)); __Pyx_GIVEREF(__pyx_t_4); @@ -60496,7 +61364,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_cur_scope->__pyx_v_i = __pyx_t_2; __pyx_t_2 = (__pyx_t_2 + 1); - /* "_rnaseq_utils.pyx":2550 + /* "_rnaseq_utils.pyx":2575 * ignore = set() * for i,read in enumerate(list_of_reads): * if read.span[0] > sp: # The current read passes the split # <<<<<<<<<<<<<< @@ -60506,7 +61374,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_read->span.f0 > __pyx_cur_scope->__pyx_v_sp) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":2551 + /* "_rnaseq_utils.pyx":2576 * for i,read in enumerate(list_of_reads): * if read.span[0] > sp: # The current read passes the split * if i > lasti: # <<<<<<<<<<<<<< @@ -60516,7 +61384,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_t_5 = ((__pyx_cur_scope->__pyx_v_i > __pyx_cur_scope->__pyx_v_lasti) != 0); if (__pyx_t_5) { - /* "_rnaseq_utils.pyx":2552 + /* "_rnaseq_utils.pyx":2577 * if read.span[0] > sp: # The current read passes the split * if i > lasti: * yield [list_of_reads[r] for r in range(lasti, i) if r not in ignore] # <<<<<<<<<<<<<< @@ -60524,25 +61392,25 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ * lasti = i */ { /* enter inner scope */ - __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2552, __pyx_L1_error) + __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = __pyx_cur_scope->__pyx_v_i; __pyx_t_7 = __pyx_t_6; for (__pyx_t_8 = __pyx_cur_scope->__pyx_v_lasti; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) { - __pyx_cur_scope->__pyx_9genexpr52__pyx_v_r = __pyx_t_8; - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_9genexpr52__pyx_v_r); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2552, __pyx_L1_error) + __pyx_cur_scope->__pyx_9genexpr54__pyx_v_r = __pyx_t_8; + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_9genexpr54__pyx_v_r); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_t_9, __pyx_cur_scope->__pyx_v_ignore, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2552, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PySet_ContainsTF(__pyx_t_9, __pyx_cur_scope->__pyx_v_ignore, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_10 = (__pyx_t_5 != 0); if (__pyx_t_10) { if (unlikely(__pyx_cur_scope->__pyx_v_list_of_reads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2552, __pyx_L1_error) + __PYX_ERR(0, 2577, __pyx_L1_error) } - __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_list_of_reads, __pyx_cur_scope->__pyx_9genexpr52__pyx_v_r, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2552, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetItemInt_List(__pyx_cur_scope->__pyx_v_list_of_reads, __pyx_cur_scope->__pyx_9genexpr54__pyx_v_r, int, 1, __Pyx_PyInt_From_int, 1, 1, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 2552, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_9))) __PYX_ERR(0, 2577, __pyx_L1_error) __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; } } @@ -60565,9 +61433,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2552, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2577, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2551 + /* "_rnaseq_utils.pyx":2576 * for i,read in enumerate(list_of_reads): * if read.span[0] > sp: # The current read passes the split * if i > lasti: # <<<<<<<<<<<<<< @@ -60576,7 +61444,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ */ } - /* "_rnaseq_utils.pyx":2554 + /* "_rnaseq_utils.pyx":2579 * yield [list_of_reads[r] for r in range(lasti, i) if r not in ignore] * * lasti = i # <<<<<<<<<<<<<< @@ -60585,7 +61453,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_lasti = __pyx_cur_scope->__pyx_v_i; - /* "_rnaseq_utils.pyx":2555 + /* "_rnaseq_utils.pyx":2580 * * lasti = i * try: # <<<<<<<<<<<<<< @@ -60599,7 +61467,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __Pyx_XGOTREF(__pyx_t_13); /*try:*/ { - /* "_rnaseq_utils.pyx":2556 + /* "_rnaseq_utils.pyx":2581 * lasti = i * try: * while sp < read.span[0]: # <<<<<<<<<<<<<< @@ -60610,21 +61478,21 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_t_10 = ((__pyx_cur_scope->__pyx_v_sp < __pyx_cur_scope->__pyx_v_read->span.f0) != 0); if (!__pyx_t_10) break; - /* "_rnaseq_utils.pyx":2557 + /* "_rnaseq_utils.pyx":2582 * try: * while sp < read.span[0]: * sp = next(position) # <<<<<<<<<<<<<< * except StopIteration: * lasti = i */ - __pyx_t_4 = __Pyx_PyIter_Next(__pyx_cur_scope->__pyx_v_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L12_error) + __pyx_t_4 = __Pyx_PyIter_Next(__pyx_cur_scope->__pyx_v_position); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2582, __pyx_L12_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2557, __pyx_L12_error) + __pyx_t_6 = __Pyx_PyInt_As_int(__pyx_t_4); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2582, __pyx_L12_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_cur_scope->__pyx_v_sp = __pyx_t_6; } - /* "_rnaseq_utils.pyx":2555 + /* "_rnaseq_utils.pyx":2580 * * lasti = i * try: # <<<<<<<<<<<<<< @@ -60640,7 +61508,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":2558 + /* "_rnaseq_utils.pyx":2583 * while sp < read.span[0]: * sp = next(position) * except StopIteration: # <<<<<<<<<<<<<< @@ -60650,12 +61518,12 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_t_6 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_StopIteration); if (__pyx_t_6) { __Pyx_AddTraceback("_rnaseq_utils.generate_subchunks", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_14) < 0) __PYX_ERR(0, 2558, __pyx_L14_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_9, &__pyx_t_14) < 0) __PYX_ERR(0, 2583, __pyx_L14_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_9); __Pyx_GOTREF(__pyx_t_14); - /* "_rnaseq_utils.pyx":2559 + /* "_rnaseq_utils.pyx":2584 * sp = next(position) * except StopIteration: * lasti = i # <<<<<<<<<<<<<< @@ -60664,7 +61532,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ */ __pyx_cur_scope->__pyx_v_lasti = __pyx_cur_scope->__pyx_v_i; - /* "_rnaseq_utils.pyx":2560 + /* "_rnaseq_utils.pyx":2585 * except StopIteration: * lasti = i * break # <<<<<<<<<<<<<< @@ -60681,7 +61549,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ goto __pyx_L14_except_error; __pyx_L14_except_error:; - /* "_rnaseq_utils.pyx":2555 + /* "_rnaseq_utils.pyx":2580 * * lasti = i * try: # <<<<<<<<<<<<<< @@ -60702,7 +61570,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_L19_try_end:; } - /* "_rnaseq_utils.pyx":2550 + /* "_rnaseq_utils.pyx":2575 * ignore = set() * for i,read in enumerate(list_of_reads): * if read.span[0] > sp: # The current read passes the split # <<<<<<<<<<<<<< @@ -60711,7 +61579,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ */ } - /* "_rnaseq_utils.pyx":2562 + /* "_rnaseq_utils.pyx":2587 * break * * if read.span[1] > sp: # <<<<<<<<<<<<<< @@ -60721,19 +61589,19 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_t_10 = ((__pyx_cur_scope->__pyx_v_read->span.f1 > __pyx_cur_scope->__pyx_v_sp) != 0); if (__pyx_t_10) { - /* "_rnaseq_utils.pyx":2563 + /* "_rnaseq_utils.pyx":2588 * * if read.span[1] > sp: * ignore.add(i) # <<<<<<<<<<<<<< * * yield list_of_reads[lasti:] */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2563, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2588, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_15 = PySet_Add(__pyx_cur_scope->__pyx_v_ignore, __pyx_t_14); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2563, __pyx_L1_error) + __pyx_t_15 = PySet_Add(__pyx_cur_scope->__pyx_v_ignore, __pyx_t_14); if (unlikely(__pyx_t_15 == ((int)-1))) __PYX_ERR(0, 2588, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - /* "_rnaseq_utils.pyx":2562 + /* "_rnaseq_utils.pyx":2587 * break * * if read.span[1] > sp: # <<<<<<<<<<<<<< @@ -60742,7 +61610,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ */ } - /* "_rnaseq_utils.pyx":2549 + /* "_rnaseq_utils.pyx":2574 * sp = next(position) * ignore = set() * for i,read in enumerate(list_of_reads): # <<<<<<<<<<<<<< @@ -60753,7 +61621,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_L5_break:; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2565 + /* "_rnaseq_utils.pyx":2590 * ignore.add(i) * * yield list_of_reads[lasti:] # <<<<<<<<<<<<<< @@ -60762,9 +61630,9 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ */ if (unlikely(__pyx_cur_scope->__pyx_v_list_of_reads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 2565, __pyx_L1_error) + __PYX_ERR(0, 2590, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_list_of_reads, __pyx_cur_scope->__pyx_v_lasti, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2565, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_cur_scope->__pyx_v_list_of_reads, __pyx_cur_scope->__pyx_v_lasti, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -60775,10 +61643,10 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ __pyx_generator->resume_label = 2; return __pyx_r; __pyx_L25_resume_from_yield:; - if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2565, __pyx_L1_error) + if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2590, __pyx_L1_error) CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope); - /* "_rnaseq_utils.pyx":2539 + /* "_rnaseq_utils.pyx":2564 * fileconn.close() * * def generate_subchunks(list list_of_reads, list split_positions): # <<<<<<<<<<<<<< @@ -60806,7 +61674,7 @@ static PyObject *__pyx_gb_13_rnaseq_utils_35generator4(__pyx_CoroutineObject *__ return __pyx_r; } -/* "_rnaseq_utils.pyx":2568 +/* "_rnaseq_utils.pyx":2593 * * * cpdef (int, int) get_max_deltas(np.ndarray[float, ndim=1] array, float offset): # <<<<<<<<<<<<<< @@ -60850,11 +61718,11 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_pybuffernd_array.rcbuffer = &__pyx_pybuffer_array; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array.rcbuffer->pybuffer, (PyObject*)__pyx_v_array, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2568, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array.rcbuffer->pybuffer, (PyObject*)__pyx_v_array, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2593, __pyx_L1_error) } __pyx_pybuffernd_array.diminfo[0].strides = __pyx_pybuffernd_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_array.diminfo[0].shape = __pyx_pybuffernd_array.rcbuffer->pybuffer.shape[0]; - /* "_rnaseq_utils.pyx":2576 + /* "_rnaseq_utils.pyx":2601 * cdef Py_ssize_t i, j, l * cdef float vi, vj, delta, max_delta, min_delta * cdef (int, int) top_positions = (0, 0) # <<<<<<<<<<<<<< @@ -60865,19 +61733,19 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_t_1.f1 = 0; __pyx_v_top_positions = __pyx_t_1; - /* "_rnaseq_utils.pyx":2577 + /* "_rnaseq_utils.pyx":2602 * cdef float vi, vj, delta, max_delta, min_delta * cdef (int, int) top_positions = (0, 0) * cdef float [:] ARRAY = array # <<<<<<<<<<<<<< * if offset < 1: * offset = 1 */ - __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(((PyObject *)__pyx_v_array), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2577, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(((PyObject *)__pyx_v_array), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2602, __pyx_L1_error) __pyx_v_ARRAY = __pyx_t_2; __pyx_t_2.memview = NULL; __pyx_t_2.data = NULL; - /* "_rnaseq_utils.pyx":2578 + /* "_rnaseq_utils.pyx":2603 * cdef (int, int) top_positions = (0, 0) * cdef float [:] ARRAY = array * if offset < 1: # <<<<<<<<<<<<<< @@ -60887,7 +61755,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_t_3 = ((__pyx_v_offset < 1.0) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2579 + /* "_rnaseq_utils.pyx":2604 * cdef float [:] ARRAY = array * if offset < 1: * offset = 1 # <<<<<<<<<<<<<< @@ -60896,7 +61764,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO */ __pyx_v_offset = 1.0; - /* "_rnaseq_utils.pyx":2578 + /* "_rnaseq_utils.pyx":2603 * cdef (int, int) top_positions = (0, 0) * cdef float [:] ARRAY = array * if offset < 1: # <<<<<<<<<<<<<< @@ -60905,7 +61773,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO */ } - /* "_rnaseq_utils.pyx":2581 + /* "_rnaseq_utils.pyx":2606 * offset = 1 * * l = array.shape[0] # <<<<<<<<<<<<<< @@ -60914,7 +61782,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO */ __pyx_v_l = (__pyx_v_array->dimensions[0]); - /* "_rnaseq_utils.pyx":2582 + /* "_rnaseq_utils.pyx":2607 * * l = array.shape[0] * max_delta = min_delta = 0 # <<<<<<<<<<<<<< @@ -60924,7 +61792,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_v_max_delta = 0.0; __pyx_v_min_delta = 0.0; - /* "_rnaseq_utils.pyx":2583 + /* "_rnaseq_utils.pyx":2608 * l = array.shape[0] * max_delta = min_delta = 0 * for i in range(1, l): # <<<<<<<<<<<<<< @@ -60936,7 +61804,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "_rnaseq_utils.pyx":2584 + /* "_rnaseq_utils.pyx":2609 * max_delta = min_delta = 0 * for i in range(1, l): * j = i - 1 # <<<<<<<<<<<<<< @@ -60945,7 +61813,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO */ __pyx_v_j = (__pyx_v_i - 1); - /* "_rnaseq_utils.pyx":2585 + /* "_rnaseq_utils.pyx":2610 * for i in range(1, l): * j = i - 1 * vi = ARRAY[i] # <<<<<<<<<<<<<< @@ -60960,11 +61828,11 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO } else if (unlikely(__pyx_t_7 >= __pyx_v_ARRAY.shape[0])) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); - __PYX_ERR(0, 2585, __pyx_L1_error) + __PYX_ERR(0, 2610, __pyx_L1_error) } __pyx_v_vi = (*((float *) ( /* dim=0 */ (__pyx_v_ARRAY.data + __pyx_t_7 * __pyx_v_ARRAY.strides[0]) ))); - /* "_rnaseq_utils.pyx":2586 + /* "_rnaseq_utils.pyx":2611 * j = i - 1 * vi = ARRAY[i] * vj = ARRAY[j] # <<<<<<<<<<<<<< @@ -60979,11 +61847,11 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO } else if (unlikely(__pyx_t_7 >= __pyx_v_ARRAY.shape[0])) __pyx_t_8 = 0; if (unlikely(__pyx_t_8 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_8); - __PYX_ERR(0, 2586, __pyx_L1_error) + __PYX_ERR(0, 2611, __pyx_L1_error) } __pyx_v_vj = (*((float *) ( /* dim=0 */ (__pyx_v_ARRAY.data + __pyx_t_7 * __pyx_v_ARRAY.strides[0]) ))); - /* "_rnaseq_utils.pyx":2587 + /* "_rnaseq_utils.pyx":2612 * vi = ARRAY[i] * vj = ARRAY[j] * delta = (vi - vj)/(vi + offset) # <<<<<<<<<<<<<< @@ -60994,11 +61862,11 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_t_10 = (__pyx_v_vi + __pyx_v_offset); if (unlikely(__pyx_t_10 == 0)) { PyErr_SetString(PyExc_ZeroDivisionError, "float division"); - __PYX_ERR(0, 2587, __pyx_L1_error) + __PYX_ERR(0, 2612, __pyx_L1_error) } __pyx_v_delta = (__pyx_t_9 / __pyx_t_10); - /* "_rnaseq_utils.pyx":2588 + /* "_rnaseq_utils.pyx":2613 * vj = ARRAY[j] * delta = (vi - vj)/(vi + offset) * if delta > max_delta: # A gap begins or extends # <<<<<<<<<<<<<< @@ -61008,7 +61876,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_t_3 = ((__pyx_v_delta > __pyx_v_max_delta) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2589 + /* "_rnaseq_utils.pyx":2614 * delta = (vi - vj)/(vi + offset) * if delta > max_delta: # A gap begins or extends * max_delta = delta # <<<<<<<<<<<<<< @@ -61017,7 +61885,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO */ __pyx_v_max_delta = __pyx_v_delta; - /* "_rnaseq_utils.pyx":2590 + /* "_rnaseq_utils.pyx":2615 * if delta > max_delta: # A gap begins or extends * max_delta = delta * top_positions[0] = i # <<<<<<<<<<<<<< @@ -61026,7 +61894,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO */ __pyx_v_top_positions.f0 = __pyx_v_i; - /* "_rnaseq_utils.pyx":2588 + /* "_rnaseq_utils.pyx":2613 * vj = ARRAY[j] * delta = (vi - vj)/(vi + offset) * if delta > max_delta: # A gap begins or extends # <<<<<<<<<<<<<< @@ -61036,7 +61904,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO goto __pyx_L6; } - /* "_rnaseq_utils.pyx":2591 + /* "_rnaseq_utils.pyx":2616 * max_delta = delta * top_positions[0] = i * elif delta < min_delta: # Not in a gap # <<<<<<<<<<<<<< @@ -61046,7 +61914,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_t_3 = ((__pyx_v_delta < __pyx_v_min_delta) != 0); if (__pyx_t_3) { - /* "_rnaseq_utils.pyx":2592 + /* "_rnaseq_utils.pyx":2617 * top_positions[0] = i * elif delta < min_delta: # Not in a gap * min_delta = delta # <<<<<<<<<<<<<< @@ -61055,7 +61923,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO */ __pyx_v_min_delta = __pyx_v_delta; - /* "_rnaseq_utils.pyx":2593 + /* "_rnaseq_utils.pyx":2618 * elif delta < min_delta: # Not in a gap * min_delta = delta * top_positions[1] = i-1 # <<<<<<<<<<<<<< @@ -61064,7 +61932,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO */ __pyx_v_top_positions.f1 = (__pyx_v_i - 1); - /* "_rnaseq_utils.pyx":2591 + /* "_rnaseq_utils.pyx":2616 * max_delta = delta * top_positions[0] = i * elif delta < min_delta: # Not in a gap # <<<<<<<<<<<<<< @@ -61075,7 +61943,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_L6:; } - /* "_rnaseq_utils.pyx":2595 + /* "_rnaseq_utils.pyx":2620 * top_positions[1] = i-1 * * return top_positions # <<<<<<<<<<<<<< @@ -61085,7 +61953,7 @@ static __pyx_ctuple_int__and_int __pyx_f_13_rnaseq_utils_get_max_deltas(PyArrayO __pyx_r = __pyx_v_top_positions; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2568 + /* "_rnaseq_utils.pyx":2593 * * * cpdef (int, int) get_max_deltas(np.ndarray[float, ndim=1] array, float offset): # <<<<<<<<<<<<<< @@ -61148,11 +62016,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_37get_max_deltas(PyObject *__pyx_self, case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_offset)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_max_deltas", 1, 2, 2, 1); __PYX_ERR(0, 2568, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_max_deltas", 1, 2, 2, 1); __PYX_ERR(0, 2593, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_max_deltas") < 0)) __PYX_ERR(0, 2568, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_max_deltas") < 0)) __PYX_ERR(0, 2593, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -61161,17 +62029,17 @@ static PyObject *__pyx_pw_13_rnaseq_utils_37get_max_deltas(PyObject *__pyx_self, values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_array = ((PyArrayObject *)values[0]); - __pyx_v_offset = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_offset == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2568, __pyx_L3_error) + __pyx_v_offset = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_offset == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 2593, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_max_deltas", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2568, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_max_deltas", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2593, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.get_max_deltas", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_array), __pyx_ptype_5numpy_ndarray, 1, "array", 0))) __PYX_ERR(0, 2568, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_array), __pyx_ptype_5numpy_ndarray, 1, "array", 0))) __PYX_ERR(0, 2593, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_36get_max_deltas(__pyx_self, __pyx_v_array, __pyx_v_offset); /* function exit code */ @@ -61199,11 +62067,11 @@ static PyObject *__pyx_pf_13_rnaseq_utils_36get_max_deltas(CYTHON_UNUSED PyObjec __pyx_pybuffernd_array.rcbuffer = &__pyx_pybuffer_array; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array.rcbuffer->pybuffer, (PyObject*)__pyx_v_array, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2568, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array.rcbuffer->pybuffer, (PyObject*)__pyx_v_array, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2593, __pyx_L1_error) } __pyx_pybuffernd_array.diminfo[0].strides = __pyx_pybuffernd_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_array.diminfo[0].shape = __pyx_pybuffernd_array.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_f_13_rnaseq_utils_get_max_deltas(__pyx_v_array, __pyx_v_offset, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2568, __pyx_L1_error) + __pyx_t_1 = __pyx_convert__to_py___pyx_ctuple_int__and_int(__pyx_f_13_rnaseq_utils_get_max_deltas(__pyx_v_array, __pyx_v_offset, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2593, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -61229,7 +62097,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_36get_max_deltas(CYTHON_UNUSED PyObjec return __pyx_r; } -/* "_rnaseq_utils.pyx":2597 +/* "_rnaseq_utils.pyx":2622 * return top_positions * * cpdef bint has_ends(list list_of_reads, bint require_cap): # <<<<<<<<<<<<<< @@ -61262,7 +62130,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_ends", 0); - /* "_rnaseq_utils.pyx":2600 + /* "_rnaseq_utils.pyx":2625 * cdef RNAseqMapping read * cdef bint sp, cp, ep, sm, cm, em * sp, cp, ep, sm, cm, em = False, False, False, False, False, False # <<<<<<<<<<<<<< @@ -61282,7 +62150,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_v_cm = __pyx_t_5; __pyx_v_em = __pyx_t_6; - /* "_rnaseq_utils.pyx":2601 + /* "_rnaseq_utils.pyx":2626 * cdef bint sp, cp, ep, sm, cm, em * sp, cp, ep, sm, cm, em = False, False, False, False, False, False * for read in list_of_reads: # <<<<<<<<<<<<<< @@ -61291,22 +62159,22 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int */ if (unlikely(__pyx_v_list_of_reads == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 2601, __pyx_L1_error) + __PYX_ERR(0, 2626, __pyx_L1_error) } __pyx_t_7 = __pyx_v_list_of_reads; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; for (;;) { if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_9 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2601, __pyx_L1_error) + __pyx_t_9 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_9); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2626, __pyx_L1_error) #else - __pyx_t_9 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2601, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2626, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); #endif - if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2601, __pyx_L1_error) + if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_13_rnaseq_utils_RNAseqMapping))))) __PYX_ERR(0, 2626, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_read, ((struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *)__pyx_t_9)); __pyx_t_9 = 0; - /* "_rnaseq_utils.pyx":2602 + /* "_rnaseq_utils.pyx":2627 * sp, cp, ep, sm, cm, em = False, False, False, False, False, False * for read in list_of_reads: * if read.strand == 1: # <<<<<<<<<<<<<< @@ -61316,7 +62184,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int switch (__pyx_v_read->strand) { case 1: - /* "_rnaseq_utils.pyx":2603 + /* "_rnaseq_utils.pyx":2628 * for read in list_of_reads: * if read.strand == 1: * sp = sp or read.s_tag # <<<<<<<<<<<<<< @@ -61334,7 +62202,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_L5_bool_binop_done:; __pyx_v_sp = __pyx_t_6; - /* "_rnaseq_utils.pyx":2604 + /* "_rnaseq_utils.pyx":2629 * if read.strand == 1: * sp = sp or read.s_tag * cp = cp or read.capped # <<<<<<<<<<<<<< @@ -61352,7 +62220,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_L7_bool_binop_done:; __pyx_v_cp = __pyx_t_6; - /* "_rnaseq_utils.pyx":2605 + /* "_rnaseq_utils.pyx":2630 * sp = sp or read.s_tag * cp = cp or read.capped * ep = ep or read.e_tag # <<<<<<<<<<<<<< @@ -61370,7 +62238,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_L9_bool_binop_done:; __pyx_v_ep = __pyx_t_6; - /* "_rnaseq_utils.pyx":2606 + /* "_rnaseq_utils.pyx":2631 * cp = cp or read.capped * ep = ep or read.e_tag * if (not require_cap or cp) and sp and ep: # <<<<<<<<<<<<<< @@ -61400,7 +62268,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_L12_bool_binop_done:; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2607 + /* "_rnaseq_utils.pyx":2632 * ep = ep or read.e_tag * if (not require_cap or cp) and sp and ep: * return True # <<<<<<<<<<<<<< @@ -61411,7 +62279,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2606 + /* "_rnaseq_utils.pyx":2631 * cp = cp or read.capped * ep = ep or read.e_tag * if (not require_cap or cp) and sp and ep: # <<<<<<<<<<<<<< @@ -61420,7 +62288,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int */ } - /* "_rnaseq_utils.pyx":2602 + /* "_rnaseq_utils.pyx":2627 * sp, cp, ep, sm, cm, em = False, False, False, False, False, False * for read in list_of_reads: * if read.strand == 1: # <<<<<<<<<<<<<< @@ -61430,7 +62298,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int break; case -1L: - /* "_rnaseq_utils.pyx":2609 + /* "_rnaseq_utils.pyx":2634 * return True * elif read.strand == -1: * sm = sm or read.s_tag # <<<<<<<<<<<<<< @@ -61448,7 +62316,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_L16_bool_binop_done:; __pyx_v_sm = __pyx_t_6; - /* "_rnaseq_utils.pyx":2610 + /* "_rnaseq_utils.pyx":2635 * elif read.strand == -1: * sm = sm or read.s_tag * cm = cm or read.capped # <<<<<<<<<<<<<< @@ -61466,7 +62334,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_L18_bool_binop_done:; __pyx_v_cm = __pyx_t_6; - /* "_rnaseq_utils.pyx":2611 + /* "_rnaseq_utils.pyx":2636 * sm = sm or read.s_tag * cm = cm or read.capped * em = em or read.e_tag # <<<<<<<<<<<<<< @@ -61484,7 +62352,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_L20_bool_binop_done:; __pyx_v_em = __pyx_t_6; - /* "_rnaseq_utils.pyx":2612 + /* "_rnaseq_utils.pyx":2637 * cm = cm or read.capped * em = em or read.e_tag * if (not require_cap or cm) and sm and em: # <<<<<<<<<<<<<< @@ -61514,7 +62382,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_L23_bool_binop_done:; if (__pyx_t_6) { - /* "_rnaseq_utils.pyx":2613 + /* "_rnaseq_utils.pyx":2638 * em = em or read.e_tag * if (not require_cap or cm) and sm and em: * return True # <<<<<<<<<<<<<< @@ -61525,7 +62393,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2612 + /* "_rnaseq_utils.pyx":2637 * cm = cm or read.capped * em = em or read.e_tag * if (not require_cap or cm) and sm and em: # <<<<<<<<<<<<<< @@ -61534,7 +62402,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int */ } - /* "_rnaseq_utils.pyx":2608 + /* "_rnaseq_utils.pyx":2633 * if (not require_cap or cp) and sp and ep: * return True * elif read.strand == -1: # <<<<<<<<<<<<<< @@ -61545,7 +62413,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int default: break; } - /* "_rnaseq_utils.pyx":2601 + /* "_rnaseq_utils.pyx":2626 * cdef bint sp, cp, ep, sm, cm, em * sp, cp, ep, sm, cm, em = False, False, False, False, False, False * for read in list_of_reads: # <<<<<<<<<<<<<< @@ -61555,7 +62423,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "_rnaseq_utils.pyx":2615 + /* "_rnaseq_utils.pyx":2640 * return True * * return False # <<<<<<<<<<<<<< @@ -61565,7 +62433,7 @@ static int __pyx_f_13_rnaseq_utils_has_ends(PyObject *__pyx_v_list_of_reads, int __pyx_r = 0; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2597 + /* "_rnaseq_utils.pyx":2622 * return top_positions * * cpdef bint has_ends(list list_of_reads, bint require_cap): # <<<<<<<<<<<<<< @@ -61619,11 +62487,11 @@ static PyObject *__pyx_pw_13_rnaseq_utils_39has_ends(PyObject *__pyx_self, PyObj case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_require_cap)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("has_ends", 1, 2, 2, 1); __PYX_ERR(0, 2597, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("has_ends", 1, 2, 2, 1); __PYX_ERR(0, 2622, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "has_ends") < 0)) __PYX_ERR(0, 2597, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "has_ends") < 0)) __PYX_ERR(0, 2622, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -61632,17 +62500,17 @@ static PyObject *__pyx_pw_13_rnaseq_utils_39has_ends(PyObject *__pyx_self, PyObj values[1] = PyTuple_GET_ITEM(__pyx_args, 1); } __pyx_v_list_of_reads = ((PyObject*)values[0]); - __pyx_v_require_cap = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_require_cap == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2597, __pyx_L3_error) + __pyx_v_require_cap = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_require_cap == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2622, __pyx_L3_error) } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("has_ends", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2597, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("has_ends", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2622, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.has_ends", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_reads), (&PyList_Type), 1, "list_of_reads", 1))) __PYX_ERR(0, 2597, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_of_reads), (&PyList_Type), 1, "list_of_reads", 1))) __PYX_ERR(0, 2622, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_38has_ends(__pyx_self, __pyx_v_list_of_reads, __pyx_v_require_cap); /* function exit code */ @@ -61663,7 +62531,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_38has_ends(CYTHON_UNUSED PyObject *__p int __pyx_clineno = 0; __Pyx_RefNannySetupContext("has_ends", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_has_ends(__pyx_v_list_of_reads, __pyx_v_require_cap, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2597, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBool_FromLong(__pyx_f_13_rnaseq_utils_has_ends(__pyx_v_list_of_reads, __pyx_v_require_cap, 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2622, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -61680,7 +62548,7 @@ static PyObject *__pyx_pf_13_rnaseq_utils_38has_ends(CYTHON_UNUSED PyObject *__p return __pyx_r; } -/* "_rnaseq_utils.pyx":2617 +/* "_rnaseq_utils.pyx":2642 * return False * * cpdef list get_gaps(np.ndarray[float, ndim=1] array, int maxgap, threshold = float(1)): # <<<<<<<<<<<<<< @@ -61730,11 +62598,11 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, __pyx_pybuffernd_array.rcbuffer = &__pyx_pybuffer_array; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array.rcbuffer->pybuffer, (PyObject*)__pyx_v_array, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2617, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array.rcbuffer->pybuffer, (PyObject*)__pyx_v_array, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2642, __pyx_L1_error) } __pyx_pybuffernd_array.diminfo[0].strides = __pyx_pybuffernd_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_array.diminfo[0].shape = __pyx_pybuffernd_array.rcbuffer->pybuffer.shape[0]; - /* "_rnaseq_utils.pyx":2622 + /* "_rnaseq_utils.pyx":2647 * cdef int gap_length, gap_left, gap_right * cdef float value * cdef bint gap_is_long_enough = False # <<<<<<<<<<<<<< @@ -61743,31 +62611,31 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ __pyx_v_gap_is_long_enough = 0; - /* "_rnaseq_utils.pyx":2623 + /* "_rnaseq_utils.pyx":2648 * cdef float value * cdef bint gap_is_long_enough = False * cdef list gaps = [] # <<<<<<<<<<<<<< * cdef float [:] ARRAY = array * gap_length = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2623, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_gaps = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2624 + /* "_rnaseq_utils.pyx":2649 * cdef bint gap_is_long_enough = False * cdef list gaps = [] * cdef float [:] ARRAY = array # <<<<<<<<<<<<<< * gap_length = 0 * l = ARRAY.shape[0] */ - __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(((PyObject *)__pyx_v_array), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2624, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_to_MemoryviewSlice_ds_float(((PyObject *)__pyx_v_array), PyBUF_WRITABLE); if (unlikely(!__pyx_t_2.memview)) __PYX_ERR(0, 2649, __pyx_L1_error) __pyx_v_ARRAY = __pyx_t_2; __pyx_t_2.memview = NULL; __pyx_t_2.data = NULL; - /* "_rnaseq_utils.pyx":2625 + /* "_rnaseq_utils.pyx":2650 * cdef list gaps = [] * cdef float [:] ARRAY = array * gap_length = 0 # <<<<<<<<<<<<<< @@ -61776,7 +62644,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ __pyx_v_gap_length = 0; - /* "_rnaseq_utils.pyx":2626 + /* "_rnaseq_utils.pyx":2651 * cdef float [:] ARRAY = array * gap_length = 0 * l = ARRAY.shape[0] # <<<<<<<<<<<<<< @@ -61785,7 +62653,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ __pyx_v_l = (__pyx_v_ARRAY.shape[0]); - /* "_rnaseq_utils.pyx":2627 + /* "_rnaseq_utils.pyx":2652 * gap_length = 0 * l = ARRAY.shape[0] * for i in range(l): # <<<<<<<<<<<<<< @@ -61797,7 +62665,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, for (__pyx_t_5 = 0; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) { __pyx_v_i = __pyx_t_5; - /* "_rnaseq_utils.pyx":2628 + /* "_rnaseq_utils.pyx":2653 * l = ARRAY.shape[0] * for i in range(l): * value = ARRAY[i] # <<<<<<<<<<<<<< @@ -61812,26 +62680,26 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, } else if (unlikely(__pyx_t_6 >= __pyx_v_ARRAY.shape[0])) __pyx_t_7 = 0; if (unlikely(__pyx_t_7 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_7); - __PYX_ERR(0, 2628, __pyx_L1_error) + __PYX_ERR(0, 2653, __pyx_L1_error) } __pyx_v_value = (*((float *) ( /* dim=0 */ (__pyx_v_ARRAY.data + __pyx_t_6 * __pyx_v_ARRAY.strides[0]) ))); - /* "_rnaseq_utils.pyx":2629 + /* "_rnaseq_utils.pyx":2654 * for i in range(l): * value = ARRAY[i] * if value < threshold: # A gap begins or extends # <<<<<<<<<<<<<< * if gap_length == 0: # Beginning of a gap * gap_left = i+1 */ - __pyx_t_1 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2629, __pyx_L1_error) + __pyx_t_1 = PyFloat_FromDouble(__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_threshold, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2629, __pyx_L1_error) + __pyx_t_8 = PyObject_RichCompare(__pyx_t_1, __pyx_v_threshold, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2654, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2629, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2654, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":2630 + /* "_rnaseq_utils.pyx":2655 * value = ARRAY[i] * if value < threshold: # A gap begins or extends * if gap_length == 0: # Beginning of a gap # <<<<<<<<<<<<<< @@ -61841,7 +62709,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, __pyx_t_9 = ((__pyx_v_gap_length == 0) != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":2631 + /* "_rnaseq_utils.pyx":2656 * if value < threshold: # A gap begins or extends * if gap_length == 0: # Beginning of a gap * gap_left = i+1 # <<<<<<<<<<<<<< @@ -61850,7 +62718,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ __pyx_v_gap_left = (__pyx_v_i + 1); - /* "_rnaseq_utils.pyx":2630 + /* "_rnaseq_utils.pyx":2655 * value = ARRAY[i] * if value < threshold: # A gap begins or extends * if gap_length == 0: # Beginning of a gap # <<<<<<<<<<<<<< @@ -61859,7 +62727,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ } - /* "_rnaseq_utils.pyx":2633 + /* "_rnaseq_utils.pyx":2658 * gap_left = i+1 * * gap_length += 1 # <<<<<<<<<<<<<< @@ -61868,7 +62736,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ __pyx_v_gap_length = (__pyx_v_gap_length + 1); - /* "_rnaseq_utils.pyx":2634 + /* "_rnaseq_utils.pyx":2659 * * gap_length += 1 * gap_is_long_enough = gap_length > maxgap # <<<<<<<<<<<<<< @@ -61877,7 +62745,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ __pyx_v_gap_is_long_enough = (__pyx_v_gap_length > __pyx_v_maxgap); - /* "_rnaseq_utils.pyx":2629 + /* "_rnaseq_utils.pyx":2654 * for i in range(l): * value = ARRAY[i] * if value < threshold: # A gap begins or extends # <<<<<<<<<<<<<< @@ -61887,7 +62755,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, goto __pyx_L5; } - /* "_rnaseq_utils.pyx":2636 + /* "_rnaseq_utils.pyx":2661 * gap_is_long_enough = gap_length > maxgap * else: # Not in a gap * if gap_is_long_enough: # The last position was the end of a gap # <<<<<<<<<<<<<< @@ -61898,7 +62766,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, __pyx_t_9 = (__pyx_v_gap_is_long_enough != 0); if (__pyx_t_9) { - /* "_rnaseq_utils.pyx":2637 + /* "_rnaseq_utils.pyx":2662 * else: # Not in a gap * if gap_is_long_enough: # The last position was the end of a gap * gap_right = i # <<<<<<<<<<<<<< @@ -61907,18 +62775,18 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ __pyx_v_gap_right = __pyx_v_i; - /* "_rnaseq_utils.pyx":2638 + /* "_rnaseq_utils.pyx":2663 * if gap_is_long_enough: # The last position was the end of a gap * gap_right = i * gaps.append((gap_left, gap_right)) # <<<<<<<<<<<<<< * * gap_length = 0 */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_gap_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2638, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_gap_left); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_gap_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2638, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_gap_right); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2638, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); @@ -61926,10 +62794,10 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_1); __pyx_t_8 = 0; __pyx_t_1 = 0; - __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_gaps, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2638, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_gaps, __pyx_t_10); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 2663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "_rnaseq_utils.pyx":2636 + /* "_rnaseq_utils.pyx":2661 * gap_is_long_enough = gap_length > maxgap * else: # Not in a gap * if gap_is_long_enough: # The last position was the end of a gap # <<<<<<<<<<<<<< @@ -61938,7 +62806,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ } - /* "_rnaseq_utils.pyx":2640 + /* "_rnaseq_utils.pyx":2665 * gaps.append((gap_left, gap_right)) * * gap_length = 0 # <<<<<<<<<<<<<< @@ -61947,7 +62815,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, */ __pyx_v_gap_length = 0; - /* "_rnaseq_utils.pyx":2641 + /* "_rnaseq_utils.pyx":2666 * * gap_length = 0 * gap_is_long_enough = False # <<<<<<<<<<<<<< @@ -61959,7 +62827,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, __pyx_L5:; } - /* "_rnaseq_utils.pyx":2643 + /* "_rnaseq_utils.pyx":2668 * gap_is_long_enough = False * * return gaps # <<<<<<<<<<<<<< @@ -61970,7 +62838,7 @@ static PyObject *__pyx_f_13_rnaseq_utils_get_gaps(PyArrayObject *__pyx_v_array, __pyx_r = __pyx_v_gaps; goto __pyx_L0; - /* "_rnaseq_utils.pyx":2617 + /* "_rnaseq_utils.pyx":2642 * return False * * cpdef list get_gaps(np.ndarray[float, ndim=1] array, int maxgap, threshold = float(1)): # <<<<<<<<<<<<<< @@ -62042,7 +62910,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_41get_gaps(PyObject *__pyx_self, PyObj case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_maxgap)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("get_gaps", 0, 2, 3, 1); __PYX_ERR(0, 2617, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_gaps", 0, 2, 3, 1); __PYX_ERR(0, 2642, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: @@ -62052,7 +62920,7 @@ static PyObject *__pyx_pw_13_rnaseq_utils_41get_gaps(PyObject *__pyx_self, PyObj } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_gaps") < 0)) __PYX_ERR(0, 2617, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_gaps") < 0)) __PYX_ERR(0, 2642, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -62065,18 +62933,18 @@ static PyObject *__pyx_pw_13_rnaseq_utils_41get_gaps(PyObject *__pyx_self, PyObj } } __pyx_v_array = ((PyArrayObject *)values[0]); - __pyx_v_maxgap = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_maxgap == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2617, __pyx_L3_error) + __pyx_v_maxgap = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_maxgap == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 2642, __pyx_L3_error) __pyx_v_threshold = values[2]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_gaps", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2617, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_gaps", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2642, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("_rnaseq_utils.get_gaps", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_array), __pyx_ptype_5numpy_ndarray, 1, "array", 0))) __PYX_ERR(0, 2617, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_array), __pyx_ptype_5numpy_ndarray, 1, "array", 0))) __PYX_ERR(0, 2642, __pyx_L1_error) __pyx_r = __pyx_pf_13_rnaseq_utils_40get_gaps(__pyx_self, __pyx_v_array, __pyx_v_maxgap, __pyx_v_threshold); /* function exit code */ @@ -62105,13 +62973,13 @@ static PyObject *__pyx_pf_13_rnaseq_utils_40get_gaps(CYTHON_UNUSED PyObject *__p __pyx_pybuffernd_array.rcbuffer = &__pyx_pybuffer_array; { __Pyx_BufFmt_StackElem __pyx_stack[1]; - if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array.rcbuffer->pybuffer, (PyObject*)__pyx_v_array, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2617, __pyx_L1_error) + if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_array.rcbuffer->pybuffer, (PyObject*)__pyx_v_array, &__Pyx_TypeInfo_float, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) __PYX_ERR(0, 2642, __pyx_L1_error) } __pyx_pybuffernd_array.diminfo[0].strides = __pyx_pybuffernd_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_array.diminfo[0].shape = __pyx_pybuffernd_array.rcbuffer->pybuffer.shape[0]; __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.threshold = __pyx_v_threshold; - __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_gaps(__pyx_v_array, __pyx_v_maxgap, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2617, __pyx_L1_error) + __pyx_t_1 = __pyx_f_13_rnaseq_utils_get_gaps(__pyx_v_array, __pyx_v_maxgap, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -81773,8 +82641,10 @@ static PyObject *__pyx_getprop_13_rnaseq_utils_9BAMobject_sj_shift(PyObject *o, static PyMethodDef __pyx_methods_13_rnaseq_utils_BAMobject[] = { {"generate_read", (PyCFunction)__pyx_pw_13_rnaseq_utils_9BAMobject_3generate_read, METH_NOARGS, 0}, - {"__reduce_cython__", (PyCFunction)__pyx_pw_13_rnaseq_utils_9BAMobject_5__reduce_cython__, METH_NOARGS, 0}, - {"__setstate_cython__", (PyCFunction)__pyx_pw_13_rnaseq_utils_9BAMobject_7__setstate_cython__, METH_O, 0}, + {"evaluate_splice_sites", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13_rnaseq_utils_9BAMobject_5evaluate_splice_sites, METH_VARARGS|METH_KEYWORDS, __pyx_doc_13_rnaseq_utils_9BAMobject_4evaluate_splice_sites}, + {"adjust_splice_sites", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_13_rnaseq_utils_9BAMobject_7adjust_splice_sites, METH_VARARGS|METH_KEYWORDS, __pyx_doc_13_rnaseq_utils_9BAMobject_6adjust_splice_sites}, + {"__reduce_cython__", (PyCFunction)__pyx_pw_13_rnaseq_utils_9BAMobject_9__reduce_cython__, METH_NOARGS, 0}, + {"__setstate_cython__", (PyCFunction)__pyx_pw_13_rnaseq_utils_9BAMobject_11__setstate_cython__, METH_O, 0}, {0, 0, 0, 0} }; @@ -82474,9 +83344,9 @@ static void __pyx_tp_dealloc_13_rnaseq_utils___pyx_scope_struct_5_read_generator Py_CLEAR(p->__pyx_v_fileconn); Py_CLEAR(p->__pyx_v_header_line); Py_CLEAR(p->__pyx_v_line); - Py_CLEAR(p->__pyx_9genexpr48__pyx_v_outread); - Py_CLEAR(p->__pyx_9genexpr49__pyx_v_outread); + Py_CLEAR(p->__pyx_9genexpr50__pyx_v_outread); Py_CLEAR(p->__pyx_9genexpr51__pyx_v_outread); + Py_CLEAR(p->__pyx_9genexpr53__pyx_v_outread); Py_CLEAR(p->__pyx_v_outread); Py_CLEAR(p->__pyx_v_passed_positions); Py_CLEAR(p->__pyx_v_read); @@ -82514,15 +83384,15 @@ static int __pyx_tp_traverse_13_rnaseq_utils___pyx_scope_struct_5_read_generator if (p->__pyx_v_line) { e = (*v)(p->__pyx_v_line, a); if (e) return e; } - if (p->__pyx_9genexpr48__pyx_v_outread) { - e = (*v)(((PyObject *)p->__pyx_9genexpr48__pyx_v_outread), a); if (e) return e; - } - if (p->__pyx_9genexpr49__pyx_v_outread) { - e = (*v)(((PyObject *)p->__pyx_9genexpr49__pyx_v_outread), a); if (e) return e; + if (p->__pyx_9genexpr50__pyx_v_outread) { + e = (*v)(((PyObject *)p->__pyx_9genexpr50__pyx_v_outread), a); if (e) return e; } if (p->__pyx_9genexpr51__pyx_v_outread) { e = (*v)(((PyObject *)p->__pyx_9genexpr51__pyx_v_outread), a); if (e) return e; } + if (p->__pyx_9genexpr53__pyx_v_outread) { + e = (*v)(((PyObject *)p->__pyx_9genexpr53__pyx_v_outread), a); if (e) return e; + } if (p->__pyx_v_outread) { e = (*v)(((PyObject *)p->__pyx_v_outread), a); if (e) return e; } @@ -83575,6 +84445,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_u_COV, __pyx_k_COV, sizeof(__pyx_k_COV), 0, 1, 0, 1}, {&__pyx_n_u_CTAC, __pyx_k_CTAC, sizeof(__pyx_k_CTAC), 0, 1, 0, 1}, {&__pyx_n_u_CTGC, __pyx_k_CTGC, sizeof(__pyx_k_CTGC), 0, 1, 0, 1}, + {&__pyx_n_u_CTTC, __pyx_k_CTTC, sizeof(__pyx_k_CTTC), 0, 1, 0, 1}, {&__pyx_kp_u_C_2, __pyx_k_C_2, sizeof(__pyx_k_C_2), 0, 1, 0, 0}, {&__pyx_kp_u_C_3, __pyx_k_C_3, sizeof(__pyx_k_C_3), 0, 1, 0, 0}, {&__pyx_kp_s_Can_only_create_a_buffer_that_is, __pyx_k_Can_only_create_a_buffer_that_is, sizeof(__pyx_k_Can_only_create_a_buffer_that_is), 0, 0, 1, 0}, @@ -83589,6 +84460,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_u_ELR, __pyx_k_ELR, sizeof(__pyx_k_ELR), 0, 1, 0, 1}, {&__pyx_n_s_ELdata, __pyx_k_ELdata, sizeof(__pyx_k_ELdata), 0, 0, 1, 1}, {&__pyx_n_u_ELdata, __pyx_k_ELdata, sizeof(__pyx_k_ELdata), 0, 1, 0, 1}, + {&__pyx_kp_u_ERROR_splice_file_not_recognized, __pyx_k_ERROR_splice_file_not_recognized, sizeof(__pyx_k_ERROR_splice_file_not_recognized), 0, 1, 0, 0}, {&__pyx_n_u_ES, __pyx_k_ES, sizeof(__pyx_k_ES), 0, 1, 0, 1}, {&__pyx_kp_u_E_left, __pyx_k_E_left, sizeof(__pyx_k_E_left), 0, 1, 0, 0}, {&__pyx_kp_u_E_reads, __pyx_k_E_reads, sizeof(__pyx_k_E_reads), 0, 1, 0, 0}, @@ -83598,6 +84470,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_u_False, __pyx_k_False, sizeof(__pyx_k_False), 0, 1, 0, 1}, {&__pyx_kp_u_For_BED12_GTF_GFF3_use_reference, __pyx_k_For_BED12_GTF_GFF3_use_reference, sizeof(__pyx_k_For_BED12_GTF_GFF3_use_reference), 0, 1, 0, 0}, {&__pyx_n_u_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 1, 0, 1}, + {&__pyx_n_u_GAAG, __pyx_k_GAAG, sizeof(__pyx_k_GAAG), 0, 1, 0, 1}, {&__pyx_n_u_GCAG, __pyx_k_GCAG, sizeof(__pyx_k_GCAG), 0, 1, 0, 1}, {&__pyx_n_u_GFF, __pyx_k_GFF, sizeof(__pyx_k_GFF), 0, 1, 0, 1}, {&__pyx_n_u_GFF3, __pyx_k_GFF3, sizeof(__pyx_k_GFF3), 0, 1, 0, 1}, @@ -83656,12 +84529,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_u_S_left, __pyx_k_S_left, sizeof(__pyx_k_S_left), 0, 1, 0, 0}, {&__pyx_kp_u_S_reads, __pyx_k_S_reads, sizeof(__pyx_k_S_reads), 0, 1, 0, 0}, {&__pyx_kp_u_S_right, __pyx_k_S_right, sizeof(__pyx_k_S_right), 0, 1, 0, 0}, - {&__pyx_kp_u_Shifted_l, __pyx_k_Shifted_l, sizeof(__pyx_k_Shifted_l), 0, 1, 0, 0}, - {&__pyx_kp_u_Shifted_l_2, __pyx_k_Shifted_l_2, sizeof(__pyx_k_Shifted_l_2), 0, 1, 0, 0}, - {&__pyx_kp_u_Shifted_l_r, __pyx_k_Shifted_l_r, sizeof(__pyx_k_Shifted_l_r), 0, 1, 0, 0}, - {&__pyx_kp_u_Shifted_l_r_2, __pyx_k_Shifted_l_r_2, sizeof(__pyx_k_Shifted_l_r_2), 0, 1, 0, 0}, - {&__pyx_kp_u_Shifted_r, __pyx_k_Shifted_r, sizeof(__pyx_k_Shifted_r), 0, 1, 0, 0}, - {&__pyx_kp_u_Shifted_r_2, __pyx_k_Shifted_r_2, sizeof(__pyx_k_Shifted_r_2), 0, 1, 0, 0}, {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1}, {&__pyx_n_u_T, __pyx_k_T, sizeof(__pyx_k_T), 0, 1, 0, 1}, {&__pyx_kp_u_TAG, __pyx_k_TAG, sizeof(__pyx_k_TAG), 0, 1, 0, 0}, @@ -83678,7 +84545,6 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_kp_s_Unable_to_convert_item_to_object, __pyx_k_Unable_to_convert_item_to_object, sizeof(__pyx_k_Unable_to_convert_item_to_object), 0, 0, 1, 0}, {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_View_MemoryView, __pyx_k_View_MemoryView, sizeof(__pyx_k_View_MemoryView), 0, 0, 1, 1}, - {&__pyx_kp_u_WARNING_splice_file_not_recogniz, __pyx_k_WARNING_splice_file_not_recogniz, sizeof(__pyx_k_WARNING_splice_file_not_recogniz), 0, 1, 0, 0}, {&__pyx_n_u_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 1, 0, 1}, {&__pyx_n_u_XS, __pyx_k_XS, sizeof(__pyx_k_XS), 0, 1, 0, 1}, {&__pyx_n_u_Y_RNA, __pyx_k_Y_RNA, sizeof(__pyx_k_Y_RNA), 0, 1, 0, 1}, @@ -83720,6 +84586,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_add_read_from_BED, __pyx_k_add_read_from_BED, sizeof(__pyx_k_add_read_from_BED), 0, 0, 1, 1}, {&__pyx_n_s_add_read_from_ELR, __pyx_k_add_read_from_ELR, sizeof(__pyx_k_add_read_from_ELR), 0, 0, 1, 1}, {&__pyx_n_s_add_source, __pyx_k_add_source, sizeof(__pyx_k_add_source), 0, 0, 1, 1}, + {&__pyx_n_s_adjust_splice_sites, __pyx_k_adjust_splice_sites, sizeof(__pyx_k_adjust_splice_sites), 0, 0, 1, 1}, {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1}, {&__pyx_n_s_allocate_buffer, __pyx_k_allocate_buffer, sizeof(__pyx_k_allocate_buffer), 0, 0, 1, 1}, {&__pyx_n_s_anno_string, __pyx_k_anno_string, sizeof(__pyx_k_anno_string), 0, 0, 1, 1}, @@ -83755,6 +84622,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_bookend_core_cython_utils__fasta, __pyx_k_bookend_core_cython_utils__fasta, sizeof(__pyx_k_bookend_core_cython_utils__fasta), 0, 0, 1, 1}, {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1}, {&__pyx_n_u_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 1, 0, 1}, + {&__pyx_n_s_canonical, __pyx_k_canonical, sizeof(__pyx_k_canonical), 0, 0, 1, 1}, {&__pyx_n_u_cap_bonus, __pyx_k_cap_bonus, sizeof(__pyx_k_cap_bonus), 0, 1, 0, 1}, {&__pyx_n_s_capped, __pyx_k_capped, sizeof(__pyx_k_capped), 0, 0, 1, 1}, {&__pyx_n_u_capped, __pyx_k_capped, sizeof(__pyx_k_capped), 0, 1, 0, 1}, @@ -83813,6 +84681,8 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_error_rate, __pyx_k_error_rate, sizeof(__pyx_k_error_rate), 0, 0, 1, 1}, {&__pyx_n_u_error_rate, __pyx_k_error_rate, sizeof(__pyx_k_error_rate), 0, 1, 0, 1}, {&__pyx_n_u_errors, __pyx_k_errors, sizeof(__pyx_k_errors), 0, 1, 0, 1}, + {&__pyx_n_s_evaluate_splice_sites, __pyx_k_evaluate_splice_sites, sizeof(__pyx_k_evaluate_splice_sites), 0, 0, 1, 1}, + {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1}, {&__pyx_n_u_exon, __pyx_k_exon, sizeof(__pyx_k_exon), 0, 1, 0, 1}, {&__pyx_n_s_file_type, __pyx_k_file_type, sizeof(__pyx_k_file_type), 0, 0, 1, 1}, {&__pyx_n_s_fileconn, __pyx_k_fileconn, sizeof(__pyx_k_fileconn), 0, 0, 1, 1}, @@ -83866,6 +84736,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_init___locals_genexpr, __pyx_k_init___locals_genexpr, sizeof(__pyx_k_init___locals_genexpr), 0, 0, 1, 1}, {&__pyx_n_s_input_data, __pyx_k_input_data, sizeof(__pyx_k_input_data), 0, 0, 1, 1}, {&__pyx_n_s_input_lines, __pyx_k_input_lines, sizeof(__pyx_k_input_lines), 0, 0, 1, 1}, + {&__pyx_n_s_introns, __pyx_k_introns, sizeof(__pyx_k_introns), 0, 0, 1, 1}, {&__pyx_n_s_is_compatible, __pyx_k_is_compatible, sizeof(__pyx_k_is_compatible), 0, 0, 1, 1}, {&__pyx_n_s_is_digit, __pyx_k_is_digit, sizeof(__pyx_k_is_digit), 0, 0, 1, 1}, {&__pyx_n_s_is_identical, __pyx_k_is_identical, sizeof(__pyx_k_is_identical), 0, 0, 1, 1}, @@ -84077,6 +84948,7 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1}, {&__pyx_n_s_struct, __pyx_k_struct, sizeof(__pyx_k_struct), 0, 0, 1, 1}, {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1}, + {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1}, {&__pyx_n_u_tRNA, __pyx_k_tRNA, sizeof(__pyx_k_tRNA), 0, 1, 0, 1}, {&__pyx_n_u_telomerase_RNA, __pyx_k_telomerase_RNA, sizeof(__pyx_k_telomerase_RNA), 0, 1, 0, 1}, {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, @@ -84114,16 +84986,16 @@ static __Pyx_StringTabEntry __pyx_string_tab[] = { {0, 0, 0, 0, 0, 0, 0} }; static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 83, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 108, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 113, __pyx_L1_error) - __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) __PYX_ERR(0, 338, __pyx_L1_error) - __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 575, __pyx_L1_error) - __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 596, __pyx_L1_error) - __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1242, __pyx_L1_error) - __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 1287, __pyx_L1_error) - __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 2060, __pyx_L1_error) - __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_n_s_all); if (!__pyx_builtin_all) __PYX_ERR(0, 2163, __pyx_L1_error) + __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 84, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 109, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 114, __pyx_L1_error) + __pyx_builtin_round = __Pyx_GetBuiltinName(__pyx_n_s_round); if (!__pyx_builtin_round) __PYX_ERR(0, 339, __pyx_L1_error) + __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 576, __pyx_L1_error) + __pyx_builtin_print = __Pyx_GetBuiltinName(__pyx_n_s_print); if (!__pyx_builtin_print) __PYX_ERR(0, 597, __pyx_L1_error) + __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 1244, __pyx_L1_error) + __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 1289, __pyx_L1_error) + __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 2012, __pyx_L1_error) + __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_n_s_all); if (!__pyx_builtin_all) __PYX_ERR(0, 2194, __pyx_L1_error) __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(2, 109, __pyx_L1_error) __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(3, 945, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(1, 133, __pyx_L1_error) @@ -84140,251 +85012,251 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); - /* "_rnaseq_utils.pyx":430 + /* "_rnaseq_utils.pyx":431 * frame = '.' * cdef str score = str(round(self.coverage,2)) * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'transcript', self.left()+1, self.right(), score, strand, frame, self.print_attributes('gtf',True)) # <<<<<<<<<<<<<< * for left,right in self.ranges: * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'exon', left+1, right, score, strand, frame, self.print_attributes('gtf',False)) */ - __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_u_gtf, Py_True); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 430, __pyx_L1_error) + __pyx_tuple__16 = PyTuple_Pack(2, __pyx_n_u_gtf, Py_True); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 431, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__16); __Pyx_GIVEREF(__pyx_tuple__16); - /* "_rnaseq_utils.pyx":432 + /* "_rnaseq_utils.pyx":433 * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'transcript', self.left()+1, self.right(), score, strand, frame, self.print_attributes('gtf',True)) * for left,right in self.ranges: * gtf_txt += '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format(chrom, source, 'exon', left+1, right, score, strand, frame, self.print_attributes('gtf',False)) # <<<<<<<<<<<<<< * * return gtf_txt[:-1] */ - __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_u_gtf, Py_False); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 432, __pyx_L1_error) + __pyx_tuple__17 = PyTuple_Pack(2, __pyx_n_u_gtf, Py_False); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 433, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__17); __Pyx_GIVEREF(__pyx_tuple__17); - /* "_rnaseq_utils.pyx":442 + /* "_rnaseq_utils.pyx":443 * attributes = self.attributes * else: * attributes = {k:self.attributes[k] for k in ('gene_id','transcript_id')} # <<<<<<<<<<<<<< * * if format == 'gtf': */ - __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_u_gene_id, __pyx_n_u_transcript_id); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 442, __pyx_L1_error) + __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_u_gene_id, __pyx_n_u_transcript_id); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 443, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__18); __Pyx_GIVEREF(__pyx_tuple__18); - /* "_rnaseq_utils.pyx":596 + /* "_rnaseq_utils.pyx":597 * sj_set.add(sj_tuple) * else: - * print("WARNING: --splice file not recognized. Provide SJ.out.tab or BED6.") # <<<<<<<<<<<<<< + * print("ERROR: --splice file not recognized. Provide SJ.out.tab or BED6.") # <<<<<<<<<<<<<< * print("For BED12/GTF/GFF3, use --reference.") - * + * sys.exit(1) */ - __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_WARNING_splice_file_not_recogniz); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_u_ERROR_splice_file_not_recognized); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 597, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__24); __Pyx_GIVEREF(__pyx_tuple__24); - /* "_rnaseq_utils.pyx":597 + /* "_rnaseq_utils.pyx":598 * else: - * print("WARNING: --splice file not recognized. Provide SJ.out.tab or BED6.") + * print("ERROR: --splice file not recognized. Provide SJ.out.tab or BED6.") * print("For BED12/GTF/GFF3, use --reference.") # <<<<<<<<<<<<<< + * sys.exit(1) * - * for chrom in self.reference_dict.keys(): */ - __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_For_BED12_GTF_GFF3_use_reference); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 597, __pyx_L1_error) + __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_For_BED12_GTF_GFF3_use_reference); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__25); __Pyx_GIVEREF(__pyx_tuple__25); - /* "_rnaseq_utils.pyx":874 + /* "_rnaseq_utils.pyx":876 * new_read = RNAseqMapping(input_data) * bed_elements = line.rstrip().split('\t') * new_read.attributes['gene_id'] = '.'.join(bed_elements[3].split(self.gene_delim)[:-1]) # <<<<<<<<<<<<<< * new_read.attributes['transcript_id'] = bed_elements[3] * new_read.attributes['S.reads'] = new_read.weight if new_read.s_tag else 0 */ - __pyx_slice__27 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 874, __pyx_L1_error) + __pyx_slice__27 = PySlice_New(Py_None, __pyx_int_neg_1, Py_None); if (unlikely(!__pyx_slice__27)) __PYX_ERR(0, 876, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__27); __Pyx_GIVEREF(__pyx_slice__27); - /* "_rnaseq_utils.pyx":1009 + /* "_rnaseq_utils.pyx":1011 * if len(anno_string) > 0: * if anno_string[0] != '#': * self.fields = tuple(anno_string.split('\t')[0:9]) # <<<<<<<<<<<<<< * self.anno_type = self.fields[2] * child_types = config_dict['child_types'] */ - __pyx_slice__29 = PySlice_New(__pyx_int_0, __pyx_int_9, Py_None); if (unlikely(!__pyx_slice__29)) __PYX_ERR(0, 1009, __pyx_L1_error) + __pyx_slice__29 = PySlice_New(__pyx_int_0, __pyx_int_9, Py_None); if (unlikely(!__pyx_slice__29)) __PYX_ERR(0, 1011, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__29); __Pyx_GIVEREF(__pyx_slice__29); - /* "_rnaseq_utils.pyx":1085 + /* "_rnaseq_utils.pyx":1087 * self.min_reps = config['min_reps'] * self.cap_bonus = config['cap_bonus'] * self.verbose = config.get('verbose',False) # <<<<<<<<<<<<<< * self.gene_delim = self.config['gene_delim'] * self.number_of_assemblies = len(annotation_files) */ - __pyx_tuple__41 = PyTuple_Pack(2, __pyx_n_u_verbose, Py_False); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1085, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(2, __pyx_n_u_verbose, Py_False); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 1087, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__41); __Pyx_GIVEREF(__pyx_tuple__41); - /* "_rnaseq_utils.pyx":1420 + /* "_rnaseq_utils.pyx":1422 * np.ndarray depth_matrix * * Sp, Ep, Sm, Em, Cp, Cm, covp, covm, covn = range(9) # <<<<<<<<<<<<<< * array_length = rightmost - leftmost * depth_matrix = np.zeros(shape=(9, array_length), dtype=np.float32) */ - __pyx_tuple__43 = PyTuple_Pack(1, __pyx_int_9); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1420, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(1, __pyx_int_9); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 1422, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__43); __Pyx_GIVEREF(__pyx_tuple__43); - /* "_rnaseq_utils.pyx":1518 + /* "_rnaseq_utils.pyx":1520 * contiguous = True * if strand == 1: * coverage = depth_matrix[-3,:] # <<<<<<<<<<<<<< * elif strand == -1: * coverage = depth_matrix[-2,:] */ - __pyx_slice__44 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 1518, __pyx_L1_error) + __pyx_slice__44 = PySlice_New(Py_None, Py_None, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__44); __Pyx_GIVEREF(__pyx_slice__44); - __pyx_tuple__45 = PyTuple_Pack(2, __pyx_int_neg_3, __pyx_slice__44); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1518, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(2, __pyx_int_neg_3, __pyx_slice__44); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 1520, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__45); __Pyx_GIVEREF(__pyx_tuple__45); - /* "_rnaseq_utils.pyx":1520 + /* "_rnaseq_utils.pyx":1522 * coverage = depth_matrix[-3,:] * elif strand == -1: * coverage = depth_matrix[-2,:] # <<<<<<<<<<<<<< * else: * coverage = np.sum(depth_matrix[-3:,:], axis=0) */ - __pyx_tuple__46 = PyTuple_Pack(2, __pyx_int_neg_2, __pyx_slice__44); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_tuple__46 = PyTuple_Pack(2, __pyx_int_neg_2, __pyx_slice__44); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__46); __Pyx_GIVEREF(__pyx_tuple__46); - /* "_rnaseq_utils.pyx":1522 + /* "_rnaseq_utils.pyx":1524 * coverage = depth_matrix[-2,:] * else: * coverage = np.sum(depth_matrix[-3:,:], axis=0) # <<<<<<<<<<<<<< * elif seqtype.upper() == '5P': * contiguous = False */ - __pyx_slice__47 = PySlice_New(__pyx_int_neg_3, Py_None, Py_None); if (unlikely(!__pyx_slice__47)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_slice__47 = PySlice_New(__pyx_int_neg_3, Py_None, Py_None); if (unlikely(!__pyx_slice__47)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__47); __Pyx_GIVEREF(__pyx_slice__47); - __pyx_tuple__48 = PyTuple_Pack(2, __pyx_slice__47, __pyx_slice__44); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_tuple__48 = PyTuple_Pack(2, __pyx_slice__47, __pyx_slice__44); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__48); __Pyx_GIVEREF(__pyx_tuple__48); - /* "_rnaseq_utils.pyx":1534 + /* "_rnaseq_utils.pyx":1536 * contiguous = False * if strand == 1: * coverage = depth_matrix[0,:] # <<<<<<<<<<<<<< * elif strand == -1: * coverage = depth_matrix[2,:] */ - __pyx_tuple__49 = PyTuple_Pack(2, __pyx_int_0, __pyx_slice__44); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_tuple__49 = PyTuple_Pack(2, __pyx_int_0, __pyx_slice__44); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__49); __Pyx_GIVEREF(__pyx_tuple__49); - /* "_rnaseq_utils.pyx":1536 + /* "_rnaseq_utils.pyx":1538 * coverage = depth_matrix[0,:] * elif strand == -1: * coverage = depth_matrix[2,:] # <<<<<<<<<<<<<< * else: * coverage = depth_matrix[0,:] - depth_matrix[2,:] */ - __pyx_tuple__50 = PyTuple_Pack(2, __pyx_int_2, __pyx_slice__44); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1536, __pyx_L1_error) + __pyx_tuple__50 = PyTuple_Pack(2, __pyx_int_2, __pyx_slice__44); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__50); __Pyx_GIVEREF(__pyx_tuple__50); - /* "_rnaseq_utils.pyx":1542 + /* "_rnaseq_utils.pyx":1544 * contiguous = False * if strand == 1: * coverage = depth_matrix[4,:] # <<<<<<<<<<<<<< * elif strand == -1: * coverage = depth_matrix[5,:] */ - __pyx_tuple__51 = PyTuple_Pack(2, __pyx_int_4, __pyx_slice__44); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1542, __pyx_L1_error) + __pyx_tuple__51 = PyTuple_Pack(2, __pyx_int_4, __pyx_slice__44); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 1544, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__51); __Pyx_GIVEREF(__pyx_tuple__51); - /* "_rnaseq_utils.pyx":1544 + /* "_rnaseq_utils.pyx":1546 * coverage = depth_matrix[4,:] * elif strand == -1: * coverage = depth_matrix[5,:] # <<<<<<<<<<<<<< * else: * coverage = depth_matrix[4,:] - depth_matrix[5,:] */ - __pyx_tuple__52 = PyTuple_Pack(2, __pyx_int_5, __pyx_slice__44); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1544, __pyx_L1_error) + __pyx_tuple__52 = PyTuple_Pack(2, __pyx_int_5, __pyx_slice__44); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 1546, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__52); __Pyx_GIVEREF(__pyx_tuple__52); - /* "_rnaseq_utils.pyx":1550 + /* "_rnaseq_utils.pyx":1552 * contiguous = False * if strand == 1: * coverage = depth_matrix[1,:] # <<<<<<<<<<<<<< * elif strand == -1: * coverage = depth_matrix[3,:] */ - __pyx_tuple__53 = PyTuple_Pack(2, __pyx_int_1, __pyx_slice__44); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_tuple__53 = PyTuple_Pack(2, __pyx_int_1, __pyx_slice__44); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__53); __Pyx_GIVEREF(__pyx_tuple__53); - /* "_rnaseq_utils.pyx":1552 + /* "_rnaseq_utils.pyx":1554 * coverage = depth_matrix[1,:] * elif strand == -1: * coverage = depth_matrix[3,:] # <<<<<<<<<<<<<< * else: * coverage = depth_matrix[1,:] - depth_matrix[3,:] */ - __pyx_tuple__54 = PyTuple_Pack(2, __pyx_int_3, __pyx_slice__44); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_tuple__54 = PyTuple_Pack(2, __pyx_int_3, __pyx_slice__44); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 1554, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__54); __Pyx_GIVEREF(__pyx_tuple__54); - /* "_rnaseq_utils.pyx":1633 + /* "_rnaseq_utils.pyx":1635 * e_tag = True * * splice = [True if i=='D' else False for i in label[1:-1:2]] # <<<<<<<<<<<<<< * elif strand == -1: * if last == 'C': */ - __pyx_slice__57 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, __pyx_int_2); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 1633, __pyx_L1_error) + __pyx_slice__57 = PySlice_New(__pyx_int_1, __pyx_int_neg_1, __pyx_int_2); if (unlikely(!__pyx_slice__57)) __PYX_ERR(0, 1635, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__57); __Pyx_GIVEREF(__pyx_slice__57); - /* "_rnaseq_utils.pyx":1901 + /* "_rnaseq_utils.pyx":1853 * mismatches += 1 * except StopIteration: * print("# RAN OUT") # <<<<<<<<<<<<<< * match_count = 0 * */ - __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_RAN_OUT); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1901, __pyx_L1_error) + __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_u_RAN_OUT); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 1853, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__59); __Pyx_GIVEREF(__pyx_tuple__59); - /* "_rnaseq_utils.pyx":1926 + /* "_rnaseq_utils.pyx":1878 * * total_count = 0 * for n in ['A','T','G','C']: # <<<<<<<<<<<<<< * count_n = string.count(n) * if count_n >= thresh_length: */ - __pyx_tuple__60 = PyTuple_Pack(4, __pyx_n_u_A, __pyx_n_u_T, __pyx_n_u_G, __pyx_n_u_C); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1926, __pyx_L1_error) + __pyx_tuple__60 = PyTuple_Pack(4, __pyx_n_u_A, __pyx_n_u_T, __pyx_n_u_G, __pyx_n_u_C); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 1878, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__60); __Pyx_GIVEREF(__pyx_tuple__60); - /* "_rnaseq_utils.pyx":2449 + /* "_rnaseq_utils.pyx":2474 * if len(flank) > 0: * if readtype == 'S': * flankmatch = self.dataset.start_array[-length:][::-1] # <<<<<<<<<<<<<< * flank = flank[::-1] * elif readtype == 'E': */ - __pyx_slice__61 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__61)) __PYX_ERR(0, 2449, __pyx_L1_error) + __pyx_slice__61 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__61)) __PYX_ERR(0, 2474, __pyx_L1_error) __Pyx_GOTREF(__pyx_slice__61); __Pyx_GIVEREF(__pyx_slice__61); @@ -84617,64 +85489,64 @@ static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_GOTREF(__pyx_tuple__89); __Pyx_GIVEREF(__pyx_tuple__89); - /* "_rnaseq_utils.pyx":17 + /* "_rnaseq_utils.pyx":18 * # Object for defining an RNA sequencing read # * ############################################## * ELdata = namedtuple('ELdata', 'chrom source strand ranges splice s_tag e_tag capped weight condensed') # <<<<<<<<<<<<<< * cdef class RNAseqMapping(): * cdef public int chrom, source, strand, s_len, e_len */ - __pyx_tuple__91 = PyTuple_Pack(2, __pyx_n_u_ELdata, __pyx_kp_u_chrom_source_strand_ranges_splic); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 17, __pyx_L1_error) + __pyx_tuple__91 = PyTuple_Pack(2, __pyx_n_u_ELdata, __pyx_kp_u_chrom_source_strand_ranges_splic); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__91); __Pyx_GIVEREF(__pyx_tuple__91); - /* "_rnaseq_utils.pyx":1235 + /* "_rnaseq_utils.pyx":1237 * } * * def array_to_blocks(list arr): # <<<<<<<<<<<<<< * """Breaks an array into a collections of (start,end) INCLUSIVE doubles * that define the coordinates of all contiguous blocks in the array""" */ - __pyx_tuple__92 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_clean_array, __pyx_n_s_block_start, __pyx_n_s_block_end, __pyx_n_s_i, __pyx_n_s_i); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_tuple__92 = PyTuple_Pack(6, __pyx_n_s_arr, __pyx_n_s_clean_array, __pyx_n_s_block_start, __pyx_n_s_block_end, __pyx_n_s_i, __pyx_n_s_i); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__92); __Pyx_GIVEREF(__pyx_tuple__92); - __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_rnaseq_utils_pyx, __pyx_n_s_array_to_blocks, 1235, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_rnaseq_utils_pyx, __pyx_n_s_array_to_blocks, 1237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 1237, __pyx_L1_error) - /* "_rnaseq_utils.pyx":1802 - * return False + /* "_rnaseq_utils.pyx":1754 + * return 0 * * def parse_MD_string(str mdstring): # <<<<<<<<<<<<<< * """Creates a generator object to yield the elements * in an MD:Z tag from the SAM format. The elements are either */ - __pyx_tuple__93 = PyTuple_Pack(5, __pyx_n_s_mdstring, __pyx_n_s_was_digit, __pyx_n_s_is_digit, __pyx_n_s_current, __pyx_n_s_c); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1802, __pyx_L1_error) + __pyx_tuple__93 = PyTuple_Pack(5, __pyx_n_s_mdstring, __pyx_n_s_was_digit, __pyx_n_s_is_digit, __pyx_n_s_current, __pyx_n_s_c); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 1754, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__93); __Pyx_GIVEREF(__pyx_tuple__93); - __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_rnaseq_utils_pyx, __pyx_n_s_parse_MD_string, 1802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 1802, __pyx_L1_error) + __pyx_codeobj__58 = (PyObject*)__Pyx_PyCode_New(1, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_rnaseq_utils_pyx, __pyx_n_s_parse_MD_string, 1754, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__58)) __PYX_ERR(0, 1754, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2459 + /* "_rnaseq_utils.pyx":2484 * return False * * def read_generator(fileconn, RNAseqDataset dataset, str file_type, int max_gap, float minimum_proportion): # <<<<<<<<<<<<<< * """Yields a contiguous chunk of reads from the input file * separated on either side by a gaps > max_gap""" */ - __pyx_tuple__94 = PyTuple_Pack(29, __pyx_n_s_fileconn, __pyx_n_s_dataset, __pyx_n_s_file_type, __pyx_n_s_max_gap, __pyx_n_s_minimum_proportion, __pyx_n_s_read, __pyx_n_s_outread, __pyx_n_s_l, __pyx_n_s_r, __pyx_n_s_old_chrom, __pyx_n_s_old_l, __pyx_n_s_old_r, __pyx_n_s_rightmost, __pyx_n_s_k, __pyx_n_s_read_weight, __pyx_n_s_span_weight, __pyx_n_s_current_cov, __pyx_n_s_covered_positions, __pyx_n_s_passed_positions, __pyx_n_s_add_read, __pyx_n_s_end_positions, __pyx_n_s_span_start, __pyx_n_s_line, __pyx_n_s_header_line, __pyx_n_s_span_length, __pyx_n_s_outread, __pyx_n_s_outread, __pyx_n_s_k, __pyx_n_s_outread); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 2459, __pyx_L1_error) + __pyx_tuple__94 = PyTuple_Pack(29, __pyx_n_s_fileconn, __pyx_n_s_dataset, __pyx_n_s_file_type, __pyx_n_s_max_gap, __pyx_n_s_minimum_proportion, __pyx_n_s_read, __pyx_n_s_outread, __pyx_n_s_l, __pyx_n_s_r, __pyx_n_s_old_chrom, __pyx_n_s_old_l, __pyx_n_s_old_r, __pyx_n_s_rightmost, __pyx_n_s_k, __pyx_n_s_read_weight, __pyx_n_s_span_weight, __pyx_n_s_current_cov, __pyx_n_s_covered_positions, __pyx_n_s_passed_positions, __pyx_n_s_add_read, __pyx_n_s_end_positions, __pyx_n_s_span_start, __pyx_n_s_line, __pyx_n_s_header_line, __pyx_n_s_span_length, __pyx_n_s_outread, __pyx_n_s_outread, __pyx_n_s_k, __pyx_n_s_outread); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 2484, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__94); __Pyx_GIVEREF(__pyx_tuple__94); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(5, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_rnaseq_utils_pyx, __pyx_n_s_read_generator, 2459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 2459, __pyx_L1_error) + __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(5, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_rnaseq_utils_pyx, __pyx_n_s_read_generator, 2484, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 2484, __pyx_L1_error) - /* "_rnaseq_utils.pyx":2539 + /* "_rnaseq_utils.pyx":2564 * fileconn.close() * * def generate_subchunks(list list_of_reads, list split_positions): # <<<<<<<<<<<<<< * cdef: * RNAseqMapping read */ - __pyx_tuple__95 = PyTuple_Pack(10, __pyx_n_s_list_of_reads, __pyx_n_s_split_positions, __pyx_n_s_read, __pyx_n_s_lasti, __pyx_n_s_i, __pyx_n_s_sp, __pyx_n_s_r, __pyx_n_s_ignore, __pyx_n_s_position, __pyx_n_s_r); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 2539, __pyx_L1_error) + __pyx_tuple__95 = PyTuple_Pack(10, __pyx_n_s_list_of_reads, __pyx_n_s_split_positions, __pyx_n_s_read, __pyx_n_s_lasti, __pyx_n_s_i, __pyx_n_s_sp, __pyx_n_s_r, __pyx_n_s_ignore, __pyx_n_s_position, __pyx_n_s_r); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 2564, __pyx_L1_error) __Pyx_GOTREF(__pyx_tuple__95); __Pyx_GIVEREF(__pyx_tuple__95); - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_rnaseq_utils_pyx, __pyx_n_s_generate_subchunks, 2539, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 2539, __pyx_L1_error) + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(2, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_rnaseq_utils_pyx, __pyx_n_s_generate_subchunks, 2564, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 2564, __pyx_L1_error) /* "(tree fragment)":1 * def __pyx_unpickle_RNAseqMapping(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< @@ -84882,7 +85754,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_13_rnaseq_utils_RNAseqMapping.get_node_labels = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *, int __pyx_skip_dispatch, struct __pyx_opt_args_13_rnaseq_utils_13RNAseqMapping_get_node_labels *__pyx_optional_args))__pyx_f_13_rnaseq_utils_13RNAseqMapping_get_node_labels; __pyx_vtable_13_rnaseq_utils_RNAseqMapping.write_as_elr = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *, int __pyx_skip_dispatch, struct __pyx_opt_args_13_rnaseq_utils_13RNAseqMapping_write_as_elr *__pyx_optional_args))__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_elr; __pyx_vtable_13_rnaseq_utils_RNAseqMapping.write_as_bed = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *, PyObject *, PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_13_rnaseq_utils_13RNAseqMapping_write_as_bed *__pyx_optional_args))__pyx_f_13_rnaseq_utils_13RNAseqMapping_write_as_bed; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils_RNAseqMapping) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils_RNAseqMapping) < 0) __PYX_ERR(0, 19, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils_RNAseqMapping.tp_print = 0; #endif @@ -84891,7 +85763,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqMapping, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 18, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqMapping, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 19, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_13_rnaseq_utils_13RNAseqMapping___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_13_rnaseq_utils_13RNAseqMapping___init__.doc = __pyx_doc_13_rnaseq_utils_13RNAseqMapping___init__; @@ -84901,7 +85773,7 @@ static int __Pyx_modinit_type_init_code(void) { #endif #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqMapping, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 18, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqMapping, "__repr__"); if (unlikely(!wrapper)) __PYX_ERR(0, 19, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_13_rnaseq_utils_13RNAseqMapping_14__repr__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_13_rnaseq_utils_13RNAseqMapping_14__repr__.doc = __pyx_doc_13_rnaseq_utils_13RNAseqMapping_14__repr__; @@ -84909,9 +85781,9 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_RNAseqMapping.tp_dict, __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping) < 0) __PYX_ERR(0, 18, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RNAseqMapping, (PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqMapping) < 0) __PYX_ERR(0, 18, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_RNAseqMapping) < 0) __PYX_ERR(0, 18, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_RNAseqMapping.tp_dict, __pyx_vtabptr_13_rnaseq_utils_RNAseqMapping) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RNAseqMapping, (PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqMapping) < 0) __PYX_ERR(0, 19, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_RNAseqMapping) < 0) __PYX_ERR(0, 19, __pyx_L1_error) __pyx_ptype_13_rnaseq_utils_RNAseqMapping = &__pyx_type_13_rnaseq_utils_RNAseqMapping; __pyx_vtabptr_13_rnaseq_utils_RNAseqDataset = &__pyx_vtable_13_rnaseq_utils_RNAseqDataset; __pyx_vtable_13_rnaseq_utils_RNAseqDataset.make_sj_set = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *, PyObject *, int __pyx_skip_dispatch))__pyx_f_13_rnaseq_utils_13RNAseqDataset_make_sj_set; @@ -84928,7 +85800,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_vtable_13_rnaseq_utils_RNAseqDataset.anno_to_mapping_object = (struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *(*)(struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *, struct __pyx_obj_13_rnaseq_utils_AnnotationObject *, PyObject *, int, int __pyx_skip_dispatch))__pyx_f_13_rnaseq_utils_13RNAseqDataset_anno_to_mapping_object; __pyx_vtable_13_rnaseq_utils_RNAseqDataset.parse_bed_line = (struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *(*)(struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *, PyObject *, PyObject *))__pyx_f_13_rnaseq_utils_13RNAseqDataset_parse_bed_line; __pyx_vtable_13_rnaseq_utils_RNAseqDataset.parse_elr_line = (struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *(*)(struct __pyx_obj_13_rnaseq_utils_RNAseqDataset *, PyObject *, PyObject *, PyObject *))__pyx_f_13_rnaseq_utils_13RNAseqDataset_parse_elr_line; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils_RNAseqDataset) < 0) __PYX_ERR(0, 481, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils_RNAseqDataset) < 0) __PYX_ERR(0, 482, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils_RNAseqDataset.tp_print = 0; #endif @@ -84937,7 +85809,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqDataset, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 481, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqDataset, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 482, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_13_rnaseq_utils_13RNAseqDataset___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_13_rnaseq_utils_13RNAseqDataset___init__.doc = __pyx_doc_13_rnaseq_utils_13RNAseqDataset___init__; @@ -84945,13 +85817,13 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_RNAseqDataset.tp_dict, __pyx_vtabptr_13_rnaseq_utils_RNAseqDataset) < 0) __PYX_ERR(0, 481, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RNAseqDataset, (PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqDataset) < 0) __PYX_ERR(0, 481, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_RNAseqDataset) < 0) __PYX_ERR(0, 481, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_RNAseqDataset.tp_dict, __pyx_vtabptr_13_rnaseq_utils_RNAseqDataset) < 0) __PYX_ERR(0, 482, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_RNAseqDataset, (PyObject *)&__pyx_type_13_rnaseq_utils_RNAseqDataset) < 0) __PYX_ERR(0, 482, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_RNAseqDataset) < 0) __PYX_ERR(0, 482, __pyx_L1_error) __pyx_ptype_13_rnaseq_utils_RNAseqDataset = &__pyx_type_13_rnaseq_utils_RNAseqDataset; __pyx_vtabptr_13_rnaseq_utils_AnnotationObject = &__pyx_vtable_13_rnaseq_utils_AnnotationObject; __pyx_vtable_13_rnaseq_utils_AnnotationObject.parse_attributes = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_AnnotationObject *, PyObject *, PyObject *, int __pyx_skip_dispatch))__pyx_f_13_rnaseq_utils_16AnnotationObject_parse_attributes; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils_AnnotationObject) < 0) __PYX_ERR(0, 984, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils_AnnotationObject) < 0) __PYX_ERR(0, 986, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils_AnnotationObject.tp_print = 0; #endif @@ -84960,7 +85832,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_AnnotationObject, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 984, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_AnnotationObject, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 986, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_13_rnaseq_utils_16AnnotationObject___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_13_rnaseq_utils_16AnnotationObject___init__.doc = __pyx_doc_13_rnaseq_utils_16AnnotationObject___init__; @@ -84968,42 +85840,43 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_AnnotationObject.tp_dict, __pyx_vtabptr_13_rnaseq_utils_AnnotationObject) < 0) __PYX_ERR(0, 984, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AnnotationObject, (PyObject *)&__pyx_type_13_rnaseq_utils_AnnotationObject) < 0) __PYX_ERR(0, 984, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_AnnotationObject) < 0) __PYX_ERR(0, 984, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_AnnotationObject.tp_dict, __pyx_vtabptr_13_rnaseq_utils_AnnotationObject) < 0) __PYX_ERR(0, 986, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AnnotationObject, (PyObject *)&__pyx_type_13_rnaseq_utils_AnnotationObject) < 0) __PYX_ERR(0, 986, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_AnnotationObject) < 0) __PYX_ERR(0, 986, __pyx_L1_error) __pyx_ptype_13_rnaseq_utils_AnnotationObject = &__pyx_type_13_rnaseq_utils_AnnotationObject; __pyx_vtabptr_13_rnaseq_utils_AnnotationDataset = &__pyx_vtable_13_rnaseq_utils_AnnotationDataset; __pyx_vtable_13_rnaseq_utils_AnnotationDataset.__pyx_base = *__pyx_vtabptr_13_rnaseq_utils_RNAseqDataset; __pyx_vtable_13_rnaseq_utils_AnnotationDataset.get_transcript_fasta = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_AnnotationDataset *, struct __pyx_obj_13_rnaseq_utils_RNAseqMapping *, int __pyx_skip_dispatch))__pyx_f_13_rnaseq_utils_17AnnotationDataset_get_transcript_fasta; __pyx_vtable_13_rnaseq_utils_AnnotationDataset.merge_children = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_AnnotationDataset *, PyObject *, int __pyx_skip_dispatch))__pyx_f_13_rnaseq_utils_17AnnotationDataset_merge_children; __pyx_type_13_rnaseq_utils_AnnotationDataset.tp_base = __pyx_ptype_13_rnaseq_utils_RNAseqDataset; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils_AnnotationDataset) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils_AnnotationDataset) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils_AnnotationDataset.tp_print = 0; #endif if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_13_rnaseq_utils_AnnotationDataset.tp_dictoffset && __pyx_type_13_rnaseq_utils_AnnotationDataset.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_13_rnaseq_utils_AnnotationDataset.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_AnnotationDataset.tp_dict, __pyx_vtabptr_13_rnaseq_utils_AnnotationDataset) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AnnotationDataset, (PyObject *)&__pyx_type_13_rnaseq_utils_AnnotationDataset) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_AnnotationDataset) < 0) __PYX_ERR(0, 1072, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_AnnotationDataset.tp_dict, __pyx_vtabptr_13_rnaseq_utils_AnnotationDataset) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AnnotationDataset, (PyObject *)&__pyx_type_13_rnaseq_utils_AnnotationDataset) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_AnnotationDataset) < 0) __PYX_ERR(0, 1074, __pyx_L1_error) __pyx_ptype_13_rnaseq_utils_AnnotationDataset = &__pyx_type_13_rnaseq_utils_AnnotationDataset; __pyx_vtabptr_13_rnaseq_utils_BAMobject = &__pyx_vtable_13_rnaseq_utils_BAMobject; __pyx_vtable_13_rnaseq_utils_BAMobject.generate_read = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int __pyx_skip_dispatch))__pyx_f_13_rnaseq_utils_9BAMobject_generate_read; + __pyx_vtable_13_rnaseq_utils_BAMobject.shift_junction = (__pyx_ctuple_int__and_int__and_int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, int, int))__pyx_f_13_rnaseq_utils_9BAMobject_shift_junction; __pyx_vtable_13_rnaseq_utils_BAMobject.resolve_overlapping_mappings = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *))__pyx_f_13_rnaseq_utils_9BAMobject_resolve_overlapping_mappings; __pyx_vtable_13_rnaseq_utils_BAMobject.get_mapping_number = (int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *))__pyx_f_13_rnaseq_utils_9BAMobject_get_mapping_number; __pyx_vtable_13_rnaseq_utils_BAMobject.determine_strand = (__pyx_ctuple_int__and_int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_determine_strand *__pyx_optional_args))__pyx_f_13_rnaseq_utils_9BAMobject_determine_strand; __pyx_vtable_13_rnaseq_utils_BAMobject.should_skip = (int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *))__pyx_f_13_rnaseq_utils_9BAMobject_should_skip; __pyx_vtable_13_rnaseq_utils_BAMobject.fails_stringent_filters = (int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int, int, int, int, int))__pyx_f_13_rnaseq_utils_9BAMobject_fails_stringent_filters; __pyx_vtable_13_rnaseq_utils_BAMobject.get_alignment_strand = (int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int))__pyx_f_13_rnaseq_utils_9BAMobject_get_alignment_strand; - __pyx_vtable_13_rnaseq_utils_BAMobject.get_splice_info = (PyObject *(*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, PyObject *, PyObject *, int, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_get_splice_info *__pyx_optional_args))__pyx_f_13_rnaseq_utils_9BAMobject_get_splice_info; + __pyx_vtable_13_rnaseq_utils_BAMobject.check_sjdb = (int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, int))__pyx_f_13_rnaseq_utils_9BAMobject_check_sjdb; __pyx_vtable_13_rnaseq_utils_BAMobject.orient_read_by_softclip = (int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, int, struct __pyx_opt_args_13_rnaseq_utils_9BAMobject_orient_read_by_softclip *__pyx_optional_args))__pyx_f_13_rnaseq_utils_9BAMobject_orient_read_by_softclip; __pyx_vtable_13_rnaseq_utils_BAMobject.filter_labels_by_softclip_length = (__pyx_ctuple_int__and_int__and_int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int, int, int, int, int, int, int, int, int))__pyx_f_13_rnaseq_utils_9BAMobject_filter_labels_by_softclip_length; __pyx_vtable_13_rnaseq_utils_BAMobject.untemplated_upstream_g = (int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int, int, int, PyObject *, PyObject *, PyObject *))__pyx_f_13_rnaseq_utils_9BAMobject_untemplated_upstream_g; __pyx_vtable_13_rnaseq_utils_BAMobject.softclipped_polya = (__pyx_ctuple_int__and_int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int, int, int, PyObject *, PyObject *, PyObject *))__pyx_f_13_rnaseq_utils_9BAMobject_softclipped_polya; __pyx_vtable_13_rnaseq_utils_BAMobject.restore_terminal_mismatches = (void (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, int, int, int, PyObject *))__pyx_f_13_rnaseq_utils_9BAMobject_restore_terminal_mismatches; __pyx_vtable_13_rnaseq_utils_BAMobject.matches_masking_sequence = (int (*)(struct __pyx_obj_13_rnaseq_utils_BAMobject *, PyObject *, int, int, PyObject *, int))__pyx_f_13_rnaseq_utils_9BAMobject_matches_masking_sequence; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils_BAMobject) < 0) __PYX_ERR(0, 1970, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils_BAMobject) < 0) __PYX_ERR(0, 1922, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils_BAMobject.tp_print = 0; #endif @@ -85012,7 +85885,7 @@ static int __Pyx_modinit_type_init_code(void) { } #if CYTHON_UPDATE_DESCRIPTOR_DOC { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_BAMobject, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1970, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_13_rnaseq_utils_BAMobject, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 1922, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_13_rnaseq_utils_9BAMobject___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_13_rnaseq_utils_9BAMobject___init__.doc = __pyx_doc_13_rnaseq_utils_9BAMobject___init__; @@ -85020,11 +85893,11 @@ static int __Pyx_modinit_type_init_code(void) { } } #endif - if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_BAMobject.tp_dict, __pyx_vtabptr_13_rnaseq_utils_BAMobject) < 0) __PYX_ERR(0, 1970, __pyx_L1_error) - if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BAMobject, (PyObject *)&__pyx_type_13_rnaseq_utils_BAMobject) < 0) __PYX_ERR(0, 1970, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_BAMobject) < 0) __PYX_ERR(0, 1970, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_13_rnaseq_utils_BAMobject.tp_dict, __pyx_vtabptr_13_rnaseq_utils_BAMobject) < 0) __PYX_ERR(0, 1922, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BAMobject, (PyObject *)&__pyx_type_13_rnaseq_utils_BAMobject) < 0) __PYX_ERR(0, 1922, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_13_rnaseq_utils_BAMobject) < 0) __PYX_ERR(0, 1922, __pyx_L1_error) __pyx_ptype_13_rnaseq_utils_BAMobject = &__pyx_type_13_rnaseq_utils_BAMobject; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct____init__) < 0) __PYX_ERR(0, 26, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct____init__) < 0) __PYX_ERR(0, 27, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils___pyx_scope_struct____init__.tp_print = 0; #endif @@ -85032,7 +85905,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_13_rnaseq_utils___pyx_scope_struct____init__.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_13_rnaseq_utils___pyx_scope_struct____init__ = &__pyx_type_13_rnaseq_utils___pyx_scope_struct____init__; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 53, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 54, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils___pyx_scope_struct_1_genexpr.tp_print = 0; #endif @@ -85040,7 +85913,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_13_rnaseq_utils___pyx_scope_struct_1_genexpr.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_13_rnaseq_utils___pyx_scope_struct_1_genexpr = &__pyx_type_13_rnaseq_utils___pyx_scope_struct_1_genexpr; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_2_generate_loci) < 0) __PYX_ERR(0, 1193, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_2_generate_loci) < 0) __PYX_ERR(0, 1195, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils___pyx_scope_struct_2_generate_loci.tp_print = 0; #endif @@ -85048,7 +85921,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_13_rnaseq_utils___pyx_scope_struct_2_generate_loci.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_13_rnaseq_utils___pyx_scope_struct_2_generate_loci = &__pyx_type_13_rnaseq_utils___pyx_scope_struct_2_generate_loci; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_3_array_to_blocks) < 0) __PYX_ERR(0, 1235, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_3_array_to_blocks) < 0) __PYX_ERR(0, 1237, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils___pyx_scope_struct_3_array_to_blocks.tp_print = 0; #endif @@ -85056,7 +85929,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_13_rnaseq_utils___pyx_scope_struct_3_array_to_blocks.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_13_rnaseq_utils___pyx_scope_struct_3_array_to_blocks = &__pyx_type_13_rnaseq_utils___pyx_scope_struct_3_array_to_blocks; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_4_parse_MD_string) < 0) __PYX_ERR(0, 1802, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_4_parse_MD_string) < 0) __PYX_ERR(0, 1754, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils___pyx_scope_struct_4_parse_MD_string.tp_print = 0; #endif @@ -85064,7 +85937,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_13_rnaseq_utils___pyx_scope_struct_4_parse_MD_string.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_13_rnaseq_utils___pyx_scope_struct_4_parse_MD_string = &__pyx_type_13_rnaseq_utils___pyx_scope_struct_4_parse_MD_string; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_5_read_generator) < 0) __PYX_ERR(0, 2459, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_5_read_generator) < 0) __PYX_ERR(0, 2484, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils___pyx_scope_struct_5_read_generator.tp_print = 0; #endif @@ -85072,7 +85945,7 @@ static int __Pyx_modinit_type_init_code(void) { __pyx_type_13_rnaseq_utils___pyx_scope_struct_5_read_generator.tp_getattro = __Pyx_PyObject_GenericGetAttrNoDict; } __pyx_ptype_13_rnaseq_utils___pyx_scope_struct_5_read_generator = &__pyx_type_13_rnaseq_utils___pyx_scope_struct_5_read_generator; - if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_6_generate_subchunks) < 0) __PYX_ERR(0, 2539, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_13_rnaseq_utils___pyx_scope_struct_6_generate_subchunks) < 0) __PYX_ERR(0, 2564, __pyx_L1_error) #if PY_VERSION_HEX < 0x030800B1 __pyx_type_13_rnaseq_utils___pyx_scope_struct_6_generate_subchunks.tp_print = 0; #endif @@ -85435,52 +86308,64 @@ if (!__Pyx_RefNanny) { * #cython: language_level=3 * cimport cython * import array # <<<<<<<<<<<<<< + * import sys * from cpython cimport array - * import numpy as np */ __pyx_t_1 = __Pyx_Import(__pyx_n_s_array, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_array, __pyx_t_1) < 0) __PYX_ERR(0, 3, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":5 + /* "_rnaseq_utils.pyx":4 + * cimport cython * import array + * import sys # <<<<<<<<<<<<<< + * from cpython cimport array + * import numpy as np + */ + __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 4, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "_rnaseq_utils.pyx":6 + * import sys * from cpython cimport array * import numpy as np # <<<<<<<<<<<<<< * cimport numpy as np * import bookend.core.cython_utils._fasta_utils as fu */ - __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 5, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_numpy, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 5, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_np, __pyx_t_1) < 0) __PYX_ERR(0, 6, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":7 + /* "_rnaseq_utils.pyx":8 * import numpy as np * cimport numpy as np * import bookend.core.cython_utils._fasta_utils as fu # <<<<<<<<<<<<<< * from collections import namedtuple, Counter * from ast import literal_eval */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 7, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s__90); __Pyx_GIVEREF(__pyx_n_s__90); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s__90); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_bookend_core_cython_utils__fasta, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 7, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_bookend_core_cython_utils__fasta, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_fu, __pyx_t_2) < 0) __PYX_ERR(0, 7, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_fu, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":8 + /* "_rnaseq_utils.pyx":9 * cimport numpy as np * import bookend.core.cython_utils._fasta_utils as fu * from collections import namedtuple, Counter # <<<<<<<<<<<<<< * from ast import literal_eval * import copy */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_namedtuple); __Pyx_GIVEREF(__pyx_n_s_namedtuple); @@ -85488,236 +86373,236 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_s_Counter); __Pyx_GIVEREF(__pyx_n_s_Counter); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Counter); - __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_namedtuple, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 8, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Counter); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_Counter, __pyx_t_2) < 0) __PYX_ERR(0, 8, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_Counter, __pyx_t_2) < 0) __PYX_ERR(0, 9, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":9 + /* "_rnaseq_utils.pyx":10 * import bookend.core.cython_utils._fasta_utils as fu * from collections import namedtuple, Counter * from ast import literal_eval # <<<<<<<<<<<<<< * import copy * ctypedef unsigned char uint8 */ - __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) + __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_literal_eval); __Pyx_GIVEREF(__pyx_n_s_literal_eval); PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_literal_eval); - __pyx_t_2 = __Pyx_Import(__pyx_n_s_ast, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 9, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_ast, __pyx_t_1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_literal_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 9, __pyx_L1_error) + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_literal_eval); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_literal_eval, __pyx_t_1) < 0) __PYX_ERR(0, 9, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_literal_eval, __pyx_t_1) < 0) __PYX_ERR(0, 10, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":10 + /* "_rnaseq_utils.pyx":11 * from collections import namedtuple, Counter * from ast import literal_eval * import copy # <<<<<<<<<<<<<< * ctypedef unsigned char uint8 * ctypedef np.float32_t float32 */ - __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 10, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 11, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":17 + /* "_rnaseq_utils.pyx":18 * # Object for defining an RNA sequencing read # * ############################################## * ELdata = namedtuple('ELdata', 'chrom source strand ranges splice s_tag e_tag capped weight condensed') # <<<<<<<<<<<<<< * cdef class RNAseqMapping(): * cdef public int chrom, source, strand, s_len, e_len */ - __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_namedtuple); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__91, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_ELdata, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_ELdata, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":454 + /* "_rnaseq_utils.pyx":455 * ############################################################ * config_defaults = { * 'source':'', # <<<<<<<<<<<<<< * 's_tag':False, * 'e_tag':False, */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(25); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 454, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(25); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_source, __pyx_kp_u__7) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_source, __pyx_kp_u__7) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":455 + /* "_rnaseq_utils.pyx":456 * config_defaults = { * 'source':'', * 's_tag':False, # <<<<<<<<<<<<<< * 'e_tag':False, * 'capped':False, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_s_tag, Py_False) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_s_tag, Py_False) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":456 + /* "_rnaseq_utils.pyx":457 * 'source':'', * 's_tag':False, * 'e_tag':False, # <<<<<<<<<<<<<< * 'capped':False, * 'stranded':False, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_e_tag, Py_False) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_e_tag, Py_False) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":457 + /* "_rnaseq_utils.pyx":458 * 's_tag':False, * 'e_tag':False, * 'capped':False, # <<<<<<<<<<<<<< * 'stranded':False, * 'reverse':False, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_capped, Py_False) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_capped, Py_False) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":458 + /* "_rnaseq_utils.pyx":459 * 'e_tag':False, * 'capped':False, * 'stranded':False, # <<<<<<<<<<<<<< * 'reverse':False, * 'start_seq':'ACGGG', */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_stranded, Py_False) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_stranded, Py_False) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":459 + /* "_rnaseq_utils.pyx":460 * 'capped':False, * 'stranded':False, * 'reverse':False, # <<<<<<<<<<<<<< * 'start_seq':'ACGGG', * 'end_seq':'RRRRRRRRRRRRRRRRRRRR', */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_reverse, Py_False) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_start_seq, __pyx_n_u_ACGGG) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_end_seq, __pyx_n_u_RRRRRRRRRRRRRRRRRRRR) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_minlen_strict, __pyx_int_20) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_minlen_loose, __pyx_int_25) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_mismatch_rate, __pyx_float_0_2) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_error_rate, __pyx_float_0_1) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_min_reps, __pyx_int_2) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_cap_bonus, __pyx_int_5) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sj_shift, __pyx_int_0) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_max_headclip, __pyx_int_4) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_confidence_threshold, __pyx_float_0_5) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_gene_delim, __pyx_kp_u__9) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - - /* "_rnaseq_utils.pyx":472 + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_reverse, Py_False) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_start_seq, __pyx_n_u_ACGGG) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_end_seq, __pyx_n_u_RRRRRRRRRRRRRRRRRRRR) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_minlen_strict, __pyx_int_20) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_minlen_loose, __pyx_int_25) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_mismatch_rate, __pyx_float_0_2) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_error_rate, __pyx_float_0_1) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_min_reps, __pyx_int_2) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_cap_bonus, __pyx_int_5) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sj_shift, __pyx_int_0) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_max_headclip, __pyx_int_4) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_confidence_threshold, __pyx_float_0_5) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_gene_delim, __pyx_kp_u__9) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + + /* "_rnaseq_utils.pyx":473 * 'confidence_threshold':0.5, * 'gene_delim':'.', * 'remove_noncanonical':False, # <<<<<<<<<<<<<< * 'secondary':False, * 'ignore_ends':False, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_remove_noncanonical, Py_False) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_remove_noncanonical, Py_False) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":473 + /* "_rnaseq_utils.pyx":474 * 'gene_delim':'.', * 'remove_noncanonical':False, * 'secondary':False, # <<<<<<<<<<<<<< * 'ignore_ends':False, * 'labels_are_trimmed':True, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_secondary, Py_False) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_secondary, Py_False) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":474 + /* "_rnaseq_utils.pyx":475 * 'remove_noncanonical':False, * 'secondary':False, * 'ignore_ends':False, # <<<<<<<<<<<<<< * 'labels_are_trimmed':True, * 'quality_filter':True, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ignore_ends, Py_False) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ignore_ends, Py_False) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":475 + /* "_rnaseq_utils.pyx":476 * 'secondary':False, * 'ignore_ends':False, * 'labels_are_trimmed':True, # <<<<<<<<<<<<<< * 'quality_filter':True, * 'reference':None, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_labels_are_trimmed, Py_True) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_labels_are_trimmed, Py_True) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":476 + /* "_rnaseq_utils.pyx":477 * 'ignore_ends':False, * 'labels_are_trimmed':True, * 'quality_filter':True, # <<<<<<<<<<<<<< * 'reference':None, * 'sj':None, */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_quality_filter, Py_True) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_quality_filter, Py_True) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":477 + /* "_rnaseq_utils.pyx":478 * 'labels_are_trimmed':True, * 'quality_filter':True, * 'reference':None, # <<<<<<<<<<<<<< * 'sj':None, * } */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_reference, Py_None) < 0) __PYX_ERR(0, 454, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_reference, Py_None) < 0) __PYX_ERR(0, 455, __pyx_L1_error) - /* "_rnaseq_utils.pyx":478 + /* "_rnaseq_utils.pyx":479 * 'quality_filter':True, * 'reference':None, * 'sj':None, # <<<<<<<<<<<<<< * } * */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sj, Py_None) < 0) __PYX_ERR(0, 454, __pyx_L1_error) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_config_defaults, __pyx_t_1) < 0) __PYX_ERR(0, 453, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sj, Py_None) < 0) __PYX_ERR(0, 455, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_config_defaults, __pyx_t_1) < 0) __PYX_ERR(0, 454, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":493 + /* "_rnaseq_utils.pyx":494 * cdef public set sj_set * * def __init__(self, chrom_array=None, source_array=None, chrom_lengths=None, genome_fasta=None, config=config_defaults): # <<<<<<<<<<<<<< * """Container for RNAseqMapping objects. Stores a reference dictionary for all * chromosome names and sample names. Contains methods for parsing */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_config_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_config_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__22 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":895 + /* "_rnaseq_utils.pyx":897 * ###################################### * gtf_defaults = { * 'parent_types':set(['transcript']), # <<<<<<<<<<<<<< * 'parent_key_transcript':['transcript_id', 'Name'], * 'parent_key_gene':'gene_id', */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error) + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PySet_Add(__pyx_t_2, __pyx_n_u_transcript) < 0) __PYX_ERR(0, 895, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_types, __pyx_t_2) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_transcript) < 0) __PYX_ERR(0, 897, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_types, __pyx_t_2) < 0) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":896 + /* "_rnaseq_utils.pyx":898 * gtf_defaults = { * 'parent_types':set(['transcript']), * 'parent_key_transcript':['transcript_id', 'Name'], # <<<<<<<<<<<<<< * 'parent_key_gene':'gene_id', * 'child_types':set(['exon']), */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_transcript_id); __Pyx_GIVEREF(__pyx_n_u_transcript_id); @@ -85725,23 +86610,23 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_u_Name); __Pyx_GIVEREF(__pyx_n_u_Name); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_Name); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_key_transcript, __pyx_t_2) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_key_transcript, __pyx_t_2) < 0) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_key_gene, __pyx_n_u_gene_id) < 0) __PYX_ERR(0, 895, __pyx_L1_error) - __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_key_gene, __pyx_n_u_gene_id) < 0) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 900, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PySet_Add(__pyx_t_2, __pyx_n_u_exon) < 0) __PYX_ERR(0, 898, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_types, __pyx_t_2) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_exon) < 0) __PYX_ERR(0, 900, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_types, __pyx_t_2) < 0) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":899 + /* "_rnaseq_utils.pyx":901 * 'parent_key_gene':'gene_id', * 'child_types':set(['exon']), * 'child_key_transcript':['transcript_id', 'Parent'], # <<<<<<<<<<<<<< * 'child_key_gene':'gene_id' * } */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_transcript_id); __Pyx_GIVEREF(__pyx_n_u_transcript_id); @@ -85749,76 +86634,76 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_u_Parent); __Pyx_GIVEREF(__pyx_n_u_Parent); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_Parent); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_key_transcript, __pyx_t_2) < 0) __PYX_ERR(0, 895, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_key_transcript, __pyx_t_2) < 0) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_key_gene, __pyx_n_u_gene_id) < 0) __PYX_ERR(0, 895, __pyx_L1_error) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_gtf_defaults, __pyx_t_1) < 0) __PYX_ERR(0, 894, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_key_gene, __pyx_n_u_gene_id) < 0) __PYX_ERR(0, 897, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_gtf_defaults, __pyx_t_1) < 0) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":903 + /* "_rnaseq_utils.pyx":905 * } * gff_defaults = { * 'parent_types':set([ # <<<<<<<<<<<<<< * 'mRNA','transcript', * 'snoRNA','tRNA','snRNA', 'miRNA','rRNA','ncRNA','mRNA_TE_gene','pseudogenic_transcript', */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PySet_Add(__pyx_t_2, __pyx_n_u_mRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_transcript) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_snoRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_tRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_snRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_miRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_rRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_ncRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_mRNA_TE_gene) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_pseudogenic_transcript) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_antisense_lncRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_antisense_RNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_lnc_RNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_primary_transcript) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_guide_RNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_scRNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_RNase_MRP_RNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_Y_RNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_RNase_P_RNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_telomerase_RNA) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_types, __pyx_t_2) < 0) __PYX_ERR(0, 903, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_mRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_transcript) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_snoRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_tRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_snRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_miRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_rRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_ncRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_mRNA_TE_gene) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_pseudogenic_transcript) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_antisense_lncRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_antisense_RNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_lnc_RNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_primary_transcript) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_guide_RNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_scRNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_RNase_MRP_RNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_Y_RNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_RNase_P_RNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_telomerase_RNA) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_types, __pyx_t_2) < 0) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":908 + /* "_rnaseq_utils.pyx":910 * 'antisense_lncRNA','antisense_RNA','lnc_RNA', 'primary_transcript', * 'guide_RNA', 'scRNA', 'RNase_MRP_RNA', 'Y_RNA', 'RNase_P_RNA', 'telomerase_RNA']), * 'parent_key_transcript':['transcript_id'], # <<<<<<<<<<<<<< * 'parent_key_gene':'gene', * 'child_types':set(['exon','pseudogenic_exon']), */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_transcript_id); __Pyx_GIVEREF(__pyx_n_u_transcript_id); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_transcript_id); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_key_transcript, __pyx_t_2) < 0) __PYX_ERR(0, 903, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_key_transcript, __pyx_t_2) < 0) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_key_gene, __pyx_n_u_gene) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_parent_key_gene, __pyx_n_u_gene) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (PySet_Add(__pyx_t_2, __pyx_n_u_exon) < 0) __PYX_ERR(0, 910, __pyx_L1_error) - if (PySet_Add(__pyx_t_2, __pyx_n_u_pseudogenic_exon) < 0) __PYX_ERR(0, 910, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_types, __pyx_t_2) < 0) __PYX_ERR(0, 903, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_exon) < 0) __PYX_ERR(0, 912, __pyx_L1_error) + if (PySet_Add(__pyx_t_2, __pyx_n_u_pseudogenic_exon) < 0) __PYX_ERR(0, 912, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_types, __pyx_t_2) < 0) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "_rnaseq_utils.pyx":911 + /* "_rnaseq_utils.pyx":913 * 'parent_key_gene':'gene', * 'child_types':set(['exon','pseudogenic_exon']), * 'child_key_transcript':['transcript_id', 'Parent'], # <<<<<<<<<<<<<< * 'child_key_gene':'gene' * } */ - __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error) + __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_u_transcript_id); __Pyx_GIVEREF(__pyx_n_u_transcript_id); @@ -85826,192 +86711,192 @@ if (!__Pyx_RefNanny) { __Pyx_INCREF(__pyx_n_u_Parent); __Pyx_GIVEREF(__pyx_n_u_Parent); PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_Parent); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_key_transcript, __pyx_t_2) < 0) __PYX_ERR(0, 903, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_key_transcript, __pyx_t_2) < 0) __PYX_ERR(0, 905, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_key_gene, __pyx_n_u_gene) < 0) __PYX_ERR(0, 903, __pyx_L1_error) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_gff_defaults, __pyx_t_1) < 0) __PYX_ERR(0, 902, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_child_key_gene, __pyx_n_u_gene) < 0) __PYX_ERR(0, 905, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_gff_defaults, __pyx_t_1) < 0) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":915 + /* "_rnaseq_utils.pyx":917 * } * gtf_colorcode = { * '3prime_overlapping_ncRNA': '203,98,130', # <<<<<<<<<<<<<< * 'antisense': '194,71,71', * 'antisense_RNA': '194,71,71', */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(66); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(66); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_3prime_overlapping_ncRNA, __pyx_kp_u_203_98_130) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_antisense, __pyx_kp_u_194_71_71) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_antisense_RNA, __pyx_kp_u_194_71_71) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_atlncRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_atRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_bidirectional_promoter_lncRNA, __pyx_kp_u_153_108_206) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_C_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_C_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_D_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_D_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_J_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_LV_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_V_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_V_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_lincRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_lncRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_lnc_RNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_macro_lncRNA, __pyx_kp_u_6_74_140) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_miRNA, __pyx_kp_u_198_95_84) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_misc_RNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Mt_rRNA, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Mt_tRNA, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_mRNA_TE_gene, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ncRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_nonsense_mediated_decay, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_non_stop_decay, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_nontranslating_CDS, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_otherRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_polymorphic_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pseudogenic_transcript, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pre_miRNA, __pyx_kp_u_198_95_84) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_processed_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_processed_transcript, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_primary_transcript, __pyx_kp_u_198_95_84) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_protein_coding, __pyx_kp_u_49_132_44) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_mRNA, __pyx_kp_u_49_132_44) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_transcript, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_retained_intron, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ribozyme, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_rRNA, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_RNase_MRP_RNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_scaRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_scRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sense_intronic, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sense_overlapping, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_snoRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_snRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_SRP_RNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TEC, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_transcribed_processed_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_transcribed_unitary_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_transcribed_unprocessed_pseudoge, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_translated_processed_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_translated_unprocessed_pseudogen, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_tRNA, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_C_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_D_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_J_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_J_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_V_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_V_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_unitary_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_unprocessed_pseudogene, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 915, __pyx_L1_error) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_gtf_colorcode, __pyx_t_1) < 0) __PYX_ERR(0, 914, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u_3prime_overlapping_ncRNA, __pyx_kp_u_203_98_130) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_antisense, __pyx_kp_u_194_71_71) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_antisense_RNA, __pyx_kp_u_194_71_71) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_atlncRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_atRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_bidirectional_promoter_lncRNA, __pyx_kp_u_153_108_206) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_C_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_C_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_D_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_D_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_J_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_LV_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_V_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_IG_V_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_lincRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_lncRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_lnc_RNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_macro_lncRNA, __pyx_kp_u_6_74_140) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_miRNA, __pyx_kp_u_198_95_84) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_misc_RNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Mt_rRNA, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_Mt_tRNA, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_mRNA_TE_gene, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ncRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_nonsense_mediated_decay, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_non_stop_decay, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_nontranslating_CDS, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_otherRNA, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_polymorphic_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pseudogenic_transcript, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pre_miRNA, __pyx_kp_u_198_95_84) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_processed_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_processed_transcript, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_primary_transcript, __pyx_kp_u_198_95_84) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_protein_coding, __pyx_kp_u_49_132_44) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_mRNA, __pyx_kp_u_49_132_44) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_transcript, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_retained_intron, __pyx_kp_u_180_155_100) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_ribozyme, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_rRNA, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_RNase_MRP_RNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_scaRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_scRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sense_intronic, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sense_overlapping, __pyx_kp_u_56_114_168) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_snoRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_snRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_SRP_RNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_sRNA, __pyx_kp_u_249_185_54) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TEC, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_transcribed_processed_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_transcribed_unitary_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_transcribed_unprocessed_pseudoge, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_translated_processed_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_translated_unprocessed_pseudogen, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_tRNA, __pyx_kp_u_0_0_0) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_C_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_D_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_J_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_J_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_V_gene, __pyx_kp_u_110_66_19) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_TR_V_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_unitary_pseudogene, __pyx_kp_u_80_80_80) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_unprocessed_pseudogene, __pyx_kp_u_120_120_120) < 0) __PYX_ERR(0, 917, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_gtf_colorcode, __pyx_t_1) < 0) __PYX_ERR(0, 916, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1080 + /* "_rnaseq_utils.pyx":1082 * cdef public int number_of_assemblies, counter, min_reps, confidence * cdef public float cap_bonus * def __init__(self, annotation_files, reference=None, genome_fasta=None, config=config_defaults, gtf_config=gtf_defaults, gff_config=gff_defaults, confidence=1): # <<<<<<<<<<<<<< * RNAseqDataset.__init__(self, None, None, None, genome_fasta, config) * self.source_array = annotation_files */ - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_config_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_config_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__38 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gtf_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gtf_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__39 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gff_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1080, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_gff_defaults); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1082, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__40 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1227 + /* "_rnaseq_utils.pyx":1229 * * bed_colors = { * 'U':'139,137,138', # <<<<<<<<<<<<<< * 'C':'34,82,37', * 'S':'79,153,186', */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_U, __pyx_kp_u_139_137_138) < 0) __PYX_ERR(0, 1227, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_C, __pyx_kp_u_34_82_37) < 0) __PYX_ERR(0, 1227, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_S, __pyx_kp_u_79_153_186) < 0) __PYX_ERR(0, 1227, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_E, __pyx_kp_u_215_60_41) < 0) __PYX_ERR(0, 1227, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_SE, __pyx_kp_u_155_105_178) < 0) __PYX_ERR(0, 1227, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_CE, __pyx_kp_u_25_5_23) < 0) __PYX_ERR(0, 1227, __pyx_L1_error) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_bed_colors, __pyx_t_1) < 0) __PYX_ERR(0, 1226, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_U, __pyx_kp_u_139_137_138) < 0) __PYX_ERR(0, 1229, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_C, __pyx_kp_u_34_82_37) < 0) __PYX_ERR(0, 1229, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_S, __pyx_kp_u_79_153_186) < 0) __PYX_ERR(0, 1229, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_E, __pyx_kp_u_215_60_41) < 0) __PYX_ERR(0, 1229, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_SE, __pyx_kp_u_155_105_178) < 0) __PYX_ERR(0, 1229, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_CE, __pyx_kp_u_25_5_23) < 0) __PYX_ERR(0, 1229, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_bed_colors, __pyx_t_1) < 0) __PYX_ERR(0, 1228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1235 + /* "_rnaseq_utils.pyx":1237 * } * * def array_to_blocks(list arr): # <<<<<<<<<<<<<< * """Breaks an array into a collections of (start,end) INCLUSIVE doubles * that define the coordinates of all contiguous blocks in the array""" */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13_rnaseq_utils_1array_to_blocks, NULL, __pyx_n_s_rnaseq_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1235, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13_rnaseq_utils_1array_to_blocks, NULL, __pyx_n_s_rnaseq_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_to_blocks, __pyx_t_1) < 0) __PYX_ERR(0, 1235, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_array_to_blocks, __pyx_t_1) < 0) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":1802 - * return False + /* "_rnaseq_utils.pyx":1754 + * return 0 * * def parse_MD_string(str mdstring): # <<<<<<<<<<<<<< * """Creates a generator object to yield the elements * in an MD:Z tag from the SAM format. The elements are either */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13_rnaseq_utils_26parse_MD_string, NULL, __pyx_n_s_rnaseq_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1802, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13_rnaseq_utils_26parse_MD_string, NULL, __pyx_n_s_rnaseq_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1754, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_MD_string, __pyx_t_1) < 0) __PYX_ERR(0, 1802, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_parse_MD_string, __pyx_t_1) < 0) __PYX_ERR(0, 1754, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2459 + /* "_rnaseq_utils.pyx":2484 * return False * * def read_generator(fileconn, RNAseqDataset dataset, str file_type, int max_gap, float minimum_proportion): # <<<<<<<<<<<<<< * """Yields a contiguous chunk of reads from the input file * separated on either side by a gaps > max_gap""" */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13_rnaseq_utils_31read_generator, NULL, __pyx_n_s_rnaseq_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2459, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13_rnaseq_utils_31read_generator, NULL, __pyx_n_s_rnaseq_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_generator, __pyx_t_1) < 0) __PYX_ERR(0, 2459, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_read_generator, __pyx_t_1) < 0) __PYX_ERR(0, 2484, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2539 + /* "_rnaseq_utils.pyx":2564 * fileconn.close() * * def generate_subchunks(list list_of_reads, list split_positions): # <<<<<<<<<<<<<< * cdef: * RNAseqMapping read */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13_rnaseq_utils_34generate_subchunks, NULL, __pyx_n_s_rnaseq_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2539, __pyx_L1_error) + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_13_rnaseq_utils_34generate_subchunks, NULL, __pyx_n_s_rnaseq_utils); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_subchunks, __pyx_t_1) < 0) __PYX_ERR(0, 2539, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_subchunks, __pyx_t_1) < 0) __PYX_ERR(0, 2564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "_rnaseq_utils.pyx":2617 + /* "_rnaseq_utils.pyx":2642 * return False * * cpdef list get_gaps(np.ndarray[float, ndim=1] array, int maxgap, threshold = float(1)): # <<<<<<<<<<<<<< * """Returns True if no gap longer than maxgap in the array falls below the threshold""" * cdef Py_ssize_t i, l */ - __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2617, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__64 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2617, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_int_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2642, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_k__64 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); @@ -88890,6 +89775,73 @@ static CYTHON_INLINE int __Pyx_DelItemInt_Fast(PyObject *o, Py_ssize_t i, return __Pyx_DelItem_Generic(o, PyInt_FromSsize_t(i)); } +/* PyIntCompare */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_TRUE; + } + #if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(op1))) { + const long b = intval; + long a = PyInt_AS_LONG(op1); + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + #if CYTHON_USE_PYLONG_INTERNALS + if (likely(PyLong_CheckExact(op1))) { + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); + const digit* digits = ((PyLongObject*)op1)->ob_digit; + if (intval == 0) { + if (size == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } else if (intval < 0) { + if (size >= 0) + Py_RETURN_FALSE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_FALSE; + } + uintval = (unsigned long) intval; +#if PyLong_SHIFT * 4 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 4)) { + unequal = (size != 5) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[4] != ((uintval >> (4 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 3 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 3)) { + unequal = (size != 4) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[3] != ((uintval >> (3 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 2 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 2)) { + unequal = (size != 3) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)) | (digits[2] != ((uintval >> (2 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif +#if PyLong_SHIFT * 1 < SIZEOF_LONG*8 + if (uintval >> (PyLong_SHIFT * 1)) { + unequal = (size != 2) || (digits[0] != (uintval & (unsigned long) PyLong_MASK)) + | (digits[1] != ((uintval >> (1 * PyLong_SHIFT)) & (unsigned long) PyLong_MASK)); + } else +#endif + unequal = (size != 1) || (((unsigned long) digits[0]) != (uintval & (unsigned long) PyLong_MASK)); + if (unequal == 0) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + #endif + if (PyFloat_CheckExact(op1)) { + const long b = intval; + double a = PyFloat_AS_DOUBLE(op1); + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; + } + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); +} + /* py_dict_values */ static CYTHON_INLINE PyObject* __Pyx_PyDict_Values(PyObject* d) { if (PY_MAJOR_VERSION >= 3) diff --git a/bookend/core/cython_utils/_rnaseq_utils.pyx b/bookend/core/cython_utils/_rnaseq_utils.pyx index 1a9525b..f50967d 100644 --- a/bookend/core/cython_utils/_rnaseq_utils.pyx +++ b/bookend/core/cython_utils/_rnaseq_utils.pyx @@ -1,6 +1,7 @@ #cython: language_level=3 cimport cython import array +import sys from cpython cimport array import numpy as np cimport numpy as np @@ -583,7 +584,7 @@ cdef class RNAseqDataset(): sj_tuple = (fields[0], int(fields[1])-1, int(fields[2]), -1) sj_set.add(sj_tuple) - elif len(fields) == 6 or sj_file.lower().endswith('.bed'): # intron BED6 file + elif len(fields) == 6 and sj_file.lower().endswith('.bed'): # intron BED6 file for line in open(sj_file,'r'): fields = line.rstrip().split('\t') if fields[5]=='+': # Forward strand @@ -593,8 +594,9 @@ cdef class RNAseqDataset(): sj_set.add(sj_tuple) else: - print("WARNING: --splice file not recognized. Provide SJ.out.tab or BED6.") + print("ERROR: --splice file not recognized. Provide SJ.out.tab or BED6.") print("For BED12/GTF/GFF3, use --reference.") + sys.exit(1) for chrom in self.reference_dict.keys(): for transcript in self.reference_dict[chrom]: @@ -1731,73 +1733,23 @@ cpdef str get_flank(dict genome, str chrom, int pos, int strand, str label_type, return flank -#TODO: Fix shift_junction for ONT reads -cdef (int, int) shift_junction(set junctions, str chrom, int left, int right, int strand, int max_shift): - """Allow the junction boundaries to be remapped by up to max_shift if a canonical splice junction - motif is nearby.""" - cdef str targetseq, queryseq - cdef int newleft, newright, shift, delta - cdef tuple old_junction, shifted_junction - old_junction = (chrom, left, right, strand) - if max_shift == 0 or old_junction in junctions: - return (old_junction[1], old_junction[2]) - else: - for shift in range(1,max_shift+1): - newleft, newright = left+shift, right+shift - shifted_junction = (chrom, newleft, newright, strand) - if shifted_junction in junctions: - print("Shifted l+{}r+{}".format(shift)) - return newleft, newright - - newleft, newright = left-shift, right-shift - shifted_junction = (chrom, newleft, newright, strand) - if shifted_junction in junctions: - print("Shifted l-{}r-{}".format(shift)) - return newleft, newright - - newleft, newright = left+shift, right - shifted_junction = (chrom, newleft, newright, strand) - if shifted_junction in junctions: - print("Shifted l+{}".format(shift)) - return newleft, newright - - newleft, newright = left-shift, right - shifted_junction = (chrom, newleft, newright, strand) - if shifted_junction in junctions: - print("Shifted l-{}".format(shift)) - return newleft, newright - - newleft, newright = left, right+shift - shifted_junction = (chrom, newleft, newright, strand) - if shifted_junction in junctions: - print("Shifted r+{}".format(shift)) - return newleft, newright - - newleft, newright = left, right-shift - shifted_junction = (chrom, newleft, newright, strand) - if shifted_junction in junctions: - print("Shifted r-{}".format(shift)) - return newleft, newright - - return (left, right) - - -cdef bint junction_is_canonical(dict genome, str chrom, int left, int right, int strand): - """ Returns 1(+), -1(-), or 0(.) for a left/right - pair of splice junction positions based +cdef int motif_strand(dict genome, str chrom, int left, int right): + """pair of splice junction positions based on the flanking genomic sequence """ cdef str flanking_sequence - if chrom not in genome.keys(): + cdef set canonical_plus = set(['GTAG','GCAG','ATAC','GAAG']) + cdef set canonical_minus = set(['CTAC','CTGC','GTAT','CTTC']) + if chrom not in genome: return 0 flanking_sequence = get_flank(genome, chrom, left-1, 1, 'E', 2) + get_flank(genome, chrom, right, 1, 'S', 2) flanking_sequence = flanking_sequence.upper() - if strand == 1: - return flanking_sequence in ['GTAG','GCAG','ATAC'] - elif strand == -1: - return flanking_sequence in ['CTAC','CTGC','GTAT'] - - return False + if flanking_sequence in canonical_plus: + return 1 + elif flanking_sequence in canonical_minus: + return -1 + else: + return 0 def parse_MD_string(str mdstring): """Creates a generator object to yield the elements @@ -1997,10 +1949,10 @@ cdef class BAMobject: int s_len, s_tag_len, e_len, e_tag_len, Nmap, counter, input_len, map_number, mate, strand, number_of_blocks int i, gap_len, pos, map_strand, junction_strand, chrom_id, start_pos, end_pos, trim_pos, errors, sj_shift float weight - str ID, chrom, js, seq, aligned_seq, trimmed_nuc + str ID, chrom, seq, aligned_seq, trimmed_nuc (bint, bint, int, int) ID_tags = (False, False, 0, 0) dict mappings - list splice, gaps, ranges, mapping_list, introns, newranges + list canonical, gaps, ranges, mapping_list, introns, newranges, jstrands bint stranded, stranded_method, reverse, fiveprime, threeprime, junction_exists (int, int) g set intronset @@ -2153,22 +2105,30 @@ cdef class BAMobject: if number_of_blocks == 1: junction_strand = 0 - splice = [] + canonical = [] else: # Check if the splice junctions can be used to assign a strand - splice = [False]*(number_of_blocks-1) junction_strand = self.get_alignment_strand(line, map_strand) - intronset = set(introns) - if strand != 0: # Try to make junctions on the labeled strand work - newranges, splice = self.get_splice_info(ranges, intronset, chrom, strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks - if all(splice): # The labeled strand works - junction_strand = strand - ranges = newranges + if strand == 0: + strand, canonical = self.evaluate_splice_sites(chrom, junction_strand, introns) + else: + strand, canonical = self.evaluate_splice_sites(chrom, strand, introns) - if not all(splice) and junction_strand != 0: - ranges, splice = self.get_splice_info(ranges, intronset, chrom, junction_strand, self.remove_noncanonical) # Check which gaps between exon blocks are present in intron blocks - + if strand == 0: # Use genomic motifs to identify strand + jstrands = [motif_strand(self.dataset.genome, chrom, left, right) for left,right in introns] + consensus_strand = sum(jstrands) + if consensus_strand > 0: + strand, consensus_strand = 1, 1 + elif consensus_strand < 0: + strand, consensus_strand = -1, -1 + + canonical = [True if (js == consensus_strand and consensus_strand !=0) else False for js in jstrands] + + # Check if any splice junctions can be corrected by shifting + if self.sj_shift > 0: + strand, ranges, canonical = self.adjust_splice_sites(strand, ranges, canonical, chrom) + # Reconcile strand information given by start, end, and splice - junction_exists = sum(splice) > 0 + junction_exists = sum(canonical) > 0 if junction_strand != 0 and junction_exists: # At least one strand-informative splice junction exists if strand != junction_strand: # Splice disagrees with end tags; remove tags strand = junction_strand @@ -2177,8 +2137,11 @@ cdef class BAMobject: if not stranded_method and not s_tag and not e_tag and not junction_exists: strand = 0 # No strand information can be found + if not self.remove_noncanonical: + canonical = [True]*len(canonical) + # Generate a ReadObject with the parsed attributes above - read_data = ELdata(chrom_id, 0, strand, ranges, splice, s_tag, e_tag, capped, round(weight,2), False) + read_data = ELdata(chrom_id, 0, strand, ranges, canonical, s_tag, e_tag, capped, round(weight,2), False) current_mapping = RNAseqMapping(read_data, attributes = {'errors':errors}) current_mapping.e_len = e_tag_len current_mapping.s_len = s_tag_len @@ -2194,6 +2157,87 @@ cdef class BAMobject: mapping_list = self.resolve_overlapping_mappings(mappings) return mapping_list + def evaluate_splice_sites(self, chrom, strand, introns): + """Returns a list of bools (1 per gap) that summarizes whether + each splice junction is supported by the available SJDB.""" + cdef list jstrands, canonical + cdef int l, r, js, junction_strand, consensus_strand + cdef bint seen_plus, seen_minus + jstrands = [0]*len(introns) + junction_strand = 0 + if strand == 0: # No info provided by BAM attributes + seen_plus = False + seen_minus = False + for inum in range(len(introns)): + l,r = introns[inum] + js = self.check_sjdb(chrom, l, r) + seen_plus = seen_plus or js == 1 + seen_minus = seen_minus or js == -1 + jstrands[inum] = js + + junction_strand = int(seen_plus) - int(seen_minus) + + consensus_strand = (strand + sum(jstrands)) + if consensus_strand > 0: + consensus_strand = 1 + elif consensus_strand < 0: + consensus_strand = -1 + + canonical = [True if (js == consensus_strand and consensus_strand !=0) else False for js in jstrands] + return consensus_strand, canonical + + def adjust_splice_sites(self, strand, ranges, canonical, chrom): + """Use genome motif information to version of the exon list where borders + have been shifted to correct poorly-formed splice junctions.""" + cdef int js, i, left, right, shiftleft, shiftright + # Shift to nearest SJDB first (allow indels) + if all(canonical): + return strand, ranges, canonical + + if self.dataset.has_genome or self.dataset.sj_set is not None: + for i in range(1, len(ranges)): # Iterate over introns + if not canonical[i-1]: # Skip any that are canonical + left = ranges[i-1][1] + right = ranges[i][0] + shiftleft, shiftright, js = self.shift_junction(chrom, left, right, strand) + if strand == 0 or js == strand: + strand = js + ranges[i-1] = (ranges[i-1][0], shiftleft) + ranges[i] = (shiftright, ranges[i][1]) + canonical[i-1] = True + + return strand, ranges, canonical + + cdef (int, int, int) shift_junction(self, str chrom, int left, int right, int strand): + """Returns a new left/right border of an intron and its strand.""" + cdef int i, js + for i in range(0, self.sj_shift+1): # Check SJDB, then genome + if strand >= 0: + if (chrom, left+i, right+i, 1) in self.dataset.sj_set: + # print("Found forward SJDB at shift +{}".format(i)) + return (left+i, right+i, 1) + elif (chrom, left-i, right-i, 1) in self.dataset.sj_set: + # print("Found forward SJDB at shift -{}".format(i)) + return (left-i, right-i, 1) + + if strand <= 0: + if (chrom, left+i, right+i, -1) in self.dataset.sj_set: + # print("Found reverse SJDB at shift +{}".format(i)) + return (left+i, right+i, -1) + elif (chrom, left-i, right-i, -1) in self.dataset.sj_set: + # print("Found reverse SJDB at shift -{}".format(i)) + return (left-i, right-i, -1) + + js = motif_strand(self.dataset.genome, chrom, left+i, right+i) + if (js == strand and strand != 0) or (js !=0 and strand == 0): + # print("Found {} motif at shift +{}".format(js, i)) + return (left+i, right+i, js) + + js = motif_strand(self.dataset.genome, chrom, left-i, right-i) + if (js == strand and strand != 0) or (js !=0 and strand == 0): + # print("Found {} motif at shift -{}".format(js, i)) + return (left-i, right-i, js) + cdef list resolve_overlapping_mappings(self, dict mappings): """Decision tree for simplifying multimappers """ cdef RNAseqMapping mapping, v, previous_mapping @@ -2270,33 +2314,14 @@ cdef class BAMobject: alignment_strand = 0 return alignment_strand - - cdef tuple get_splice_info(self, list ranges, set introns, str chrom, int alignment_strand, bint remove_noncanonical=False): - """Returns a list of booleans denoting whether each gap - between ranges is a splice junction or not on the given alignment strand.""" - cdef list splice - cdef Py_ssize_t i, range_len, gap_len - cdef junction_strand - cdef (int, int) g, shift_g - cdef tuple junction - cdef int strand, l, r, s - range_len = len(ranges) - gap_len = range_len - 1 - gaps = [(ranges[i][1], ranges[i+1][0]) for i in range(range_len-1)] # List of all gaps between ranges - splice = [False]*gap_len # List of booleans indicating whether each gap is a splice junction - for i in range(gap_len): - g = gaps[i] - splice[i] = g in introns - junction = (chrom, g[0], g[1], alignment_strand) - shift_g = shift_junction(self.dataset.sj_set, chrom, g[0], g[1], alignment_strand, self.sj_shift) - if shift_g != g: # Update ranges with the shifted junction - ranges[i] = (ranges[i][0], g[0]) - ranges[i+1] = (g[1], ranges[i+1][1]) - - if self.dataset.has_genome and self.remove_noncanonical: # Filter noncanonical junctions - splice[i] = junction_is_canonical(self.dataset.genome, chrom, g[0], g[1], alignment_strand) - - return ranges, splice + + cdef int check_sjdb(self, str chrom, int start, int end): + '''Returns the strand of''' + cdef int strand + strand = 0 + strand += int((chrom, start, end, 1) in self.dataset.sj_set) + strand -= int((chrom, start, end, -1) in self.dataset.sj_set) + return strand cdef int orient_read_by_softclip(self, str seq, int head, int tail, int eval_length=15): """Assume end labels are present as softclipped sequences on diff --git a/bookend_rna.egg-info/PKG-INFO b/bookend_rna.egg-info/PKG-INFO new file mode 100644 index 0000000..9aea4cc --- /dev/null +++ b/bookend_rna.egg-info/PKG-INFO @@ -0,0 +1,66 @@ +Metadata-Version: 2.1 +Name: bookend-rna +Version: 1.1.0 +Summary: End-guided transcript assembler for short and long RNA-seq reads. +Home-page: https://github.com/Gregor-Mendel-Institute/bookend +Author: Michael A. Schon +Author-email: michael.schon@wur.nl +License: UNKNOWN +Keywords: transcriptome assembler bioinformatics rna sequencing +Platform: UNKNOWN +Classifier: Programming Language :: Python :: 3 +Classifier: License :: OSI Approved :: MIT License +Classifier: Operating System :: OS Independent +Requires-Python: >=3.6 +Description-Content-Type: text/markdown +License-File: LICENSE + +# /| bookend |\\ +### End-guided transcriptome assembly. +Bookend is a comprehensive framework for end-guided assembly of short-read, long-read, and end-capture RNA-seq data. +Please see the [User Guide](Bookend_User_Guide.pdf) for a full description of the subcommands and arguments. +The lastest developments can be found in the [Bookend GitHub repository](https://github.com/Gregor-Mendel-Institute/bookend). + +Take a look at the [Bookend publication](https://genomebiology.biomedcentral.com/articles/10.1186/s13059-022-02700-3) for more details about its usage and applications. + +## Installation +Bookend can be installed through the Python Package Index (PyPI) on UNIX systems with Python 3.6+ using the command: +``` +pip install bookend-rna +``` + +If installing from the GitHub source code, perform the following steps: +``` +git clone https://github.com/Gregor-Mendel-Institute/bookend +cd bookend +python3 setup.py install +``` + +Once installed, all utilities can be accessed on the command as bookend subcommands: + + usage: bookend [subcommand] [options] [input file(s)] + Subcommands (use -h/--help for more info): + + label (Label 5' and 3' ends in a FASTQ file) + elr (Convert a BAM/SAM file to the end-labeled read format) + assemble (Assemble transcripts from aligned end-labeled reads) + condense (Partial assembly that leaves keeps all fragments; use for meta-assembly) + classify (Compare an assembly to the transcripts of a reference annotation) + bedgraph (Write a coverage Bedgraph file of end-labeled reads) + fasta (Write a transcript FASTA file from an annotation and genome) + + --end-labeled read (ELR) operations-- + elr-sort + elr-subset + elr-combine + + --file conversion-- + gtf-to-bed + gtf-ends + bed-to-elr + elr-to-bed + sam-to-sj + sj-to-bed + sj-merge + + diff --git a/bookend_rna.egg-info/SOURCES.txt b/bookend_rna.egg-info/SOURCES.txt new file mode 100644 index 0000000..c237ef1 --- /dev/null +++ b/bookend_rna.egg-info/SOURCES.txt @@ -0,0 +1,35 @@ +LICENSE +README.md +setup.py +bookend/__init__.py +bookend/__main__.py +bookend/core/argument_parsers.py +bookend/core/assemble.py +bookend/core/bam_to_elr.py +bookend/core/bed_to_elr.py +bookend/core/bedgraph.py +bookend/core/elr_combine.py +bookend/core/elr_condense.py +bookend/core/elr_simulate.py +bookend/core/elr_sort.py +bookend/core/elr_to_bed.py +bookend/core/fasta.py +bookend/core/fastq_end_label.py +bookend/core/gtf_classify.py +bookend/core/gtf_ends.py +bookend/core/gtf_merge.py +bookend/core/gtf_to_bed.py +bookend/core/sam_sj_out.py +bookend/core/sj_merge.py +bookend/core/sj_to_bed.py +bookend/core/cython_utils/_assembly_utils.c +bookend/core/cython_utils/_element_graph.c +bookend/core/cython_utils/_fasta_utils.c +bookend/core/cython_utils/_pq.c +bookend/core/cython_utils/_rnaseq_utils.c +bookend_rna.egg-info/PKG-INFO +bookend_rna.egg-info/SOURCES.txt +bookend_rna.egg-info/dependency_links.txt +bookend_rna.egg-info/entry_points.txt +bookend_rna.egg-info/requires.txt +bookend_rna.egg-info/top_level.txt \ No newline at end of file diff --git a/bookend_rna.egg-info/dependency_links.txt b/bookend_rna.egg-info/dependency_links.txt new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/bookend_rna.egg-info/dependency_links.txt @@ -0,0 +1 @@ + diff --git a/bookend_rna.egg-info/entry_points.txt b/bookend_rna.egg-info/entry_points.txt new file mode 100644 index 0000000..baaca32 --- /dev/null +++ b/bookend_rna.egg-info/entry_points.txt @@ -0,0 +1,2 @@ +[console_scripts] +bookend = bookend.__main__:main diff --git a/bookend_rna.egg-info/requires.txt b/bookend_rna.egg-info/requires.txt new file mode 100644 index 0000000..e40d106 --- /dev/null +++ b/bookend_rna.egg-info/requires.txt @@ -0,0 +1,3 @@ +cython +numpy +pysam diff --git a/bookend_rna.egg-info/top_level.txt b/bookend_rna.egg-info/top_level.txt new file mode 100644 index 0000000..68a08fa --- /dev/null +++ b/bookend_rna.egg-info/top_level.txt @@ -0,0 +1 @@ +bookend diff --git a/build/lib.linux-x86_64-3.7/bookend/__init__.py b/build/lib.linux-x86_64-3.7/bookend/__init__.py new file mode 100644 index 0000000..8b6fb1d --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/__init__.py @@ -0,0 +1,3 @@ +__version__ = '1.1.0' +__updated__ = '04.20.2023' +__date__ = '04.20.2023' diff --git a/build/lib.linux-x86_64-3.7/bookend/__main__.py b/build/lib.linux-x86_64-3.7/bookend/__main__.py new file mode 100644 index 0000000..8340583 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/__main__.py @@ -0,0 +1,105 @@ +#!/usr/bin/env python +# coding: utf-8 +""" + + /|| bookend ||\\ + ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ + End-guided transcript assembly + for short and long read RNA-seq +""" +from .core.argument_parsers import main_parser as parser +from .__init__ import __version__,__updated__,__date__ + +def get_parser(program_version_message): + parser.add_argument('-v', '--version', action='version', version=program_version_message) + return parser + +def import_object(object_name): + """Imports only the object needed to execute the subcommand.""" + if object_name == 'Assembler': + from .core.assemble import Assembler + objectClass = Assembler + elif object_name == 'Bedgrapher': + from .core.bedgraph import Bedgrapher + objectClass = Bedgrapher + elif object_name == 'Helper': + from .core.argument_parsers import Helper + objectClass = Helper + elif object_name == 'EndLabeler': + from .core.fastq_end_label import EndLabeler + objectClass = EndLabeler + elif object_name == 'Condenser': + from .core.elr_condense import Condenser + objectClass = Condenser + elif object_name == 'BAMtoELRconverter': + from .core.bam_to_elr import BAMtoELRconverter + objectClass = BAMtoELRconverter + elif object_name == 'BEDtoELRconverter': + from .core.bed_to_elr import BEDtoELRconverter + objectClass = BEDtoELRconverter + elif object_name == 'ELRtoBEDconverter': + from .core.elr_to_bed import ELRtoBEDconverter + objectClass = ELRtoBEDconverter + elif object_name == 'AnnotationMerger': + from .core.gtf_merge import AnnotationMerger + objectClass = AnnotationMerger + elif object_name == 'FastaWriter': + from .core.fasta import FastaWriter + objectClass = FastaWriter + elif object_name == 'AssemblyClassifier': + from .core.gtf_classify import AssemblyClassifier + objectClass = AssemblyClassifier + elif object_name == 'ELRcombiner': + from .core.elr_combine import ELRcombiner + objectClass = ELRcombiner + elif object_name == 'SAMtoSJconverter': + from .core.sam_sj_out import SAMtoSJconverter + objectClass = SAMtoSJconverter + elif object_name == 'SJmerger': + from .core.sj_merge import SJmerger + objectClass = SJmerger + elif object_name == 'SJtoBEDconverter': + from .core.sj_to_bed import SJtoBEDconverter + objectClass = SJtoBEDconverter + elif object_name == 'ELRsorter': + from .core.elr_sort import ELRsorter + objectClass = ELRsorter + elif object_name == 'GTFconverter': + from .core.gtf_to_bed import GTFconverter + objectClass = GTFconverter + elif object_name == 'GTFendwriter': + from .core.gtf_ends import GTFendwriter + objectClass = GTFendwriter + elif object_name == 'ELRsimulator': + from .core.elr_simulate import ELRsimulator + objectClass = ELRsimulator + else: + from .core.argument_parsers import Helper + objectClass = Helper + + return objectClass + +def main(): + """Passes commandline options to subfunctions.""" + version = 'v{}'.format(__version__) + date = str(__updated__) + program_version_message = '{} ({})'.format(version, date) + + parser = get_parser(program_version_message) + args = vars(parser.parse_args()) + try: + objectClass = import_object(args['object']) + if objectClass is None: + print('Subcommand not recognized. See bookend --help') + return 1 + + obj = objectClass(args) + return obj.run() + except KeyboardInterrupt: + return 0 + except Exception as e: + print(e) + return 2 + +if __name__ == '__main__': + main() diff --git a/build/lib.linux-x86_64-3.7/bookend/core/argument_parsers.py b/build/lib.linux-x86_64-3.7/bookend/core/argument_parsers.py new file mode 100644 index 0000000..1ded7f9 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/argument_parsers.py @@ -0,0 +1,375 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +from argparse import ArgumentParser, RawTextHelpFormatter, ArgumentDefaultsHelpFormatter + +#TODO: Flesh out Helper class +class Helper: + def __init__(self, args): + self.no_args_message = """ +/| bookend |\\ +¯¯¯¯¯¯¯¯¯¯¯¯¯ +End-guided transcriptome assembly. +usage: bookend [subcommand] [options] [input file(s)] +Subcommands (use -h/--help for more info): + + label (Label 5' and 3' ends in a FASTQ file) + elr (Convert a BAM/SAM file to the end-labeled read format) + assemble (Assemble transcripts from aligned end-labeled reads) + condense (Partial assembly that leaves keeps all fragments; use for meta-assembly) + classify (Compare an assembly to the transcripts of a reference annotation) + bedgraph (Write a coverage Bedgraph file of end-labeled reads) + fasta (Write a transcript FASTA file from an annotation and genome) + + --end-labeled read (ELR) operations-- + elr-sort + elr-subset + elr-combine + + --file conversion-- + gtf-to-bed + gtf-ends + bed-to-elr + elr-to-bed + sam-to-sj + sj-to-bed + sj-merge + +""" + + def run(self): + print(self.no_args_message) + + +desc = 'Functions for end-guided assembly of RNA-seq data.' +main_parser = ArgumentParser(description=desc, formatter_class=ArgumentDefaultsHelpFormatter) +main_parser.set_defaults(object='Helper') +subparsers = main_parser.add_subparsers(title='subcommands',description='Choose a command to run',help='Supported subcommands:') + +ELRdesc = """ +Converts file to a 'end labeled read' (ELR) format. +ELR contains a two-component header: #C (chromosome) and #S (source). +Each line is a read or read stack with seven columns: + chromosome position length strand ELCIGAR sample weight + + chromosome: Chromosome number, as indexed by the #C header + position: 0-indexed position in chromosome + length: Distance between the leftmost and righmost mapped position + strand: Inferred RNA strand; +, -, or . (unknown) + ELCIGAR: String describing the mapped read (full description below) + sample: Sample number, as indexed by the #S header + weight: Read count (allows partial counts for multimappers) +""" + + +### assemble.py ### +assemble_parser = subparsers.add_parser('assemble',help="Assembles an end-labeled read (ELR) file. Produces an output assembly (BED12/ELR/GTF) and a table of summary statistics (bookend_stats.tsv)", formatter_class=ArgumentDefaultsHelpFormatter) +assemble_parser.add_argument('-o','--output', dest='OUT', type=str, default='bookend_assembly.gtf', help="Destination file for assembly. File extension (bed, elr, gtf) determines output type.") +assemble_parser.add_argument("--source", dest='SOURCE', default='bookend', type=str, help="Name to add to the GTF source column.") +assemble_parser.add_argument('--cov_out', dest='COV_OUT', type=str, default=None, help="Destination for a TSV of coverage estimates for each transcript in each source.") +assemble_parser.add_argument('--max_gap', dest='MAX_GAP', type=int, default=50, help="Largest gap size to tolerate (nucleotides).") +assemble_parser.add_argument('--end_cluster', dest='END_CLUSTER', type=int, default=200, help="Largest distance between end-labeled reads to consider the same cluster (nucleotides).") +assemble_parser.add_argument('--min_overhang', dest='MIN_OVERHANG', type=int, default=3, help="Smallest overhang to count for a read overlapping two exon fragments (number of nucleotides).") +assemble_parser.add_argument('--min_cov', dest='MIN_COV', type=float, default=2, help="Minimum coverage filter to remove low-evidence transcript models.") +assemble_parser.add_argument('--allow_incomplete', dest='INCOMPLETE', default=False, action='store_true', help="Keep assembled transcripts even if they are not end-to-end complete.") +assemble_parser.add_argument('--min_unstranded_cov', dest='MIN_UNSTRANDED', type=float, default=20, help="(Only used if --allow_incomplete) Set a more stringent threshold for keeping nonstranded frags.") +assemble_parser.add_argument('--min_start', dest='MIN_S', type=float, default=0, help="Minimum number of start reads to accept as a start site.") +assemble_parser.add_argument('--min_end', dest='MIN_E', type=float, default=0, help="Minimum number of end reads to accept as an end site") +assemble_parser.add_argument('--min_intron_len', dest='MIN_INTRON_LEN', type=int, default=50, help="Minimum length for an intron (nucleotides)") +assemble_parser.add_argument('--min_len', dest='MINLEN', type=int, default=50, help="Minimum output transcript length (nucleotides).") +assemble_parser.add_argument('--min_proportion', dest='MIN_PROPORTION', type=float, default=0.01, help="[float 0-1] Exclude ends, juctions, or transcripts that contribute < this proportion. (Used as a signal threshold)") +assemble_parser.add_argument('--intron_filter', dest='INTRON_FILTER', type=float, default=0.15, help="[float 0-1] Retained introns must exceed this proportion the be considered.") +assemble_parser.add_argument('--truncation_filter', dest='TRUNCATION_FILTER', type=float, default=0.5, help="[float 0-1] 5'-truncated transcripts must exceed this proportion of coverage of longer transcripts. 1 suppresses truncations, 0 allows all.") +assemble_parser.add_argument('--cap_bonus', dest='CAP_BONUS', type=float, default=5, help="[float] Signal multiplier for 5' reads with an inferred cap structure (uuG).") +assemble_parser.add_argument('--cap_filter', dest='CAP_FILTER', type=float, default=.02, help="[float] Require putative truncations to have >= this percent 'capped' reads (uuG).") +assemble_parser.add_argument("--use_sources", dest='USE_SOURCES', default=False, action='store_true', help="Attempt to maximize coherence of reads from the same source.") +assemble_parser.add_argument("--ignore_labels", dest='IGNORE_LABELS', default=False, action='store_true', help="(overrides other options) Ignore all 5' and 3' end labels.") +assemble_parser.add_argument("--require_cap", dest='REQUIRE_CAP', default=False, action='store_true', help="No start site is allowed to have less than cap_filter of uuG reads.") +assemble_parser.add_argument('--verbose', dest='VERBOSE', default=False, action='store_true', help="Display a verbose summary of each assembly in stdout.") +assemble_parser.add_argument(dest='INPUT', type=str, nargs='+', help="Input ELR filepath(s). MUST be coordinate-sorted.") +assemble_parser.set_defaults(object='Assembler') + +### bedgraph.py ### +bedgraph_parser = subparsers.add_parser('bedgraph',help="Produces a Bedgraph file from an end-labeled read (ELR) file.", formatter_class=ArgumentDefaultsHelpFormatter) +bedgraph_parser.add_argument('-o','--output', dest='OUT', type=str, default='bookend.bedgraph', help="Bedgraph destination file.") +bedgraph_parser.add_argument('-t','--type', dest='TYPE', choices=['','COV','5P','3P','S', 'E', 'C'], type=str, default='COV', help="Coverage type: filters Bedgraph output by read label.") +bedgraph_parser.add_argument('-s','--strand', dest='STRAND', type=str, choices=['.','+','-'], default='.', help="Strand (-|+|.)") +# bedgraph_parser.add_argument('--scale', dest='SCALE', default=False, action='store_true', help="Perform per-million scaling on output values.") +bedgraph_parser.add_argument(dest='INPUT', type=str, nargs='+', help="Input ELR filepath(s). MUST be coordinate-sorted.") +bedgraph_parser.set_defaults(object='Bedgrapher') + +### bam_to_elr.py ### +bam_to_elr_parser = subparsers.add_parser('elr',help="Converts a BAM or SAM file to an End-Labeled Read (ELR) or BED12 file.", description=ELRdesc, formatter_class=ArgumentDefaultsHelpFormatter) +bam_to_elr_parser.add_argument("-o", "--output", dest='OUTPUT', type=str, default=None, help="Filepath to write end-labeled file.") +bam_to_elr_parser.add_argument("--data_type", dest='DATA_TYPE', default=None, type=str, help="Choose presets for certain end-labeled libraries (smartseq, pacbio, ont, direct_rna)") +bam_to_elr_parser.add_argument("--source", dest='SOURCE', default=None, type=str, help="Name the source of BAM/SAM reads.") +bam_to_elr_parser.add_argument("--genome", dest='GENOME', default=None, type=str, help="Genome FASTA file") +bam_to_elr_parser.add_argument('--reference', dest='REFERENCE', help="[GFF3/GTF] Path to reference annotation", type=str, default=None) +bam_to_elr_parser.add_argument("--splice", dest='SPLICE', default=None, type=str, help="Reference splice junction file (STAR SJ.out.tab, intron BED6)") +bam_to_elr_parser.add_argument("--chrom_names", dest='CHROM_NAMES', default=None, type=str, help="2-column TSV of chromosome ID -> chromosome name.") +bam_to_elr_parser.add_argument("--start_seq", dest='START_SEQ', default='ACATGGG', type=str, help="Sequence of the oligo that marks a 5' read (sense)") +bam_to_elr_parser.add_argument("--end_seq", dest='END_SEQ', default='RRRRRRRRRRRRRRRRRRRRRRRRRRRRRR', type=str, help="Sequence of the oligo that marks a 3' read (sense)") +bam_to_elr_parser.add_argument("--mismatch_rate", dest='MM_RATE', default=0.20, type=float, help="Mismatch tolerance of S label matches") +bam_to_elr_parser.add_argument("--stranded", dest='STRANDED', default=False, action="store_true", help="The reads are strand-specific") +bam_to_elr_parser.add_argument("--reverse", dest='REVERSE', default=False, action="store_true", help="Reads are oriented mate1-reverse") +bam_to_elr_parser.add_argument("-s", dest='START', default=False, action='store_true', help="Read 5' ends are transcript start sites.") +bam_to_elr_parser.add_argument("-c", dest='CAPPED', default=False, action='store_true', help="5' end data is capped.") +bam_to_elr_parser.add_argument("-e", dest='END', default=False, action='store_true', help="Read 3' ends are transcript end sites.") +bam_to_elr_parser.add_argument("--no_ends", dest='NO_ENDS', default=False, action='store_true', help="(overrides other options) Ignore all 5' and 3' end labels.") +bam_to_elr_parser.add_argument("--secondary", dest='SECONDARY', default=False, action='store_true', help="Keep secondary alignments.") +bam_to_elr_parser.add_argument("--header", dest='HEADER', type=str, default=None, help="Filepath to write ELR header.") +bam_to_elr_parser.add_argument("--record_artifacts", dest='RECORD_ARTIFACTS', default=False, action='store_true', help="Reports artifact-masked S/E labels as >/].") +bam_to_elr_parser.add_argument("--split", dest='SPLIT', default=False, action='store_true', help="Separate reads into different files by their multimapping number.") +bam_to_elr_parser.add_argument("--untrimmed", dest='UNTRIMMED', default=False, action='store_true', help="(overrides -s -c -e) End labels were not trimmed from input reads prior to alignment.") +bam_to_elr_parser.add_argument("--remove_noncanonical", dest='REMOVE_NONCANONICAL', default=False, action='store_true', help="Require canonical splice junction motifs (GT/AG, GC/AG, AT/AC).") +bam_to_elr_parser.add_argument("--sj_shift", dest='SJ_SHIFT', default=0, type=int, help="Shift up to this many bases to find a canonical splice junction") +bam_to_elr_parser.add_argument("--minlen_strict", dest='MINLEN_STRICT', default=18, type=int, help="Keep reads down to this length only if perfectly aligned.") +bam_to_elr_parser.add_argument("--minlen_loose", dest='MINLEN_LOOSE', default=25, type=int, help="Keep reads down to this length if they passed alignment parameters.") +bam_to_elr_parser.add_argument("--error_rate", dest='ERROR_RATE', default=0.10, type=float, help="Maximum allowed error rate (mismatches+indels) per exon.") +bam_to_elr_parser.add_argument("INPUT", type=str, default=None, help="Input BAM/SAM file") +bam_to_elr_parser.set_defaults(object='BAMtoELRconverter') + +### bed_to_elr.py ### +bed_to_elr_parser = subparsers.add_parser('bed-to-elr',help="Converts a BED file to an End-Labeled Read (ELR) file.", description=ELRdesc, formatter_class=ArgumentDefaultsHelpFormatter) +bed_to_elr_parser.add_argument("-o", "--output", dest='OUTPUT', type=str, required=True, help="Filepath to write ELR file.") +bed_to_elr_parser.add_argument("--chroms", dest='CHROMS', type=str, help="Filepath to a text file of chromosome names (1 per line).") +bed_to_elr_parser.add_argument("--header", dest='HEADER', type=str, default=None, help="Filepath to write ELR header.") +bed_to_elr_parser.add_argument("--source", dest='SOURCE', help="Source of BED lines.", default=None, type=str) +bed_to_elr_parser.add_argument("-j", dest='JUNCTIONS', default=False, action='store_true', help="Gaps in the reads are all splice junctions.") +bed_to_elr_parser.add_argument("-s", dest='START', default=False, action='store_true', help="All read 5' ends are transcript start sites.") +bed_to_elr_parser.add_argument("-c", dest='CAPPED', default=False, action='store_true', help="All 5' ends are capped.") +bed_to_elr_parser.add_argument("-e", dest='END', default=False, action='store_true', help="All read 3' ends are transcript end sites.") +bed_to_elr_parser.add_argument("INPUT", type=str, help='Input BED file') +bed_to_elr_parser.set_defaults(object='BEDtoELRconverter') + +### elr_combine.py ### +combine_parser = subparsers.add_parser('elr-combine',help="Makes one unified End-Labeled Read (ELR) file from multiple sorted files.", description=ELRdesc, formatter_class=ArgumentDefaultsHelpFormatter) +combine_parser.add_argument(dest='INPUT', help="Input sorted ELR files.", type=str, nargs='+') +combine_parser.add_argument("-o", "--output", dest='OUTPUT', type=str, default=None, required=True, help="Filepath to write BED file.") +combine_parser.add_argument("--temp", dest='TEMPDIR', type=str, default='_combinetmp', help="Prefix for temp files.") +combine_parser.set_defaults(object='ELRcombiner') + + +### elr_condense.py ### +condense_parser = subparsers.add_parser('condense',help="Partial assembly an end-labeled read (ELR) file. Outputs all loci (no filters) to a new sorted ELR.", formatter_class=ArgumentDefaultsHelpFormatter) +condense_parser.add_argument('-o','--output', dest='OUT', type=str, default=None, help="Destination file for assembly. File extension (bed, elr, gtf) determines output type.") +condense_parser.add_argument('--max_gap', dest='MAX_GAP', type=int, default=0, help="Largest gap size to tolerate (nucleotides).") +condense_parser.add_argument('--end_cluster', dest='END_CLUSTER', type=int, default=50, help="Largest distance between end-labeled reads to consider the same cluster (nucleotides).") +condense_parser.add_argument('--min_overhang', dest='MIN_OVERHANG', type=int, default=3, help="Smallest overhang to count for a read overlapping two exon fragments (number of nucleotides).") +condense_parser.add_argument('--min_cov', dest='MIN_COV', type=float, default=1, help="Minimum coverage filter to remove low-evidence transcript models.") +condense_parser.add_argument('--min_len', dest='MINLEN', type=int, default=20, help="Minimum output transcript length (nucleotides).") +condense_parser.add_argument('--min_intron_len', dest='MIN_INTRON_LEN', type=int, default=50, help="Minimum length for an intron (nucleotides)") +condense_parser.add_argument('--min_proportion', dest='MIN_PROPORTION', type=float, default=0.01, help="[float 0-1] Exclude ends, juctions, or transcripts that contribute < this proportion. (Used as a signal threshold)") +condense_parser.add_argument('--intron_filter', dest='INTRON_FILTER', type=float, default=0.15, help="[float 0-1] Retained introns must exceed this proportion the be considered.") +condense_parser.add_argument('--cap_bonus', dest='CAP_BONUS', type=float, default=5, help="[float] Signal multiplier for 5' reads with an inferred cap structure (uuG).") +condense_parser.add_argument('--cap_filter', dest='CAP_FILTER', type=float, default=.1, help="[float] Threshold percent uuG to count cluster as capped.") +condense_parser.add_argument("--starts", dest='STARTS', default=False, action='store_true', help="Sample is a Start Tag (5' end) file, e.g. CAGE") +condense_parser.add_argument("--ends", dest='ENDS', default=False, action='store_true', help="Sample is an End Tag (3' end) file, e.g. 3P-Seq") +condense_parser.add_argument("--sparse", dest='SPARSE', default=False, action='store_true', help="Sample is sparsely end-labeled, e.g. Smart-seq") +condense_parser.add_argument(dest='INPUT', type=str, help="Input single ELR filepath. MUST be coordinate-sorted.") +condense_parser.set_defaults(object='Condenser') + + +### elr_to_bed.py ### +elr_to_bed_parser = subparsers.add_parser('elr-to-bed',help="Converts an End-Labeled Read (ELR) file to BED12.", formatter_class=ArgumentDefaultsHelpFormatter) +elr_to_bed_parser.add_argument("-o", "--output", dest='OUTPUT', type=str, default=None, required=True, help="Filepath to write BED file.") +elr_to_bed_parser.add_argument("INPUT", help='Input ELR file') +elr_to_bed_parser.set_defaults(object='ELRtoBEDconverter') + +### fasta.py ### +fasta_parser = subparsers.add_parser('fasta',help="Writes a transcript FASTA file for each input feature.", formatter_class=ArgumentDefaultsHelpFormatter) +fasta_parser.add_argument("-o", "--output", dest='OUT', type=str, default='bookend.fasta', help="Filepath to write feature FASTA file.") +fasta_parser.add_argument('--genome', dest='GENOME', required=True, help="(required) Path to genome FASTA file.", default=None) +fasta_parser.add_argument('--allow_unstranded', dest='UNSTRANDED', default=False, action='store_true', help="Allow unstranded transcripts to be written to output (forward strand).") +fasta_parser.add_argument('--orf', dest='ORF', default=False, action='store_true', help="Report longest open reading frame.") +fasta_parser.add_argument('INPUT', type=str, help="[GFF3/GTF/ELR/BED] Path to feature file(s)", nargs='*') +fasta_parser.set_defaults(object='FastaWriter') + + +### fastq_end_label.py ### +end_label_parser = subparsers.add_parser('label',help="Trims and labels RNA 5' and 3' ends in a FASTQ file", formatter_class=ArgumentDefaultsHelpFormatter) +end_label_parser.add_argument('-S', '--start', dest='START', type=str, default='AAGCAGTGGTATCAACGCAGAGTACATGGG', help="Template switching primer, marks the RNA 5' terminus.") +end_label_parser.add_argument( '-E', '--end', dest='END', type=str, default='ACGCAGAGTACTTTTTTTTTTTTTTTTTTTT+', help="Reverse transcription primer, marks (reverse complement of) the RNA 3' terminus.") +end_label_parser.add_argument('--umi', dest='UMI', type=str, default="", choices=['S', 'E'], help="One of the end labels (S, E) contains a Unique Molecular Identifier (UMI).") +end_label_parser.add_argument('--strand', dest='STRAND', type=str, default='unstranded', choices=['forward','reverse','unstranded'], help="Orientation of mate1 with respect to the RNA strand") +end_label_parser.add_argument('--out1', dest='OUT1', type=str, default='label.1.fq', help="Destination file for trimmed and labeled mate 1 FASTQ file.") +end_label_parser.add_argument('--out2', dest='OUT2', type=str, default='label.2.fq', help="Destination file for trimmed and labeled mate 2 FASTQ file.") +end_label_parser.add_argument('--single_out', dest='SINGLE_OUT', type=str, default='label.single.fq', help="Destination file for reads that are only informative single-end.") +end_label_parser.add_argument('--min_start', dest='MIN_START', type=int, default=7, help="Minimum number of nucleotides that must match to the start adapter sequence.") +end_label_parser.add_argument('--min_end', dest='MIN_END', type=int, default=9, help="Minimum number of nucleotides that must match to the end adapter sequence.") +end_label_parser.add_argument('--verbose', dest='VERBOSE', default=False, action='store_true', help="Display each trimming result on stdout.") +end_label_parser.add_argument('--max_start', dest='MAX_START', type=int, default=120, help="Maximum number of nucleotides to trim for the start adapter sequence.") +end_label_parser.add_argument('--max_end', dest='MAX_END', type=int, default=120, help="Maximum number of nucleotides to trim for the end adapter sequence.") +end_label_parser.add_argument('--minlen', dest='MINLEN', type=int, default=18, help="Minimum sequence length to keep.") +end_label_parser.add_argument('--mismatch_rate', dest='MM_RATE', type=float, default=.06, help="Highest allow proportion of mismatches.") +end_label_parser.add_argument('--qualmask', dest='QUALMASK', type=float, default=16, help="Ignores any basecalls with phred score < this, treats base as N.") +end_label_parser.add_argument('--minqual', dest='MINQUAL', type=float, default=25, help="Suppresses any trimmed sequences with lower than this mean phred quality score.") +end_label_parser.add_argument('--discard_untrimmed', dest='DISCARD_UNTRIMMED', default=False, action='store_true', help="If no trimming occurred, do not write the read to output.") +end_label_parser.add_argument(dest='FASTQ', type=str, nargs='+', help="Input FASTQ file(s). 1 for single-end, 2 for paired-end") +end_label_parser.add_argument('--pseudomates', dest='PSEUDOMATES', default=False, action='store_true', help="Write single reads to --out1 with an artificial reverse complement mate pair in --out2 (overrides --single_out)") +end_label_parser.set_defaults(object='EndLabeler') + +### gtf_merge.py ### +# merge_parser = subparsers.add_parser('merge',help="Merges multiple assembly/annotation files into one consensus annotation", formatter_class=ArgumentDefaultsHelpFormatter) +# merge_parser.add_argument("-o", "--output", dest='OUT', type=str, default='bookend_merge.gtf', help="Filepath to write merged file.") +# merge_parser.add_argument("--fasta_out", dest='FASTA_OUT', help="Output FASTA file of spliced transcript sequences.", default=None, type=str) +# merge_parser.add_argument("--orf_out", dest='ORF_OUT', help="Output FASTA file of amino acid sequence for the longest ORF.", default=None, type=str) +# merge_parser.add_argument('--genome', dest='GENOME', help="Path to a FASTA file of the genome.", default=None) +# merge_parser.add_argument('-r', dest='REFERENCE', help="[GFF3/GTF] Path to reference annotation", type=str, default=None) +# merge_parser.add_argument('--refname', dest='REFNAME', help="Name of the reference source", type=str, default=None) +# merge_parser.add_argument('--gtf_parent', dest='GTF_PARENT', type=str, nargs='+', default=None, help="Line type(s) in GTF files for Parent object") +# merge_parser.add_argument('--gtf_child', dest='GTF_CHILD', type=str, nargs='+', default=None, help="Line type(s) in GTF files for Child object") +# merge_parser.add_argument('--gff_parent', dest='GFF_PARENT', type=str, nargs='+', default=None, help="Line type(s) in GFF3 files for Parent object") +# merge_parser.add_argument('--gff_child', dest='GFF_CHILD', type=str, nargs='+', default=None, help="Line type(s) in GFF3 files for Child object") +# merge_parser.add_argument('--ref_id_parent', dest='REF_ID_PARENT', type=str, nargs='+', default=None, help="Attribute name(s) in GTF/GFF3 files that stores the transcript name for Parent objects") +# merge_parser.add_argument('--ref_id_child', dest='REF_ID_CHILD', type=str, nargs='+', default=None, help="Attribute name(s) in GTF/GFF3 files that stores the transcript name for Parent objects") +# merge_parser.add_argument('--end_cluster', dest='END_CLUSTER', type=int, default=100, help="Largest distance between ends to consider in one cluster (number of nucleotides).") +# merge_parser.add_argument('--minlen', dest='MINLEN', type=int, default=50, help="Minimum transcript length of merged assemblies.") +# merge_parser.add_argument('--min_reps', dest='MIN_REPS', type=int, default=1, help="Number of times a transcript must be independently assembled (for multiple input files).") +# merge_parser.add_argument('--high_conf', dest='CONFIDENCE', type=float, default=0.5, help="[float 0-1] Assemblies present in >= this percent of input files cannot be discarded.") +# merge_parser.add_argument('--cap_percent', dest='CAP_PERCENT', type=float, default=0.05, help="[float 0-1] Discard 5' end features with < this percent of cap-labeled reads (reads that contain upstream untemplated G).") +# merge_parser.add_argument('--keep_truncations', dest='KEEP_TRUNCATIONS', default=False, action='store_true', help="Do not discard low-confidence assemblies contained in longer assemblies.") +# merge_parser.add_argument('--keep_fusions', dest='KEEP_FUSIONS', default=False, action='store_true', help="Do not discard low-confidence assemblies that bridge two adjacent loci.") +# merge_parser.add_argument('--verbose', dest='VERBOSE', default=False, action='store_true', help="Display a verbose summary of each locus in stdout.") +# merge_parser.add_argument('INPUT', type=str, help="[GFF3/GTF/ELR/BED] Path to assembly file(s)", nargs='*') +# merge_parser.set_defaults(object='AnnotationMerger') + + +### gtf_classify.py ### +classify_parser = subparsers.add_parser('classify',help="Classifies each transcript in an assembly against those in a reference annotation.", formatter_class=ArgumentDefaultsHelpFormatter) +classify_parser.add_argument("-i", "--input", dest="INPUT", type=str, nargs='+', help="Input assembly GTF/GFF3/BED12 file(s)") +classify_parser.add_argument("-o", "--output", dest='OUT', type=str, default='classify.tsv', help="Filepath to write output class file") +classify_parser.add_argument('--end_buffer', dest='END_BUFFER', type=int, default=100, help="Largest distance between ends to be considered the same (nucleotides).") +classify_parser.add_argument('-r', dest='REFERENCE', help="[GFF3/GTF] Path to reference annotation", type=str, default=None) +classify_parser.add_argument('--ref_parent', dest='GFF_PARENT', type=str, nargs='+', default=None, help="Line type(s) in reference that define the Parent object") +classify_parser.add_argument('--ref_child', dest='GFF_CHILD', type=str, nargs='+', default=None, help="Line type(s) in reference that define the Child object") +classify_parser.add_argument('--parent_attr_gene', dest='PARENT_ATTR_GENE', type=str, default=None, help="Gene attribute in Parent objects") +classify_parser.add_argument('--child_attr_gene', dest='CHILD_ATTR_GENE', type=str, default=None, help="Gene attribute in Child objects") +classify_parser.add_argument('--parent_attr_transcript', dest='PARENT_ATTR_TRANSCRIPT', type=str, nargs='+', default=None, help="Transcript attribute(s) in Parent objects") +classify_parser.add_argument('--child_attr_transcript', dest='CHILD_ATTR_TRANSCRIPT', type=str, nargs='+', default=None, help="Transcript attribute(s) in Child objects") +classify_parser.add_argument('--bed_gene_delim', dest='GENE_DELIM', type=str, default='.', help="(for BED12 references) String that splits gene name from transcript isoform.") +classify_parser.add_argument('--allow_unstranded', dest='UNSTRANDED', default=False, action='store_true', help="Allow unstranded transcripts to match overlapping transcripts.") +classify_parser.add_argument('--verbose', dest='VERBOSE', default=False, action='store_true', help="Display a verbose summary of each locus in stdout.") +classify_parser.set_defaults(object='AssemblyClassifier') + +### elr_quantify.py ### +quantify_parser = subparsers.add_parser('quantify',help="Quantifies the abundance of all annotated transcripts in each sample of the input ELR file(s).", formatter_class=ArgumentDefaultsHelpFormatter) +quantify_parser.add_argument("-i", "--input", dest="INPUT", type=str, nargs='+', help="Input assembly ELR/BAM file(s)") +quantify_parser.add_argument("-o", "--output", dest='OUT', type=str, default='quantify.tsv', help="Filepath to write output quantification file.") +quantify_parser.add_argument('-r', dest='REFERENCE', help="[GFF3/GTF/BED12] Path to reference annotation.", type=str, default=None, required=True) +quantify_parser.add_argument('-g', '--genome', dest='GENOME', help="[FASTA] Path to genome file.", type=str, default=None, required=False) +quantify_parser.add_argument('--ref_parent', dest='GFF_PARENT', type=str, nargs='+', default=None, help="Line type(s) in reference that define the Parent object") +quantify_parser.add_argument('--ref_child', dest='GFF_CHILD', type=str, nargs='+', default=None, help="Line type(s) in reference that define the Child object") +quantify_parser.add_argument('--parent_attr_gene', dest='PARENT_ATTR_GENE', type=str, default=None, help="Gene attribute in Parent objects") +quantify_parser.add_argument('--child_attr_gene', dest='CHILD_ATTR_GENE', type=str, default=None, help="Gene attribute in Child objects") +quantify_parser.add_argument('--parent_attr_transcript', dest='PARENT_ATTR_TRANSCRIPT', type=str, nargs='+', default=None, help="Transcript attribute(s) in Parent objects") +quantify_parser.add_argument('--child_attr_transcript', dest='CHILD_ATTR_TRANSCRIPT', type=str, nargs='+', default=None, help="Transcript attribute(s) in Child objects") +quantify_parser.add_argument('--bed_gene_delim', dest='GENE_DELIM', type=str, default='.', help="(for BED12 references) String that splits gene name from transcript isoform.") +quantify_parser.add_argument('--end_buffer', dest='END_BUFFER', type=int, default=100, help="Largest distance between ends to be considered the same (nucleotides).") +quantify_parser.add_argument('--max_gap', dest='MAX_GAP', type=int, default=100, help="Largest gap allowed to process as a single chunk (nucleotides).") +quantify_parser.add_argument("--stranded", dest='STRANDED', default=False, action="store_true", help="The reads are strand-specific") +quantify_parser.add_argument("--reverse", dest='REVERSE', default=False, action="store_true", help="Reads are oriented mate1-reverse") +quantify_parser.add_argument('--verbose', dest='VERBOSE', default=False, action='store_true', help="Display a verbose summary of each locus in stdout.") + +### sam_sj_out.py ### +sam_sj_parser = subparsers.add_parser('sam-to-sj',help="Generates a splice junction file (SJ.out.tab) from SAM.", formatter_class=ArgumentDefaultsHelpFormatter) +sam_sj_parser.add_argument("-F", "--fasta", dest='FASTA', help="Genome FASTA file", default=None, type=str, required=True) +sam_sj_parser.add_argument("--format", dest='FORMAT', help="Output file format", default='star', type=str, choices=['bed','star']) +sam_sj_parser.add_argument("--filter", dest='FILTER', help="Remove noncanonical splice junctions from the output", default=False, action='store_true') +sam_sj_parser.add_argument("INPUT", type=str, help="Input SAM file") +sam_sj_parser.set_defaults(object='SAMtoSJconverter') + +### sj_merge.py ### +sj_merge_parser = subparsers.add_parser('sj-merge', help="Combines multiple SJ.out.tab or SJ.bed files.", formatter_class=ArgumentDefaultsHelpFormatter) +sj_merge_parser.add_argument("-o", "--output", dest='OUT', type=str, default='sj_merge.out.tab', help="Filepath to write merged file.") +sj_merge_parser.add_argument("--format", dest='FORMAT', help="Output file format", default='star', type=str, choices=['bed','star']) +sj_merge_parser.add_argument("--min_unique", dest='MIN_UNIQUE', help="Filter SJs with fewer unique reads.", default=0, type=int) +sj_merge_parser.add_argument("--min_reps", dest='MIN_REPS', help="Filter SJs detected in fewer than this many files.", default=1, type=int) +sj_merge_parser.add_argument("--new", dest='NEW', help="Keep only SJs not present in the reference SJDB", default=False, action='store_true') +sj_merge_parser.add_argument("INPUT", nargs='+', default=[]) +sj_merge_parser.set_defaults(object='SJmerger') + +### sj_to_bed.py ### +sj_to_bed_parser = subparsers.add_parser('sj-to-bed', help="Converts SJ.out.tab file to an SJ.bed file.", formatter_class=ArgumentDefaultsHelpFormatter) +sj_to_bed_parser.add_argument("INPUT", type=str, help="Input SJ.out.tab file") +sj_to_bed_parser.add_argument("-o", "--output", dest='OUT', type=str, default='SJ.bed', help="Filepath to write SJ.bed file.") +sj_to_bed_parser.set_defaults(object='SJtoBEDconverter') + +### elr_sort.py ### +elr_sort_parser = subparsers.add_parser('elr-sort',help="Sorts an End-Labeled Read (ELR) file.", formatter_class=ArgumentDefaultsHelpFormatter) +elr_sort_parser.add_argument("-o", "--output", dest='OUT', help="Output file path (default: stdout)", default='stdout') +elr_sort_parser.add_argument("-f" ,"--force", dest='FORCE', help="Force overwrite of --output file if it exists.", default=False, action='store_true') +elr_sort_parser.add_argument("INPUT", type=str, help="Input ELR file") +elr_sort_parser.set_defaults(object='ELRsorter') + +### elr_subset.py ### +elr_subset_parser = subparsers.add_parser('elr-subset',help="Writes a subsetted region of an ELR file.", formatter_class=ArgumentDefaultsHelpFormatter) +elr_subset_parser.add_argument("-o", "--output", dest='OUT', help="Output file path (default: stdout)", default='stdout') +elr_subset_parser.add_argument("-f" ,"--force", dest='FORCE', help="Force overwrite of --output file if it exists.", default=False, action='store_true') +elr_subset_parser.add_argument("-r" ,"--region", dest='REGION', help="[chrom:start-end] Region to write to output", type=str, required=True) +elr_subset_parser.add_argument("INPUT", type=str, help="Input ELR file") +elr_subset_parser.set_defaults(object='ELRsubsetter') + + +### gtf_to_bed.py ### +gtf_to_bed_parser = subparsers.add_parser('gtf-to-bed',help="Converts a GTF/GFF3 annotation file to BED12.", formatter_class=ArgumentDefaultsHelpFormatter) +gtf_to_bed_parser.add_argument("INPUT", type=str, help="Input GTF/GFF3 file") +gtf_to_bed_parser.add_argument("-o", "--output", dest='OUT', help="Output file path (default: stdout)", default='stdout') +gtf_to_bed_parser.add_argument("-f" ,"--force", dest='FORCE', help="Force overwrite of --output file if it exists.", default=False, action='store_true') +gtf_to_bed_parser.add_argument("--source", dest='SOURCE', help="Source of GTF/GFF3 file (default: file name)", default=None, type=str) +gtf_to_bed_parser.add_argument("--name", dest='NAME_ATTR', help="Attribute to pass to the name column (default: transcript_id)", default='transcript_id', type=str) +gtf_to_bed_parser.add_argument("--score", dest='SCORE', help="Attribute to pass to score column (default: None)", default=None, type=str) +gtf_to_bed_parser.add_argument('--gtf_parent', dest='GTF_PARENT', type=str, nargs='+', default=None, help="Line type(s) in GTF files for Parent object (default: transcript)") +gtf_to_bed_parser.add_argument('--gtf_child', dest='GTF_CHILD', type=str, nargs='+', default=None, help="Line type(s) in GTF files for Child object (default: exon)") +gtf_to_bed_parser.add_argument('--gff_parent', dest='GFF_PARENT', type=str, nargs='+', default=None, help="Line type(s) in GFF3 files for Parent object (default: mRNA, transcript)") +gtf_to_bed_parser.add_argument('--gff_child', dest='GFF_CHILD', type=str, nargs='+', default=None, help="Line type(s) in GFF3 files for Child object (default: exon)") +gtf_to_bed_parser.add_argument('--parent_attr_gene', dest='PARENT_ATTR_GENE', type=str, default=None, help="Gene attribute in Parent objects (default: gene)") +gtf_to_bed_parser.add_argument('--child_attr_gene', dest='CHILD_ATTR_GENE', type=str, default=None, help="Gene attribute in Child objects (default: gene)") +gtf_to_bed_parser.add_argument('--parent_attr_transcript', dest='PARENT_ATTR_TRANSCRIPT', type=str, nargs='+', default=None, help="Transcript attribute(s) in Parent objects (default: transcript_id)") +gtf_to_bed_parser.add_argument('--child_attr_transcript', dest='CHILD_ATTR_TRANSCRIPT', type=str, nargs='+', default=None, help="Transcript attribute(s) in Child objects (default: transcript_id)") +gtf_to_bed_parser.add_argument('--color_key', dest='COLOR_KEY', type=str, default=None, help="Attribute name to lookup transcript type") +gtf_to_bed_parser.add_argument('--color_code', dest='COLOR_CODE', type=str, default=None, help="Tab-separated file of transcript type R,G,B colors (e.g. 'type\t255,255,255')") +gtf_to_bed_parser.add_argument("--extend", dest='EXTEND', help="Extend annotation to ends of Start and End clusters, if they exist.", default=False, action='store_true') +gtf_to_bed_parser.set_defaults(object='GTFconverter') + +### gtf_ends.py ### +gtf_ends_parser = subparsers.add_parser('gtf-ends',help="Writes a BED file containing the set of end features in an annotation (GTF/GFF3/BED12).", formatter_class=ArgumentDefaultsHelpFormatter) +gtf_ends_parser.add_argument("INPUT", type=str, help="Input GTF/GFF3 file") +gtf_ends_parser.add_argument("-o", "--output", dest='OUT', help="Output file path (default: stdout)", default='stdout') +gtf_ends_parser.add_argument("-f" ,"--force", dest='FORCE', help="Force overwrite of --output file if it exists.", default=False, action='store_true') +gtf_ends_parser.add_argument('-t','--type', dest='TYPE', choices=['all','S', 'E'], type=str, default='all', help="End type: Starts (S), Ends (E), or all") +gtf_ends_parser.add_argument("--extend", dest='EXTEND', type=int, help="Extend a fixed distance up and down from the peak position.", default=None) +gtf_ends_parser.add_argument("--name", dest='NAME_ATTR', help="Attribute to pass to the name column (default: transcript_id)", default='transcript_id', type=str) +gtf_ends_parser.add_argument("--score", dest='SCORE', help="Attribute to pass to score column (default: None)", default=None, type=str) +gtf_ends_parser.add_argument('--gtf_parent', dest='GTF_PARENT', type=str, nargs='+', default=None, help="Line type(s) in GTF files for Parent object (default: transcript)") +gtf_ends_parser.add_argument('--gtf_child', dest='GTF_CHILD', type=str, nargs='+', default=None, help="Line type(s) in GTF files for Child object (default: exon)") +gtf_ends_parser.add_argument('--gff_parent', dest='GFF_PARENT', type=str, nargs='+', default=None, help="Line type(s) in GFF3 files for Parent object (default: mRNA, transcript)") +gtf_ends_parser.add_argument('--gff_child', dest='GFF_CHILD', type=str, nargs='+', default=None, help="Line type(s) in GFF3 files for Child object (default: exon)") +gtf_ends_parser.add_argument('--parent_attr_gene', dest='PARENT_ATTR_GENE', type=str, default=None, help="Gene attribute in Parent objects (default: gene)") +gtf_ends_parser.add_argument('--child_attr_gene', dest='CHILD_ATTR_GENE', type=str, default=None, help="Gene attribute in Child objects (default: gene)") +gtf_ends_parser.add_argument('--parent_attr_transcript', dest='PARENT_ATTR_TRANSCRIPT', type=str, nargs='+', default=None, help="Transcript attribute(s) in Parent objects (default: transcript_id)") +gtf_ends_parser.add_argument('--child_attr_transcript', dest='CHILD_ATTR_TRANSCRIPT', type=str, nargs='+', default=None, help="Transcript attribute(s) in Child objects (default: transcript_id)") +gtf_ends_parser.set_defaults(object='GTFendwriter') + + +### elr_simulate.py ### +# simulate_parser = subparsers.add_parser('simulate',help="Simulates an ELR file from a ground truth of transcripts and abundances.") +# simulate_parser.add_argument("-o", "--output", dest='OUT', help="Output file path (default: stdout)", default='stdout') +# simulate_parser.add_argument('-r', '--reference', dest='REFERENCE', help="Reference annotation file (ELR/BED12/GTF/GFF3).", default=None, type=str) +# simulate_parser.add_argument('-a', '--abundance', dest='ABUNDANCE', help="Two-column table of [transcript ID]\t[relative abundance].", default=None, type=str) +# simulate_parser.add_argument("--count", dest='READ_COUNT', type=int, default=1000000, help="Number of reads to simulate.") +# simulate_parser.add_argument("--read_length", dest='READ_LENGTH', type=int, default=50, help="Sequencing read length for simulated reads.") +# simulate_parser.add_argument("--min_length", dest='MIN_LENGTH', type=int, default=20, help="Smallest length of genome-matching read to keep.") +# simulate_parser.add_argument("--adapter_5p", dest='ADAPTER_5P', type=int, default=30, help="Length of adapter on the 5' end of cDNA.") +# simulate_parser.add_argument("--adapter_3p", dest='ADAPTER_3P', type=int, default=55, help="Length of adapters on the 3' end of cDNA.") +# simulate_parser.add_argument("--paired", dest='PAIRED', default=False, action="store_true", help="If True, sequencing is paired-end.") +# simulate_parser.add_argument("--fragment_mean", dest='FRAGMENT_MEAN', type=float, default=200, help="Mean length of RNA fragments.") +# simulate_parser.add_argument("--fragment_sd", dest='FRAGMENT_SD', type=float, default=50, help="Standard deviation of RNA fragment length (gaussian).") +# simulate_parser.add_argument("--var_5p", dest='VAR_5P', type=float, default=0, help="Variation of 5P end positions (laplace scale parameter).") +# simulate_parser.add_argument("--var_3p", dest='VAR_3P', type=float, default=0, help="Variation of 3P end positions (laplace scale parameter).") +# simulate_parser.add_argument("--percent_intact", dest='PERCENT_INTACT', type=float, default=100, help="(0-100] Percent of transcripts that are full-length.") +# simulate_parser.add_argument("--percent_sense", dest='PERCENT_SENSE', type=float, default=50, help="[0-100] Percent of reads that are in sense to the RNA strand.") +# simulate_parser.add_argument("--label_noise", dest='LABEL_NOISE', type=float, default=0, help="[0-100] Percent of reads falsely labeled ends.") +# simulate_parser.add_argument("--seed", dest='SEED', type=int, default=0, help="Seed for random number generator.") +# simulate_parser.add_argument("--bed", dest='BED', default=False, action="store_true", help="If True, output in BED12 format.") +# simulate_parser.set_defaults(object='ELRsimulator') diff --git a/build/lib.linux-x86_64-3.7/bookend/core/assemble.py b/build/lib.linux-x86_64-3.7/bookend/core/assemble.py new file mode 100644 index 0000000..1eae56d --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/assemble.py @@ -0,0 +1,322 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +import time +import gzip +import pysam +from multiprocessing.dummy import Pool as ThreadPool +from bookend.core.cython_utils._rnaseq_utils import RNAseqDataset, read_generator, config_defaults +from bookend.core.cython_utils._assembly_utils import Locus +from bookend.core.elr_combine import ELRcombiner + +if __name__ == '__main__': + sys.path.append('../../bookend') + + +class Assembler: + def __init__(self, args): + """Parses input arguments for assembly""" + self.start_time = time.time() + self.output = args['OUT'] + self.source = args['SOURCE'] + self.cov_out = args['COV_OUT'] + self.incomplete = args['INCOMPLETE'] + self.max_gap = args['MAX_GAP'] + self.end_cluster = args['END_CLUSTER'] + self.min_overhang = args['MIN_OVERHANG'] + self.min_cov = args['MIN_COV'] + self.min_unstranded_cov = args['MIN_UNSTRANDED'] + self.min_start = args['MIN_S'] + self.min_end = args['MIN_E'] + self.min_intron_length = args['MIN_INTRON_LEN'] + self.intron_filter = args['INTRON_FILTER'] + self.truncation_filter = args['TRUNCATION_FILTER'] + self.min_proportion = args['MIN_PROPORTION'] + self.cap_bonus = args['CAP_BONUS'] + self.cap_filter = args['CAP_FILTER'] + self.minlen = args['MINLEN'] + self.verbose = args['VERBOSE'] + self.input = args['INPUT'] + self.ignore_labels = args['IGNORE_LABELS'] + self.ignore_sources = not args['USE_SOURCES'] + self.require_cap = args['REQUIRE_CAP'] + self.antisense_filter = 0.01 + config = config_defaults + if self.ignore_labels: + self.incomplete = True + + if self.incomplete: # Some settings are incompatible with writing incomplete transcripts. + self.min_start = 0 + self.min_end = 0 + + if len(self.input) == 1: + self.input = self.input[0] + if self.input_is_valid(self.input): + self.file_type = self.file_extension(self.input) + if self.file_type in ['bam','sam']: + save = pysam.set_verbosity(0) + self.input_file = pysam.AlignmentFile(self.input) + save = pysam.set_verbosity(save) + try: + longread = 'minimap' in self.input_file.header['PG'][0]['ID'] + except: + longread = False + + if longread: + print("WARNING: Detected long-read alignments. Setting defaults for unlabeled long-read cDNA.") + print("Read the Bookend User Guide for long-read analysis recommendations.") + long_defaults = { + 'source':'', + 's_tag':True, + 'e_tag':True, + 'labels_are_trimmed':False, + 'capped':False, + 'stranded':False, + 'reverse':False, + 'start_seq':None, + 'end_seq':None, + 'mismatch_rate':0.2, + 'error_rate':0.2, + 'min_reps':1, + 'cap_bonus':1, + 'sj_shift':2, + 'max_headclip':120, + 'gene_delim':'.', + 'remove_noncanonical':False, + 'secondary':False, + 'ignore_ends':False, + 'quality_filter':True, + 'reference':None, + 'sj':None, + } + config.update(long_defaults) + elif self.input_file.header.get("HD",{}).get("SO",'unsorted') != 'coordinate': + print("ERROR: BAM input reads must be sorted by coordinate.") + sys.exit(1) + + self.dataset = RNAseqDataset(chrom_array=self.input_file.header.references, config=config) + elif self.file_type == 'elr.gz': + self.dataset = RNAseqDataset() + self.input_file = gzip.open(self.input, 'rt') + else: + self.dataset = RNAseqDataset() + self.input_file = open(self.input, 'r') + else: + print("\nERROR: input file must be a valid format (BED, ELR, BAM, SAM).") + sys.exit(1) + elif len(self.input) > 1: # Interleave multiple input files for assembly + if not all([self.input_is_valid(filename, valid_formats=['elr','elr.gz']) for filename in self.input]): + print("\nERROR: Multi-input assembly can only be performed on position-sorted ELR files.") + sys.exit(1) + + self.dataset = RNAseqDataset() + self.file_type = 'elr' + combine_args = { + 'INPUT':self.input, + 'OUTPUT':'stdout', + 'TEMPDIR':'{}_combinetmp'.format(self.input[0]) + } + combiner = ELRcombiner(combine_args) + self.input_file = combiner.combine_files(combiner.input, combiner.output_file, iterator=True) + header = next(self.input_file) + self.dataset.chrom_array = combiner.dataset.chrom_array + self.dataset.source_array = combiner.dataset.source_array + self.dataset.chrom_dict = combiner.dataset.chrom_dict + self.dataset.source_dict = combiner.dataset.source_dict + else: + print("\nERROR: No input file(s) provided.") + sys.exit(1) + + self.complete = not self.incomplete + self.output_type = self.file_extension(self.output) + if self.output_type is None: + self.output_type = 'gtf' + + self.generator = read_generator(self.input_file, self.dataset, self.file_type, self.max_gap, 0) + self.chunk_counter = 0 + self.transcript_counter = 0 + self.output_file = open(self.output,'w') + + def output_transcripts(self, transcript, output_type): + """Writes the RNAseqMapping object 'transcript' to an output stream, + formatted as output_type.""" + if output_type == 'elr': + output_line = transcript.write_as_elr(endweights=True) + elif output_type == 'bed': + output_line = transcript.write_as_bed(self.dataset.chrom_array, ['bookend'], score_column='coverage') + elif output_type == 'gtf': + output_line = transcript.write_as_gtf(self.dataset.chrom_array, 'bookend') + + self.output_file.write(output_line+'\n') + + def process_entry(self, chunk): + STOP_AT=float('inf') + # STOP_AT=1000000 + if len(chunk) > 0: + chrom = chunk[0].chrom + self.chunk_counter += 1 + if self.verbose: + print("\nProcessing chunk {} ({}:{}-{}, {} reads)".format( + self.chunk_counter, + self.dataset.chrom_array[chrom], chunk[0].left(),chunk[-1].right(), + len(chunk) + ), end=" ") + + locus = Locus( + chrom=chrom, + chunk_number=self.chunk_counter, + list_of_reads=chunk, + max_gap=self.max_gap, + end_cluster=self.end_cluster, + min_overhang=self.min_overhang, + reduce=True, + minimum_proportion=self.min_proportion, + min_intron_length=self.min_intron_length, + antisense_filter=self.antisense_filter, + cap_bonus=self.cap_bonus, + cap_filter=self.cap_filter, + complete=False, + verbose=self.verbose, + naive=self.ignore_sources, + intron_filter=self.intron_filter, + splittable=True, + ignore_ends=self.ignore_labels, + allow_incomplete=self.incomplete, + require_cap=self.require_cap, + min_start=self.min_start, + min_end=self.min_end, + assemble=True, + truncation_filter=self.truncation_filter, + ) + self.chunk_counter = locus.chunk_number + total_bases = locus.bases + transcripts_written = 0 + if total_bases > 0: + bases_used = 0 + if self.verbose: + print('\n[{}:{}-{}] '.format(self.dataset.chrom_array[chrom], chunk[0].left(),chunk[-1].right()), end=" ") + + for transcript in locus.transcripts: + if self.passes_all_checks(transcript): + self.output_transcripts(transcript, self.output_type) + if self.cov_out: + if self.ignore_sources: + self.covfile.write('{}\t{}\n'.format(transcript.attributes['transcript_id'], round(transcript.coverage, 1))) + else: + source_cov = [0.]*len(self.dataset.source_array) + for k,v in locus.assembly_source_cov[transcript.attributes['transcript_id']].items(): + source_cov[k] = v + + self.covfile.write('{}\t{}\n'.format(transcript.attributes['transcript_id'], '\t'.join([str(round(v,1)) for v in source_cov]))) + + bases_used += transcript.attributes['bases'] + transcripts_written += 1 + + if self.verbose: + print('{} transcripts from {}/{} bases ({}%)'.format( + transcripts_written, round(bases_used,1), round(total_bases,1), round(bases_used/total_bases*100,2)), end=" ") + + if chunk[0].left() >= STOP_AT: + sys.exit() + + self.transcript_counter += transcripts_written + + del locus + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend assemble |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file (-o): {}\n".format(self.output) + options_string += " Source name (--source): {}\n".format(self.source) + options_string += " *** Experiment parameters ***\n" + options_string += " Max allowed gap in coverage (--max_gap): {}\n".format(self.max_gap) + options_string += " Max end cluster distance (--end_cluster): {}\n".format(self.end_cluster) + options_string += " Min spanning bases (--min_overhang): {}\n".format(self.min_overhang) + options_string += " Split read sources (--use_sources): {}\n".format(not self.ignore_sources) + options_string += " Ignore end labels (--ignore_labels): {}\n".format(self.ignore_labels) + options_string += " *** Filters ***\n" + options_string += " Min bp transcript length (--min_len): {}\n".format(self.minlen) + options_string += " Min isoform coverage (--min_cov): {}\n".format(self.min_cov) + options_string += " Min unstranded coverage (--min_unstranded_cov): {}\n".format(self.min_unstranded_cov) + options_string += " Min isoform contribution (--min_proportion): {}\n".format(self.min_proportion) + options_string += " Min retained intron proportion (--intron_filter): {}\n".format(self.intron_filter) + options_string += " Min number of Start Tags (--min_start): {}\n".format(self.min_start) + options_string += " Min number of End Tags (--min_end): {}\n".format(self.min_end) + options_string += " Min percent 5' end reads w/ uuG (--cap_filter): {}\n".format(self.cap_filter) + options_string += " Score multiplier for Cap Tags (--cap_bonus): {}\n".format(self.cap_bonus) + options_string += " Keep fragmented assemblies (--allow_incomplete): {}\n".format(self.incomplete) + return options_string + + def display_summary(self): + summary = '' + summary += '\nTotal elapsed time: {}'.format(round(self.end_time - self.start_time, 5)) + summary += '\n{} assembled transcripts written to {}'.format(self.transcript_counter, self.output) + return summary + + def file_extension(self, filename): + """Boolean if the file's extension is valid (BED, ELR)""" + split_name = filename.split('.') + if len(split_name) == 1: + return None + elif split_name[-1].lower() == 'gz': + return '.'.join([n.lower() for n in split_name[-2:]]) + else: + return split_name[-1].lower() + + def input_is_valid(self, filename, valid_formats=['bed','elr','bam','sam','gtf','gff3','gff','elr.gz']): + """Boolean if the file is a format that Assembler can parse.""" + if self.file_extension(filename) in valid_formats: + return True + else: + return False + + def passes_all_checks(self, transcript): + """Determines if a transcript model passes the collection + of filters set by the commandline arguments. + 'transcript' is an RNAseqMapping object, + see _rnaseq_utils.pyx for details. + """ + if transcript.coverage < self.min_cov: return False + if not self.incomplete and not transcript.complete: return False + if transcript.attributes['length'] < self.minlen: return False + if transcript.attributes.get('S.reads',0) < self.min_start: return False + if transcript.attributes.get('E.reads',0) < self.min_end: return False + # if not args.INCOMPLETE and True not in transcript.splice and transcript.attributes['S.capped']/transcript.attributes['S.reads'] < args.CAP_PERCENT: return False + if transcript.strand == 0 and transcript.coverage < self.min_unstranded_cov: return False + return True + + def run(self): + """Executes end labeling on all reads.""" + if self.output != 'stdout': + print(self.display_options()) + + if self.cov_out: + self.covfile=open(self.cov_out, 'w') + + if self.output_type != 'gtf': + self.output_file.write('\n'.join(self.dataset.dump_header())+'\n') + + if self.cov_out: + if not self.ignore_sources: + self.covfile.write('{}\n'.format('\t'.join(self.dataset.source_array))) + + for chunk in self.generator: + self.process_entry(chunk) + + if len(self.input) == 1: + self.output_file.close() + + if self.cov_out: + self.covfile.close() + + self.end_time = time.time() + print(self.display_summary()) + +if __name__ == '__main__': + from argument_parsers import assemble_parser as parser + args = vars(parser.parse_args()) + obj = Assembler(args) + sys.exit(obj.run()) + diff --git a/build/lib.linux-x86_64-3.7/bookend/core/bam_to_elr.py b/build/lib.linux-x86_64-3.7/bookend/core/bam_to_elr.py new file mode 100644 index 0000000..6f468f2 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/bam_to_elr.py @@ -0,0 +1,340 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +from distutils import extension +import sys +import os +if __name__ == '__main__': + sys.path.append('../../bookend') + +from bookend.core.cython_utils._rnaseq_utils import RNAseqDataset +import pysam +from bookend.core.elr_sort import ELRsorter +from bookend.core.elr_to_bed import ELRtoBEDconverter + +class BAMtoELRconverter: + def __init__(self, args): + """Parses input arguments for converting BAM to ELR""" + self.source = args['SOURCE'] + self.genome = args['GENOME'] + self.reference = args['REFERENCE'] + self.splice = args['SPLICE'] + self.chrom_names = args['CHROM_NAMES'] + self.data_type = args['DATA_TYPE'] + self.stranded = args['STRANDED'] + self.reverse = args['REVERSE'] + self.stranded = self.stranded or self.reverse + self.header = args['HEADER'] + self.start = args['START'] + self.capped = args['CAPPED'] + self.end = args['END'] + self.no_ends = args['NO_ENDS'] + self.secondary = args['SECONDARY'] + self.output = args['OUTPUT'] + self.start_seq = args['START_SEQ'] + self.end_seq = args['END_SEQ'] + self.untrimmed = args['UNTRIMMED'] + self.record_artifacts = args['RECORD_ARTIFACTS'] + self.mismatch_rate = args['MM_RATE'] + self.sj_shift = args['SJ_SHIFT'] + self.minlen_strict = args['MINLEN_STRICT'] + self.minlen_loose = args['MINLEN_LOOSE'] + self.input = args['INPUT'] + self.error_rate = args['ERROR_RATE'] + self.remove_noncanonical = args['REMOVE_NONCANONICAL'] + if self.start or self.end or self.capped: + self.stranded = True + + self.ext = 'elr' + if self.output is None: + self.output = '{}.{}'.format(self.input,self.ext) + elif '.' in self.output: + self.ext = self.output.split('.')[-1] + else: + self.output = '{}.{}'.format(self.output,self.ext) + + if self.start_seq.lower == 'none': + self.start_seq = '' + + if self.end_seq.lower == 'none': + self.end_seq = '' + + if self.input.split('.')[-1].lower() not in ['bam','sam']: + print("\nERROR: input file must be BAM/SAM format.") + sys.exit(1) + + if self.output.split('.')[-1].lower() not in ['elr','bed', 'bed12']: + print("\nERROR: output file must be ELR or BED format.") + sys.exit(1) + + self.output_dict = {} + self.tempout = '_unsorted.'+self.output + self.tempout_file = open(self.tempout, 'w') + if self.ext.lower() in ['bed','bed12']: + self.output_format = 'bed' + else: + self.output_format = 'elr' + + self.config_dict = { + 'source':self.source, + 's_tag':self.start, + 'e_tag':self.end, + 'capped':self.capped, + 'stranded':self.stranded, + 'reverse':self.reverse, + 'start_seq':self.start_seq, + 'end_seq':self.end_seq, + 'minlen_strict':self.minlen_strict, + 'minlen_loose':self.minlen_loose, + 'mismatch_rate':self.mismatch_rate, + 'sj_shift':self.sj_shift, + 'remove_noncanonical':self.remove_noncanonical, + 'labels_are_trimmed':not self.untrimmed, + 'quality_filter':True, + 'reference':self.reference, + 'sj':self.splice, + } + if self.no_ends: + self.config_dict['s_tag'] = False + self.config_dict['e_tag'] = False + self.config_dict['capped'] = False + self.config_dict['start_seq'] = '' + self.config_dict['end_seq'] = '' + + if self.data_type is not None: + if self.data_type.upper() in ['ONT','NANOPORE','OXFORD']: + """Reads are from Oxford Nanopore cDNA or PCR-cDNA kits, trimmed and oriented by bookend label or pychopper.""" + self.config_dict['stranded'] = True + self.config_dict['max_headclip'] = 10 + if self.untrimmed: + self.config_dict['max_headclip'] = 120 + self.config_dict['stranded'] = False + self.config_dict['s_tag'] = True + self.config_dict['e_tag'] = True + elif self.data_type.upper() in ['PACBIO', 'ISOSEQ', 'ISOSEQ3', 'FLNC']: + """Reads are PacBio FLNCs, downstream of lima.""" + self.config_dict['max_headclip'] = 4 + self.config_dict['s_tag'] = True + self.config_dict['e_tag'] = True + self.config_dict['quality_filter'] = True + elif self.data_type.upper() in ['ONT-RNA','ONT_RNA','DIRECT_RNA', 'DIRECT-RNA']: + """Reads are from Oxford Nanopore direct RNA kit, downstream of basecalling.""" + self.config_dict['stranded'] = True + self.config_dict['labels_are_trimmed'] = False + self.config_dict['quality_filter'] = True + elif self.data_type.strip('0123456789').upper() in ['SMART','SMARTER','SMARTSEQ','SMART-SEQ']: + """Reads are from a SMART protocol, labeled by bookend label.""" + self.config_dict['stranded'] = False + self.config_dict['labels_are_trimmed'] = True + self.config_dict['quality_filter'] = True + else: + print("\nERROR: --data_type not recognized.") + print("Currently supported: ONT, PACBIO, DIRECT_RNA, SMARTSEQ") + sys.exit(1) + + save = pysam.set_verbosity(0) + self.bam_in = pysam.AlignmentFile(self.input) + save = pysam.set_verbosity(save) + if self.source is None: + self.source = self.bam_in.header['PG'][0]['ID'] + + if self.bam_in.header.get("HD",{}).get("SO",'unsorted') == 'coordinate': + print("WARNING: BAM sorted by coordinate. Mate pairs will not be merged.") + print("Sort by read name (samtools sort -n) if using paired-end reads.") + + self.dataset = RNAseqDataset( + chrom_array=self.bam_in.header.references, + chrom_lengths=list(self.bam_in.header.lengths), + source_array=[self.source], + config=self.config_dict, + genome_fasta=self.genome + ) + if self.chrom_names is not None: + # Swap chromosome names for the given 2-column TSV + chromdict = {l.split('\t')[0]:l.rstrip().split('\t')[1] for l in open(self.chrom_names,'r')} + chromdictrev = {v:k for k,v in chromdict.items()} + for i in range(len(self.dataset.chrom_array)): + c = self.dataset.chrom_array[i] + if c in chromdict.keys(): + self.dataset.genome[chromdict[c]] = self.dataset.genome[c] + self.dataset.chrom_array[i] = chromdict[c] + elif c in chromdictrev.keys(): + self.dataset.chrom_array[i] = chromdictrev[c] + self.dataset.genome[chromdictrev[c]] = self.dataset.genome[c] + + self.sort_args = { + 'OUT':self.output, + 'FORCE':True, + 'INPUT':self.tempout + } + if self.output_format == 'bed': + self.sort_args['OUT'] += '.elr' + + self.failures = [] + self.generator = self.generate_bam_entries() + + def generate_bam_entries(self): + """Group all BAM lines with the same read ID + and yield them as a list of pysam objects""" + current_ID = None + bam_lines = [] + for line in self.bam_in: + ID = line.query_name + if ID == current_ID or current_ID is None: + bam_lines.append(line) + current_ID = ID + else: + yield bam_lines + bam_lines = [line] + current_ID = ID + + yield bam_lines + + def output_lines(self, lines, output): + """Takes a list of bed lines and writes + them to the output stream. + """ + if output == 'stdout': + for output_string in lines: + print(output_string) + else: + output.write('\n'.join(lines)+'\n') + + def write_elr(self, output): + out_strings = [mapping.write_as_elr(record_artifacts=self.record_artifacts).rstrip() for mapping in self.dataset.read_list] + self.output_lines(out_strings, output) + + def process_entry(self, bam_lines): + self.dataset.read_list = [] + # self.dataset.add_read_from_BAM(bam_lines, ignore_ends=self.no_ends, secondary=self.secondary, error_rate=self.error_rate) + self.dataset.add_read_from_BAM(bam_lines) + if len(self.dataset.read_list) > 0: + self.write_elr(self.tempout_file) + else: + self.failures += bam_lines + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend elr |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Reference genome file: {}\n".format(self.genome) + options_string += " Reference splice junction file: {}\n".format(self.splice) + options_string += " Output file (-o): {}\n".format(self.output) + options_string += " *** Experiment parameters ***\n" + options_string += " Reads start at RNA 5' ends (-s): {}\n".format(self.start) + options_string += " Reads are from capped RNA (-c): {}\n".format(self.capped) + options_string += " Reads end at RNA 3' ends (-e): {}\n".format(self.end) + options_string += " Untrimmed input reads (--untrimmed) {}\n".format(self.untrimmed) + options_string += " Strand specific (--stranded): {}\n".format(self.stranded) + options_string += " Strand specific reverse (--reverse): {}\n".format(self.reverse) + options_string += " Start tag suffix (--start_seq): {}\n".format(self.start_seq) + options_string += " End tag prefix (--end_seq): {}\n".format(self.end_seq) + options_string += " Adjust splice sites (--sj_shift): {}\n".format(self.sj_shift) + options_string += " *** Filters ***\n" + options_string += " --record_artifacts: {}\n".format(self.record_artifacts) + options_string += " --mismatch_rate: {}\n".format(self.mismatch_rate) + options_string += " --remove_noncanonical: {}\n".format(self.remove_noncanonical) + options_string += " Perfect minlen (--minlen_strict): {}\n".format(self.minlen_strict) + options_string += " Relaxed minlen (--minlen_loose): {}\n".format(self.minlen_loose) + options_string += " Secondary alignments (--secondary): {}\n".format(self.secondary) + + if not self.genome: + options_string += "\nWARNING: cap detection and artifact masking can only be done if a reference genome is provided." + options_string += "\nProvide a genome fasta with --genome /path/to/fasta" + if self.remove_noncanonical: + options_string += "\nWARNING: noncanonical splice junctions can only be detected if --genome is provided." + + if not self.splice and not self.reference and self.sj_shift: + options_string += "\nWARNING: splice junction correction can only be performed with a splice junction reference file." + options_string += "\nProvide a BED12/GTF/GFF junction file with --reference /path/to/reference" + options_string += "\nor a STAR/BED6 intron file with --splice /path/to/introns." + + return options_string + + def display_summary(self): + if self.record_artifacts: + # summary = 'len\tS\ts\tE\te\n' + # max_len = max([ + # max(self.dataset.label_tally['S']) if len(self.dataset.label_tally['S']) else 0, + # max(self.dataset.label_tally['s']) if len(self.dataset.label_tally['s']) else 0, + # max(self.dataset.label_tally['E']) if len(self.dataset.label_tally['E']) else 0, + # max(self.dataset.label_tally['e']) if len(self.dataset.label_tally['e']) else 0 + # ]) + # for i in range(max_len+1): + # summary += '{}\t{}\t{}\t{}\t{}\n'.format( + # i, + # self.dataset.label_tally['S'][i], + # self.dataset.label_tally['s'][i], + # self.dataset.label_tally['E'][i], + # self.dataset.label_tally['e'][i] + # ) + + summary = 'Total\t{}\t{}\t{}\t{}\n'.format( + sum(self.dataset.label_tally['S'].values()), + sum(self.dataset.label_tally['s'].values()), + sum(self.dataset.label_tally['E'].values()), + sum(self.dataset.label_tally['e'].values()) + ) + else: + # summary = 'len\tS\tE\n' + # max_len = max([ + # max(self.dataset.label_tally['S']) if len(self.dataset.label_tally['S']) else 0, + # max(self.dataset.label_tally['E']) if len(self.dataset.label_tally['E']) else 0 + # ]) + # for i in range(max_len+1): + # summary += '{}\t{}\t{}\n'.format( + # i, + # self.dataset.label_tally['S'][i], + # self.dataset.label_tally['E'][i] + # ) + + summary = 'Total\t{}\t{}\n'.format( + sum(self.dataset.label_tally['S'].values()), + sum(self.dataset.label_tally['E'].values()) + ) + + + return summary + + def run(self): + """Executes end labeling on all reads.""" + if self.output != 'stdout': + print(self.display_options()) + + self.output_lines(self.dataset.dump_header(),self.tempout_file) + for entry in self.generator: + self.process_entry(entry) + + self.tempout_file.close() + Sorter = ELRsorter(self.sort_args) + Sorter.run() + os.remove(self.tempout) + if self.output_format == 'bed': + convert_args = { + 'INPUT':self.sort_args['OUT'], + 'HEADER':None, + 'OUTPUT':self.output + } + Converter = ELRtoBEDconverter(convert_args) + print('Converting to BED...') + Converter.run() + os.remove(self.sort_args['OUT']) + + print(self.display_summary()) + + + +if __name__ == '__main__': + from argument_parsers import bam_to_elr_parser as parser + args = vars(parser.parse_args()) + obj = BAMtoELRconverter(args) + sys.exit(obj.run()) + + # TESTING # + # import cProfile + # import pstats + # profile = cProfile.Profile() + # profile.runcall(obj.run) + # ps = pstats.Stats(profile) + # ps.print_stats() + diff --git a/build/lib.linux-x86_64-3.7/bookend/core/bed_to_elr.py b/build/lib.linux-x86_64-3.7/bookend/core/bed_to_elr.py new file mode 100644 index 0000000..b964133 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/bed_to_elr.py @@ -0,0 +1,138 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +from bookend.core.cython_utils._rnaseq_utils import RNAseqDataset +if __name__ == '__main__': + sys.path.append('../../bookend') + from argument_parsers import bed_to_elr_parser as parser + +class BEDtoELRconverter: + def __init__(self, args): + """Converts each line of BED-formatted input to ELR""" + self.input = args['INPUT'] + self.chrom_file = args['CHROMS'] + self.output = args['OUTPUT'] + self.header = args['HEADER'] + self.source = args['SOURCE'] + self.junctions = args['JUNCTIONS'] + self.start = args['START'] + self.capped = args['CAPPED'] + self.end = args['END'] + if self.output == 'stdout': + self.output_file = 'stdout' + else: + self.output_file = open(self.output, 'w') + + if self.header is None: + self.header_file = self.output_file + else: + self.header_file = open(self.header, 'w') + + if self.source: + source_array = [self.source] + else: + source_array = None + + self.chrom_array = None + if self.chrom_file: + self.chrom_array = [l.strip() for l in open(self.chrom_file, 'r')] + + self.linecount = 0 + self.readcount = 0 + self.dataset = RNAseqDataset(source_array=source_array, chrom_array=self.chrom_array) + + def process_input(self): + """Yield ELR lines from each line of a BED input.""" + current_source_index = self.dataset.source_index + current_chrom_index = self.dataset.chrom_index + + if current_chrom_index > 0: # Header already exists + for i,c in enumerate(self.dataset.chrom_array): + self.output_line('#C {} {}'.format(i,c), self.header_file) + + if current_source_index > 0: + for i,s in enumerate(self.dataset.source_array): + self.output_line('#S {} {}'.format(i,s), self.header_file) + + + bed_in = open(self.input, 'r') + + for bed_line in bed_in: + if bed_line[0] == '#': # A header is being passed from the BED file + header_line = bed_line.rstrip().split(' ') + if header_line[0] == '#S': + self.dataset.add_source(header_line[-1]) + if header_line[0] == '#C': + self.dataset.add_chrom(header_line[-1]) + + self.output_line(bed_line.rstrip(), self.header_file) + continue + + current_chrom_index = self.dataset.chrom_index + current_source_index = self.dataset.source_index + self.dataset.add_read_from_BED(bed_line, source_string=self.source, s_tag=self.start, e_tag=self.end, capped=self.capped, gaps_are_junctions=self.junctions) + self.linecount += 1 + self.readcount += self.dataset.read_list[-1].weight + if self.dataset.chrom_index > current_chrom_index: # A new chromosome was encountered + self.output_line('#C {} {}'.format(len(self.dataset.chrom_array)-1, self.dataset.chrom_array[-1]), self.header_file) + current_chrom_index = self.dataset.chrom_index + + if self.dataset.source_index > current_source_index: # A new source was encountered + self.output_line('#S {} {}'.format(len(self.dataset.source_array)-1, self.dataset.source_array[-1]), self.header_file) + current_source_index = self.dataset.source_index + + while len(self.dataset.read_list) > 0: + out_line = self.dataset.pop_read() + self.output_line(out_line, self.output_file) + + if self.output != 'stdout': + self.output_file.close() + + if self.header_file != self.output_file and self.header_file != 'stdout': + self.header_file.close() + + def output_line(self, line, output_file): + """Takes a list of bed lines and writes + them to the output stream. + """ + if output_file == 'stdout': + print(line) + else: + output_file.write('{}\n'.format(line.rstrip())) + + def run(self): + print(self.display_options()) + if not self.input.split('.')[-1].lower() in ['bed','bed12']: + print("ERROR: input must be in the BED12 format (.bed, .bed12)") + return 1 + + self.process_input() + print(self.display_summary()) + return 0 + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend bed-to-elr |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file: {}\n".format(self.output) + options_string += " Header output: {}\n".format(self.header) + options_string += " Output source: {}\n".format(self.source) + options_string += " *** Parameters ***\n" + options_string += " All gaps are junctions (-j): {}\n".format(self.junctions) + options_string += " All 5' ends are starts (-s): {}\n".format(self.start) + options_string += " All 5' ends are capped (-c): {}\n".format(self.capped) + options_string += " All 3' ends are polyA (-e): {}\n".format(self.end) + return options_string + + def display_summary(self): + summary_string = '' + summary_string += 'Processed {} lines ({} total reads).\n'.format(self.linecount, round(self.readcount,2)) + return summary_string + + +if __name__ == '__main__': + args = vars(parser.parse_args()) + obj = BEDtoELRconverter(args) + sys.exit(obj.run()) + diff --git a/build/lib.linux-x86_64-3.7/bookend/core/bedgraph.py b/build/lib.linux-x86_64-3.7/bookend/core/bedgraph.py new file mode 100644 index 0000000..0cefc62 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/bedgraph.py @@ -0,0 +1,140 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +import time +import gzip +from pysam import AlignmentFile +import bookend.core.cython_utils._rnaseq_utils as ru +from bookend.core.elr_combine import ELRcombiner + +if __name__ == '__main__': + sys.path.append('../../bookend') + + +class Bedgrapher: + def __init__(self, args): + """Parses input arguments for assembly""" + self.start_time = time.time() + self.type = args['TYPE'].upper() + self.strand = args['STRAND'] + self.intstrand = {'.':0,'+':1,'-':-1}[self.strand] + self.output = args['OUT'] + self.input = args['INPUT'] + # self.scale = args['SCALE'] + if len(self.input) == 1: + self.input = self.input[0] + if self.input_is_valid(self.input): + self.file_type = self.file_extension(self.input) + if self.file_type in ['bam','sam']: + try: + self.input_file = AlignmentFile(self.input) + except: + print("ERROR: BAM/SAM input must be position-sorted and indexed.") + sys.exit(1) + + self.dataset = ru.RNAseqDataset(chrom_array=self.input_file.header.references) + elif self.file_type == 'elr.gz': + self.dataset = ru.RNAseqDataset() + self.input_file = gzip.open(self.input, 'rt') + else: + self.dataset = ru.RNAseqDataset() + self.input_file = open(self.input,'r') + else: + print("\nERROR: input file must be a valid format (BED, ELR, BAM, SAM).") + sys.exit(1) + elif len(self.input) > 1: # Interleave multiple input files for assembly + if not all([self.input_is_valid(filename, valid_formats=['elr','elr.gz']) for filename in self.input]): + print("\nERROR: Multi-input assembly can only be performed on position-sorted ELR files.") + sys.exit(1) + + self.dataset = ru.RNAseqDataset() + self.file_type = 'elr' + combine_args = { + 'INPUT':self.input, + 'OUTPUT':'stdout', + 'TEMPDIR':'{}_combinetmp'.format(self.input[0]) + } + combiner = ELRcombiner(combine_args) + self.input_file = combiner.combine_files(combiner.input, combiner.output_file, iterator=True) + else: + print("\nERROR: No input file(s) provided.") + sys.exit(1) + + self.generator = ru.read_generator(self.input_file, self.dataset, self.file_type, 0, 0) + self.chunk_counter = 0 + self.output_file = open(self.output,'w') + + def process_entry(self, chunk): + if len(chunk) > 0: + chrom = self.dataset.chrom_array[chunk[0].chrom] + self.chunk_counter += 1 + leftmost, rightmost = ru.range_of_reads(chunk) + depth_matrix, J_plus, J_minus = ru.build_depth_matrix(leftmost, rightmost, tuple(chunk), use_attributes=True, splice=True) + self.output_file.write(ru.bedgraph(chrom, leftmost, depth_matrix, self.type, self.intstrand)) + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend bedgraph |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file (-o): {}\n".format(self.output) + options_string += " *** Experiment parameters ***\n" + options_string += " Bedgraph read type filter (--type): {}\n".format(self.type) + options_string += " Bedgraph output strand filter (--strand): {}\n".format(self.strand) + return options_string + + def display_summary(self): + summary = '' + return summary + + def file_extension(self, filename): + """Boolean if the file's extension is valid (BED, ELR)""" + split_name = filename.split('.') + if len(split_name) == 1: + return None + elif split_name[-1].lower() == 'gz': + return '.'.join([n.lower() for n in split_name[-2:]]) + else: + return split_name[-1].lower() + + def input_is_valid(self, filename, valid_formats=['bed','elr','bam','sam','gtf','gff3','gff','elr.gz']): + """Boolean if the file is a format that Assembler can parse.""" + if self.file_extension(filename) in valid_formats: + return True + else: + return False + + def filter_readtypes(self, chunk): + """Given the output label type, filter the chunk for only those reads.""" + if self.type in ['','COV']: + return chunk + elif self.type == '5P': + return [read for read in chunk if read.s_tag] + elif self.type == 'S': + return [read for read in chunk if read.s_tag and not read.capped] + elif self.type == 'C': + return [read for read in chunk if read.capped] + elif self.type in ['3P','E']: + return [read for read in chunk if read.e_tag] + + def run(self): + """Executes end labeling on all reads.""" + if self.output != 'stdout': + print(self.display_options()) + + for chunk in self.generator: + chunk = self.filter_readtypes(chunk) + self.process_entry(chunk) + + if len(self.input) == 1: + self.output_file.close() + + self.end_time = time.time() + print(self.display_summary()) + +if __name__ == '__main__': + from argument_parsers import assemble_parser as parser + args = vars(parser.parse_args()) + obj = Bedgrapher(args) + sys.exit(obj.run()) + diff --git a/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_assembly_utils.cpython-37m-x86_64-linux-gnu.so b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_assembly_utils.cpython-37m-x86_64-linux-gnu.so new file mode 100644 index 0000000..28c8aa8 Binary files /dev/null and b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_assembly_utils.cpython-37m-x86_64-linux-gnu.so differ diff --git a/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_element_graph.cpython-37m-x86_64-linux-gnu.so b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_element_graph.cpython-37m-x86_64-linux-gnu.so new file mode 100644 index 0000000..b0f8656 Binary files /dev/null and b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_element_graph.cpython-37m-x86_64-linux-gnu.so differ diff --git a/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_fasta_utils.cpython-37m-x86_64-linux-gnu.so b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_fasta_utils.cpython-37m-x86_64-linux-gnu.so new file mode 100644 index 0000000..4eb5447 Binary files /dev/null and b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_fasta_utils.cpython-37m-x86_64-linux-gnu.so differ diff --git a/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_pq.cpython-37m-x86_64-linux-gnu.so b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_pq.cpython-37m-x86_64-linux-gnu.so new file mode 100644 index 0000000..00f6221 Binary files /dev/null and b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_pq.cpython-37m-x86_64-linux-gnu.so differ diff --git a/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_rnaseq_utils.cpython-37m-x86_64-linux-gnu.so b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_rnaseq_utils.cpython-37m-x86_64-linux-gnu.so new file mode 100644 index 0000000..8d50f5a Binary files /dev/null and b/build/lib.linux-x86_64-3.7/bookend/core/cython_utils/_rnaseq_utils.cpython-37m-x86_64-linux-gnu.so differ diff --git a/build/lib.linux-x86_64-3.7/bookend/core/elr_combine.py b/build/lib.linux-x86_64-3.7/bookend/core/elr_combine.py new file mode 100644 index 0000000..373a99f --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/elr_combine.py @@ -0,0 +1,238 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import os +import sys +import gzip +import resource +from math import ceil +from bookend.core.cython_utils._rnaseq_utils import RNAseqDataset +from bookend.core.cython_utils._pq import IndexMinPQ +if __name__ == '__main__': + sys.path.append('../../bookend') + from argument_parsers import combine_parser as parser + +class ELRcombiner: + def __init__(self, args, printargs=False): + """Leaves together ELR files in sort order""" + self.strand_sort_values = {'+':-1, '.':0, '-':1} + self.strand_reverse_values = {-1:'+', 0:'.', 1:'-'} + self.input = args['INPUT'] + self.output = args['OUTPUT'] + self.temp = args['TEMPDIR'] + self.write_header = True + if self.output == 'stdout': + self.output_file = 'stdout' + else: + self.output_file = open(self.output, 'w') + + self.linecount = 0 + self.readcount = 0 + self.number_of_files = len(self.input) + self.file_limit = resource.getrlimit(resource.RLIMIT_NOFILE)[0] + self.PQ = IndexMinPQ(self.number_of_files) + self.dataset = None + if printargs:print(args) + + def get_header(self, file): + """From an open connection to an ELR file, + extract the header information and store it as + a master lookup table for output chrom and source. + Returns the first line without a header and keeps + the file open at the existing buffer position.""" + header = {'chrom':{}, 'source':{}} + file.seek(0) + line = file.readline().rstrip() + if len(line) == 0: + return header, line + + while line[0] == '#': + header_line = line.split(' ') + num, char = header_line[-2:] + if header_line[0] == '#S': + header['source'][num] = char + elif header_line[0] == '#C': + header['chrom'][num] = char + + line = file.readline().rstrip() + + return header, line + + def read_to_sortable_tuple(self, line, index): + """Convert an ELR line into an RNAseqMapping object + with shared chrom and source indices.""" + split_line = line.split('\t') + # Swap index for the merged index value + chrom = int(self.dataset.chrom_dict[self.file_headers[index]['chrom'][split_line[0]]]) + start = int(split_line[1]) + length = int(split_line[2]) + strand = self.strand_sort_values[split_line[3]] + elcigar = split_line[4] + source = int(self.dataset.source_dict[self.file_headers[index]['source'][split_line[5]]]) + weight = split_line[6] + self.linecount += 1 + return (chrom, start, length, strand, elcigar, source, weight) + + def sortable_tuple_to_read(self, sortable_tuple): + l = list(sortable_tuple) + l[3] = self.strand_reverse_values[l[3]] + return '\t'.join([str(i) for i in l]) + + def output_line(self, line, output): + """Takes a list of bed lines and writes + them to the output stream. + """ + if output == 'stdout': + print(line) + else: + output.write('{}\n'.format(line.rstrip())) + + def run(self): + if self.output != 'stdout' and __name__ == '__main__': + print(self.display_options()) + + for c in self.combine_files(self.input, self.output_file):pass + + if self.output != 'stdout': + print(self.display_summary()) + + def combine_files(self, file_list, output, iterator=False): + file_number = len(file_list) + temp_list = [] + if file_list is self.input: + if not all([i.lower().endswith('.elr') or i.lower().endswith('.elr.gz') for i in self.input]): + print("\nERROR: all input files must be ELR format.") + sys.exit(1) + + if file_number > self.file_limit: + if not os.path.exists(self.temp): + os.mkdir(self.temp) + + number_of_chunks = ceil(file_number / self.file_limit) + for c in range(number_of_chunks): + chunk = file_list[c::number_of_chunks] + tempname = '{}/tmp{}.elr'.format(self.temp,c) + temp_list.append(tempname) + tempfile = open(tempname,'w') + for c in self.combine_files(chunk, tempfile):pass + + files = [open(f,'r') for f in temp_list] + else: + files = [open(f,'r') if f.lower().endswith('.elr') else gzip.open(f,'rt') for f in file_list] + elif file_list is None: + print("\nERROR: requires ELR file as input.") + sys.exit(1) + else: + files = [open(f) for f in file_list] + + file_number = len(files) + self.file_headers = [{}]*file_number + current_lines = ['']*file_number + self.chroms = [] + printedwarning = False + for i in range(file_number): + self.file_headers[i], current_lines[i] = self.get_header(files[i]) + if i == 0: # Store the first chroms list + chrom_num = len(self.file_headers[i]['chrom']) + self.chroms = [self.file_headers[i]['chrom'][str(n)] for n in range(chrom_num)] + elif not printedwarning: + if self.file_headers[i]['chrom'] != self.file_headers[0]['chrom']: + print("Warning: chromosome index does not match across input files!") + print("Check that the same genome was used for all alignments.") + printedwarning = True + + set_of_sources = set() + for h in self.file_headers: + set_of_sources.update(h['source'].values()) + + self.merged_sources = sorted(list(set_of_sources)) + self.dataset = RNAseqDataset(chrom_array=self.chroms, source_array=self.merged_sources) + # Initialize the priority queue with one ELR read object from each file + + finished_files = 0 + for index, line in enumerate(current_lines): + if line: # Populate the queue with the first line + item = self.read_to_sortable_tuple(line, index) + self.PQ.insert(index, item) + else: # The file was empty + files[index].close() + finished_files += 1 + + if self.write_header: + for h in self.dataset.dump_header(): + if iterator: + yield h + else: + self.output_line(h, output) + + last_item = None + while finished_files < file_number: # Keep going until every line of every file is processed + index, item = self.PQ.pop(True) + if last_item is None: + last_item = item + elif last_item[:6] == item[:6]: # Items can be collapsed + last_item = tuple(list(last_item[:6])+[self.sum_weights(last_item[6],item[6])]) + else: + # Items can't be collapsed, must output last_item + if iterator: + yield self.sortable_tuple_to_read(last_item) + else: + self.output_line(self.sortable_tuple_to_read(last_item), output) + + last_item = item + + next_line = files[index].readline().rstrip() + if next_line: + next_item = self.read_to_sortable_tuple(next_line, index) + self.PQ.insert(index, next_item) + else: # No more lines in this file + files[index].close() + finished_files += 1 + + if last_item is not None: + if iterator: + yield self.sortable_tuple_to_read(last_item) + else: + self.output_line(self.sortable_tuple_to_read(last_item), output) + + if len(temp_list) > 0: # Clean up temp directory + for temp_file in temp_list: + os.remove(temp_file) + + os.rmdir(self.temp) + + def sum_weights(self, string1, string2): + """Adds two weight strings, returning a single string + of either 'float' or 'float|float|float'""" + w1 = [float(w) for w in string1.split('|')] + if len(w1) == 1:w1 += [0, 0] + w2 = [float(w) for w in string2.split('|')] + if len(w2) == 1:w2 += [0, 0] + weights = [w1[0]+w2[0], w1[1]+w2[1], w1[2]+w2[2]] + if weights[1]==0 and weights[2]==0: + outweight = str(round(weights[0],2)) + else: + outweight = '{}|{}|{}'.format(round(weights[0],2), round(weights[1],2), round(weights[2],2)) + + return outweight + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend elr-combine |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input files: {}\n".format(self.input) + options_string += " Output file: {}\n".format(self.output) + options_string += " Temp directory: {}\n".format(self.temp) + return options_string + + def display_summary(self): + summary_string = '' + summary_string += 'Wrote {} lines ({} total reads) from {} files.\n'.format(self.linecount, round(self.readcount,2), self.number_of_files) + return summary_string + +#################### +# PARSE INPUT FILE # +#################### +if __name__ == '__main__': + args = vars(parser.parse_args()) + obj = ELRcombiner(args) + sys.exit(obj.run()) diff --git a/build/lib.linux-x86_64-3.7/bookend/core/elr_condense.py b/build/lib.linux-x86_64-3.7/bookend/core/elr_condense.py new file mode 100644 index 0000000..b1f14c2 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/elr_condense.py @@ -0,0 +1,235 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +import time +import os +import gzip +import bookend.core.cython_utils._rnaseq_utils as ru +from bookend.core.cython_utils._assembly_utils import Locus +from bookend.core.elr_sort import ELRsorter + +if __name__ == '__main__': + sys.path.append('../../bookend') + +class Condenser: + def __init__(self, args, printargs=False): + """Parses input arguments for assembly""" + self.start_time = time.time() + self.output = args['OUT'] + self.max_gap = args['MAX_GAP'] + self.end_cluster = args['END_CLUSTER'] + self.min_overhang = args['MIN_OVERHANG'] + self.min_cov = args['MIN_COV'] + self.min_intron_length = args['MIN_INTRON_LEN'] + self.intron_filter = args['INTRON_FILTER'] + self.min_proportion = args['MIN_PROPORTION'] + self.cap_bonus = args['CAP_BONUS'] + self.cap_filter = args['CAP_FILTER'] + self.minlen = args['MINLEN'] + self.input = args['INPUT'] + self.starts = args['STARTS'] + self.ends = args['ENDS'] + self.sparse = args['SPARSE'] + if self.output is None: + self.output = self.input.replace('.elr', '.cond.elr') + if '.cond.elr' not in self.output: + self.output = self.output+'.cond.elr' + + self.antisense_filter = 0.001 + if self.input_is_valid(self.input): + self.file_type = self.file_extension(self.input) + self.dataset = ru.RNAseqDataset() + if self.file_type == 'elr.gz': + self.input_file = gzip.open(self.input, 'rt') + else: + self.input_file = open(self.input, 'r') + else: + print("\nERROR: input file must be a valid format (ELR, BED).") + sys.exit(1) + + self.output_type = 'elr' + self.generator = ru.read_generator(self.input_file, self.dataset, self.file_type, self.max_gap, 0) + self.chunk_counter = 0 + self.transcripts_written = 0 + self.bases_used = 0 + self.output_temp = open(self.output+'.tmp', 'w') + if printargs:print(args) + #self.output_file = open(self.output,'w') + + def sort_output(self): + self.output_temp.close() + sorter = ELRsorter({'INPUT':self.output+'.tmp','OUT':self.output,'FORCE':True}) + sorter.run() + os.remove(self.output+'.tmp') + + def output_transcripts(self, transcript, printout=False): + """Writes the RNAseqMapping object 'transcript' to an output stream, + formatted as output_type.""" + output_line = transcript.write_as_elr(condense=self.sparse, endweights=True) + if printout: + print(output_line) + else: + self.output_temp.write(output_line+'\n') + + def dump_starts(self, locus): + start_groups = [] + donors = [int(j.split(':')[0]) for j in locus.J_plus] + for end_range in locus.end_ranges[0]: # Start Plus + capped = self.cap_filter <= end_range.capped/end_range.weight + right = min([d for d in donors if d >= end_range.right]+[locus.rightmost-locus.leftmost, end_range.right+max(locus.extend,self.minlen)]) + start_groups.append(ru.RNAseqMapping(ru.ELdata( + locus.chrom, 0, end_range.strand, [(end_range.peak+locus.leftmost, right+locus.leftmost)], [], True, False, capped, end_range.weight, False + ))) + + donors = [int(j.split(':')[1]) for j in locus.J_minus] + for end_range in locus.end_ranges[2]: # Start Minus + capped = self.cap_filter <= end_range.capped/end_range.weight + left = max([d+1 for d in donors if d < end_range.left]+[0, end_range.left-max(locus.extend,self.minlen)]) + start_groups.append(ru.RNAseqMapping(ru.ELdata( + locus.chrom, 0, end_range.strand, [(left+locus.leftmost, end_range.peak+1+locus.leftmost)], [], True, False, capped, end_range.weight, False + ))) + + return sorted(start_groups) + + def dump_ends(self, locus): + end_groups = [] + acceptors = [int(j.split(':')[1]) for j in locus.J_plus] + for end_range in locus.end_ranges[1]: # End Plus + left = max([a+1 for a in acceptors if a < end_range.left]+[0, end_range.left-max(locus.extend,self.minlen)]) + end_groups.append(ru.RNAseqMapping(ru.ELdata( + locus.chrom, 0, end_range.strand, [(left+locus.leftmost, end_range.peak+1+locus.leftmost)], [], False, True, False, end_range.weight, False + ))) + + acceptors = [int(j.split(':')[0]) for j in locus.J_minus] + for end_range in locus.end_ranges[3]: # End Minus + right = min([a for a in acceptors if a >= end_range.right]+[locus.rightmost-locus.leftmost, end_range.right+max(locus.extend,self.minlen)]) + end_groups.append(ru.RNAseqMapping(ru.ELdata( + locus.chrom, 0, end_range.strand, [(end_range.peak+locus.leftmost, right+locus.leftmost)], [], False, True, False, end_range.weight, False + ))) + + return sorted(end_groups) + + def process_entry(self, chunk, printout=False): + if len(chunk) > 1: + chrom = chunk[0].chrom + self.chunk_counter += 1 + locus = Locus( + chrom=chrom, + chunk_number=self.chunk_counter, + list_of_reads=chunk, + max_gap=self.max_gap, + end_cluster=self.end_cluster, + min_overhang=self.min_overhang, + reduce=True, + minimum_proportion=self.min_proportion, + min_intron_length=self.min_intron_length, + antisense_filter=self.antisense_filter, + cap_bonus=self.cap_bonus, + cap_filter=self.cap_filter, + intron_filter=self.intron_filter, + ignore_ends=False, + allow_incomplete=True, + require_cap=False, + simplify=False + ) + self.chunk_counter = locus.chunk_number + total_bases = locus.bases + if total_bases > 0: + if locus.end_ranges is not None: + end_groups = [] + if self.starts: + end_groups += self.dump_starts(locus) + + if self.ends: + end_groups += self.dump_ends(locus) + + for group in sorted(end_groups): + if group.weight >= self.min_cov: + self.output_transcripts(group, printout) + + if not (self.starts or self.ends): + for transcript in locus.transcripts: + if self.passes_all_checks(transcript): + self.output_transcripts(transcript, printout) + self.transcripts_written += 1 + self.bases_used += transcript.attributes['bases'] + + del locus + elif len(chunk) == 1: # No locus calculation needed, output read + transcript = chunk[0] + transcript.coverage = transcript.weight + if self.passes_all_checks(transcript): + self.output_transcripts(transcript, printout) + self.transcripts_written += 1 + self.bases_used += transcript.attributes.get('bases',transcript.get_length()*transcript.coverage) + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend condense |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file (-o): {}\n".format(self.output) + options_string += " *** Experiment parameters ***\n" + options_string += " Max allowed gap in coverage (--max_gap): {}\n".format(self.max_gap) + options_string += " Max end cluster distance (--end_cluster): {}\n".format(self.end_cluster) + options_string += " Min spanning bases (--min_overhang): {}\n".format(self.min_overhang) + options_string += " *** Filters ***\n" + options_string += " Min bp transcript length (--min_len): {}\n".format(self.minlen) + options_string += " Min isoform coverage (--min_cov): {}\n".format(self.min_cov) + options_string += " Min isoform contribution (--min_proportion): {}\n".format(self.min_proportion) + options_string += " Min retained intron proportion (--intron_filter): {}\n".format(self.intron_filter) + return options_string + + def display_summary(self): + summary = 'Wrote {} transfrags ({} bases).'.format(self.transcripts_written, self.bases_used) + summary += 'Total elapsed time: {}'.format(round(self.end_time - self.start_time, 5)) + return summary + + def file_extension(self, filename): + """Boolean if the file's extension is valid (BED, ELR)""" + split_name = filename.split('.') + if len(split_name) == 1: + return None + elif split_name[-1].lower() == 'gz': + return '.'.join([n.lower() for n in split_name[-2:]]) + else: + return split_name[-1].lower() + + def input_is_valid(self, filename, valid_formats=['elr', 'bed', 'elr.gz']): + """Boolean if the file is a format that Assembler can parse.""" + if self.file_extension(filename) in valid_formats: + return True + else: + return False + + def passes_all_checks(self, transcript): + """Determines if a transcript model passes the collection + of filters set by the commandline arguments. + 'transcript' is an RNAseqMapping object, + see _rnaseq_utils.pyx for details. + """ + if transcript.coverage < self.min_cov: return False + if transcript.attributes.get('length',transcript.get_length()) < self.minlen: return False + return True + + def run(self): + """Executes end labeling on all reads.""" + print(self.display_options()) + wrote_header = self.output_type == 'gtf' + for locus in self.generator: + if not wrote_header: + self.output_temp.write('\n'.join(self.dataset.dump_header())+'\n') + wrote_header = True + + self.process_entry(locus) + + self.sort_output() + self.end_time = time.time() + print(self.display_summary()) + +if __name__ == '__main__': + from argument_parsers import condense_parser as parser + args = vars(parser.parse_args()) + obj = Condenser(args) + sys.exit(obj.run()) + diff --git a/build/lib.linux-x86_64-3.7/bookend/core/elr_simulate.py b/build/lib.linux-x86_64-3.7/bookend/core/elr_simulate.py new file mode 100644 index 0000000..dcd8b75 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/elr_simulate.py @@ -0,0 +1,344 @@ +import sys +import os +import bookend.core.cython_utils._rnaseq_utils as ru +if __name__ == '__main__': + sys.path.append('../../bookend') + from argument_parsers import simulate_parser as parser + +class ELRsimulator: + def __init__(self, args): + """Simulates a set of ELR reads based on a reference transcriptome and abundances.""" + self.output = args['OUT'] + self.reference = args['REFERENCE'] + self.abundance = args['ABUNDANCE'] + self.count = args['COUNT'] + self.read_length = args['READ_LENGTH'] + self.min_length = args['MIN_LENGTH'] + self.adapter_5p = args['ADAPTER_5P'] + self.adapter_3p = args['ADAPTER_3P'] + self.paired = args['PAIRED'] + self.fragment_mean = args['FRAGMENT_MEAN'] + self.fragment_sd = args['FRAGMENT_SD'] + self.var_5p = args['VAR_5P'] + self.var_3p = args['VAR_3P'] + self.percent_intact = args['PERCENT_INTACT'] + self.percent_sense = args['PERCENT_SENSE'] + self.label_noise = args['LABEL_NOISE'] + self.seed = args['SEED'] + self.bed = args['BED'] + + self.percent_intact = float(1) if self.percent_intact < 1 else (float(100) if self.percent_intact > 100 else self.percent_intact) + self.percent_sense = float(0) if self.percent_sense < 0 else (float(100) if self.percent_sense > 100 else self.percent_sense) + random.seed(args.SEED) + + def run(self): + if self.output != 'stdout': + print(self.display_options()) + + self.import_annotation() + self.generate_reads() + if self.output != 'stdout': + print(self.display_summary()) + + def import_annotation(): + self.dataset = ru.AnnotationDataset( + annotation_files=[], + reference=self.reference + ) + + def generate_reads(): + anno_dict = self.dataset.reference + prob_dict = self.parse_abundance_file(args.TPM) + chroms_dict = {} + reverse_chroms_dict = {} + chrom_counter = 0 + names_dict = {} + reverse_names_dict = {} + name_counter = 0 + randomized_transcripts = self.choose_transcripts(prob_dict, self.count) + for i in range(self.count): + selected_transcript = randomized_transcripts[i] + read_object = anno_dict[selected_transcript] + r = self.simulate_read(read_object, verbose=False) + if r is not None: + if r[0] not in reverse_chroms_dict: + chroms_dict[chrom_counter] = r[0] + if not args.BED: + print('#G {} {}'.format(chrom_counter,chroms_dict[chrom_counter])) + + reverse_chroms_dict[r[0]] = chrom_counter + chrom_counter += 1 + + if r[4] not in reverse_names_dict: + names_dict[name_counter] = r[4] + if not args.BED: + print('#N {} {}'.format(name_counter,names_dict[name_counter])) + + reverse_names_dict[r[4]] = name_counter + name_counter += 1 + + r[0] = reverse_chroms_dict[r[0]] + r[4] = reverse_names_dict[r[4]] + elr_line = '\t'.join([str(i) for i in r]) + if args.BED: + print(eu.elr_line_to_bed(elr_line,chroms_dict,names_dict)) + else: + print(elr_line) + + def parse_abundance_file(self, filename): + """Parses a 2-column TSV file with relative transcript + abundances to generate a dict of proportions per transcript.""" + abundance = {} + abundance_table = open(filename) + for line in abundance_table: + if line[0] == '#': + continue + + l = line.rstrip().split('\t') + abundance[l[0]] = float(l[1]) + + abundance_table.close() + total_abundance = sum(abundance.values()) + proportions = {} + for k,v in abundance.items(): + proportions[k] = v/total_abundance + + return proportions + + def choose_transcripts(self, prob_dict, read_number): + """Selects one transcript with a weighted distribution + based on TPM""" + return list( + random.choice( + list(prob_dict.keys()), + read_number, + p=list(prob_dict.values()) + ) + ) + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend simulate |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Reference file: {}\n".format(self.reference) + options_string += " Output file: {}\n".format(self.output) + options_string += " *** Parameters ***\n" + options_string += " Read length: {}\n".format(self.read_length) + options_string += " Paired-end? {}\n".format(self.paired) + options_string += " Min length: {}\n".format(self.min_length) + options_string += " Number of reads: {}\n".format(self.count) + options_string += " Fragment length mean: {}\n".format(self.fragment_mean) + options_string += " Fragment length sd: {}\n".format(self.fragment_sd) + options_string += " 5' adapter length: {}\n".format(self.adapter_5p) + options_string += " 3' adapter length: {}\n".format(self.adapter_3p) + options_string += " 5' end pos variance: {}\n".format(self.var_5p) + options_string += " 3' end pos variance: {}\n".format(self.var_3p) + options_string += " RNA intact [0-100]%: {}\n".format(self.percent_intact) + options_string += " cDNA sense [0-100]%: {}\n".format(self.percent_sense) + options_string += " Label noise [0-100]%: {}\n".format(self.label_noise) + options_string += " RNG seed: {}\n".format(self.seed) + return options_string + + def display_summary(self): + summary = '\n' + summary += "Wrote {} simulated reads to {}.\n".format(self.count, self.output) + return summary + + def simulate_read(self, read_object, verbose=False): + """Randomly fragment a ReadObject and write ELR + lines simulating sequencing reads from the object""" + base_length = read_object.get_length() + base_positions = read_object.explode() + if read_object.strand == '-': + base_positions = base_positions[::-1] + + base_5p = base_positions[0] + base_3p = base_positions[-1] + var_3p = abs(var_3p) + var_5p = abs(var_5p) + + if var_5p > 0: + extension_5p = int(round(random.laplace(0,var_5p))) + if extension_5p > 0: + # If extension, make an array of extended positions + if read_object.strand == '+': + ext_pos_5p = list(range(base_5p-extension_5p,base_5p)) + else: + ext_pos_5p = list(range(base_5p+extension_5p,base_5p,-1)) + + offset_5p = 0 + else: + ext_pos_5p = [] + offset_5p = -extension_5p + else: + offset_5p = 0 + ext_pos_5p = [] + + if var_3p > 0: + extension_3p = int(round(random.laplace(0,var_3p))) + if extension_3p > 0: + # If extension, make an array of extended positions + if read_object.strand == '+': + ext_pos_3p = list(range(base_3p+1,base_3p+extension_3p+1)) + else: + ext_pos_3p = list(range(base_3p-1,base_3p-extension_3p-1,-1)) + + offset_3p = 0 + else: + ext_pos_3p = [] + offset_3p = extension_3p + else: + offset_3p = 0 + ext_pos_3p = [] + + if offset_3p < 0: + adjusted_positions = ext_pos_5p+base_positions[offset_5p:offset_3p]+ext_pos_3p + else: + adjusted_positions = ext_pos_5p+base_positions[offset_5p:]+ext_pos_3p + + adapter_seq_5p = ['S']*adapter_5p + adapter_seq_3p = ['E']*adapter_3p + + if random.randint(0,100) >= percent_intact: + break_pos = random.randint(0,len(adjusted_positions)) + else: + break_pos = 0 + + cdna_positions = adapter_seq_5p + adjusted_positions[break_pos:] + adapter_seq_3p + fragment_length = int(round(random.normal(fragment_mean,fragment_sd))) + + if fragment_length < minlen: + return + + if fragment_length >= len(cdna_positions): + cdna_fragment = cdna_positions + fragment_start = 0 + else: + fragment_start = random.randint(0,len(cdna_positions)-fragment_length) + cdna_fragment = cdna_positions[fragment_start:(fragment_start+fragment_length)] + + if random.randint(0,100) >= percent_sense: + # cDNA fragment is antisense to the read_object + cdna_fragment = cdna_fragment[::-1] + if read_object.strand == '+': + fragment_strand = '-' + else: + fragment_strand = '+' + else: + fragment_strand = read_object.strand + + if verbose: + print(cdna_positions) + print(fragment_strand) + + read_mate1 = cdna_fragment[:read_length] + read_mate2 = [] + if paired: + read_mate2 = cdna_fragment[-read_length:] + + if read_mate1[0] in ['S','E']: + first_label = read_mate1[0] + else: + first_label = '.' + + if paired: + if read_mate2[-1] in ['S','E']: + last_label = read_mate2[-1] + else: + last_label = '.' + else: + if read_mate1[-1] in ['S','E']: + last_label = read_mate1[-1] + else: + last_label = '.' + + if verbose: + print(read_mate1) + print(read_mate2) + + mate1_blocks = list(eu.array_to_blocks(read_mate1)) + mate2_blocks = list(eu.array_to_blocks(read_mate2)) + + mate1_length = sum([b-a+1 for a,b in mate1_blocks]) + mate2_length = sum([b-a+1 for a,b in mate2_blocks]) + if not mate1_length >= minlen and not mate2_length >= minlen: + # The fragment has less than minlen transcript-matching nucleotides + return + + if first_label in ['S','E'] or last_label in ['S','E'] or len(mate1_blocks) > 1 or len(mate2_blocks) > 1: + # Flip the fragment's strand back to the correct orientation + fragment_strand = read_object.strand + else: + fragment_strand = '.' + + if fragment_strand == '-': + # Flip 'first' and 'last' to reflect 'leftmost' and 'rightmost' labels + first_label,last_label = (last_label,first_label) + + if len(mate2_blocks) > 0 and len(mate1_blocks) > 0: + combined_blocks = sorted(mate1_blocks + mate2_blocks) + leftmost = min(su.flatten(combined_blocks)) + # Check if the combined blocks are strictly increasing with no overlap + if all([sum(su.overlap_type(range_a,range_b))==4 for range_a,range_b in zip(combined_blocks[1:],combined_blocks[:-1])]): + # A gap exists between mate1 and mate2. + # Print each ELCIGAR separately, combined by '.GAP.' + if mate1_blocks[0][0] < mate2_blocks[0][0]: + gap_length = mate2_blocks[0][0] - mate1_blocks[-1][-1] + LEFT_CIGAR = eu.blocks_to_ELCIGAR(mate1_blocks,fragment_strand,first_label=first_label,gap_type='J') + RIGHT_CIGAR = eu.blocks_to_ELCIGAR(mate2_blocks,fragment_strand,last_label=last_label,gap_type='J') + else: + gap_length = mate1_blocks[0][0] - mate2_blocks[-1][-1] + LEFT_CIGAR = eu.blocks_to_ELCIGAR(mate2_blocks,fragment_strand,first_label=first_label,gap_type='J') + RIGHT_CIGAR = eu.blocks_to_ELCIGAR(mate1_blocks,fragment_strand,last_label=last_label,gap_type='J') + + ELCIGAR = LEFT_CIGAR + str(gap_length+1) + RIGHT_CIGAR + else: + # Mate1 and mate2 overlap to some degree. + # Find a single merged set of blocks to convert to ELCIGAR + new_blocks = eu.collapse_blocks(combined_blocks) + leftmost = min(su.flatten(new_blocks)) + ELCIGAR = eu.blocks_to_ELCIGAR(new_blocks,fragment_strand,first_label=first_label,last_label=last_label,gap_type='J') + else: + # Either mate1 or mate2 are missing + if len(mate1_blocks) > 0: + leftmost = min(su.flatten(mate1_blocks)) + ELCIGAR = eu.blocks_to_ELCIGAR( + mate1_blocks, + fragment_strand, + first_label, + last_label, + gap_type='J' + ) + elif len(mate2_blocks) > 0: + leftmost = min(su.flatten(mate2_blocks)) + ELCIGAR = eu.blocks_to_ELCIGAR( + mate2_blocks, + fragment_strand, + first_label, + last_label, + gap_type='J' + ) + else: + return + + # Add noise to end labels + if random.randint(0,100) < label_noise: + ELCIGAR = random.choice(['S','E','.'],1)[0] + ELCIGAR[1:] + + if random.randint(0,100) < label_noise: + ELCIGAR = ELCIGAR[:-1] + random.choice(['S','E','.'],1)[0] + + # Write the simulated read + return [ + read_object.chrom, # chromosome + leftmost, # chromStart + fragment_strand, # strand + ELCIGAR, + read_object.readname, + '1' + ] + + +if __name__ == "__main__": + args = vars(parser.parse_args()) + obj = ELRsimulator(args) + sys.exit(obj.run()) diff --git a/build/lib.linux-x86_64-3.7/bookend/core/elr_sort.py b/build/lib.linux-x86_64-3.7/bookend/core/elr_sort.py new file mode 100644 index 0000000..1c6e6d0 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/elr_sort.py @@ -0,0 +1,170 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys +import os +from bookend.core.elr_combine import ELRcombiner + +class ELRsorter: + def __init__(self, args): + """Sorts all ELR reads in a file by ascending genomic position""" + self.input = args['INPUT'] + self.output = args['OUT'] + self.force = args['FORCE'] + self.strand_sort_values = {'+':-1, '.':0, '-':1} + self.strand_reverse_values = {-1:'+', 0:'.', 1:'-'} + self.read_tuples = [] + self.sortsize = 5000000 + self.linecount = 0 + self.outlinecount = 0 + self.tmpcount = 0 + self.header = '' + if self.output == 'stdout': + self.output_file = 'stdout' + else: + if self.force or not os.path.exists(self.output): + self.output_file = open(self.output,'w') + else: + print("ERROR: output file already exists. Use -f/--force to overwrite.") + sys.exit(1) + + def run(self): + if self.output != 'stdout' and __name__ == '__main__': + print(self.display_options()) + + self.process_input() + if self.tmpcount > 0: + if self.output != 'stdout': + print('Combining sorted reads from {} files.'.format(self.tmpcount)) + + combine_args = { + 'INPUT':['{}.tmp{}.elr'.format(self.input,i) for i in range(self.tmpcount)], + 'OUTPUT':'stdout', + 'TEMPDIR':'{}_combinetmp'.format(self.input) + } + combiner = ELRcombiner(combine_args) + for c in combiner.combine_files(combiner.input, self.output_file):pass + + for i in range(self.tmpcount): + os.remove('{}.tmp{}.elr'.format(self.input,i)) + else: + self.dump_sorted_reads() + + if self.output != 'stdout': + print(self.display_summary()) + self.output_file.close() + + def process_input(self): + """Yield a BED line from each line of a ELR input.""" + elr_in = open(self.input, 'r') + for elr_line in elr_in: + if elr_line[0] == '#': + self.header += elr_line + self.output_line(elr_line.rstrip()) + continue + + self.add_read_tuple(elr_line) + self.linecount += 1 + if self.linecount >= self.sortsize: + self.linecount = 0 + tmpfile = open('{}.tmp{}.elr'.format(self.input,self.tmpcount),'w') + tmpfile.write(self.header) + self.dump_sorted_reads(tmpfile) + tmpfile.close() + self.tmpcount += 1 + + if self.tmpcount > 0: + tmpfile = open('{}.tmp{}.elr'.format(self.input,self.tmpcount),'w') + tmpfile.write(self.header) + self.dump_sorted_reads(tmpfile) + tmpfile.close() + self.tmpcount += 1 + + def dump_sorted_reads(self, tmpfile=None): + """Writes sorted reads to output, collapsing + any identical reads into a single line with increased weight""" + self.read_tuples.sort(reverse=True) + if len(self.read_tuples) > 0: + read_tuple = self.read_tuples.pop() + weights = [float(w) for w in read_tuple[6].split('|')] + if len(weights) == 1: + weights += [0, 0] + + while self.read_tuples: + next_tuple = self.read_tuples.pop() + if next_tuple[:6] == read_tuple[:6]: + new_weights = [float(w) for w in read_tuple[6].split('|')] + if len(new_weights) == 1: + new_weights += [0, 0] + + weights = [weights[0]+new_weights[0], weights[1]+new_weights[1], weights[2]+new_weights[2]] + continue + else: + if weights[1]==0 and weights[2]==0: + outweight = str(round(weights[0],2)) + else: + outweight = '{}|{}|{}'.format(round(weights[0],2), round(weights[1],2), round(weights[2],2)) + + line = '{}\t{}\t{}\t{}\t{}\t{}\t{}'.format( + read_tuple[0],read_tuple[1],read_tuple[2], + self.strand_reverse_values[read_tuple[3]], + read_tuple[4],read_tuple[5],outweight + ) + self.output_line(line, tmpfile) + self.outlinecount += 1 + read_tuple = next_tuple + weights = [float(w) for w in read_tuple[6].split('|')] + if len(weights) == 1: + weights += [0, 0] + + if weights[1]==0 and weights[2]==0: + outweight = str(round(weights[0],2)) + else: + outweight = '{}|{}|{}'.format(round(weights[0],2), round(weights[1],2), round(weights[2],2)) + + line = '{}\t{}\t{}\t{}\t{}\t{}\t{}'.format( + read_tuple[0],read_tuple[1],read_tuple[2], + self.strand_reverse_values[read_tuple[3]], + read_tuple[4],read_tuple[5],outweight + ) + self.output_line(line, tmpfile) + self.outlinecount += 1 + + def add_read_tuple(self, elr_line): + l = elr_line.rstrip().split('\t') + # parse the line as a tuple of sortable values + read_tuple = (int(l[0]), int(l[1]), int(l[2]), self.strand_sort_values[l[3]], l[4], int(l[5]), l[6]) + self.read_tuples.append(read_tuple) + + def output_line(self, line, tmpfile=None): + """Takes a list of bed lines and writes + them to the output stream. + """ + if tmpfile is not None: + tmpfile.write('{}\n'.format(line.rstrip())) + else: + if self.output_file == 'stdout': + print(line) + else: + self.output_file.write('{}\n'.format(line.rstrip())) + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend sort-elr |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file: {}\n".format(self.output) + return options_string + + def display_summary(self): + summary_string = '' + summary_string += 'Processed {} lines.\n'.format((self.tmpcount*1000000)+self.linecount) + summary_string += 'Wrote {} sorted unique reads.\n'.format(self.outlinecount) + return summary_string + + +if __name__ == '__main__': + sys.path.append('../../bookend') + from argument_parsers import elr_sort_parser as parser + args = vars(parser.parse_args()) + obj = ELRsorter(args) + sys.exit(obj.run()) diff --git a/build/lib.linux-x86_64-3.7/bookend/core/elr_to_bed.py b/build/lib.linux-x86_64-3.7/bookend/core/elr_to_bed.py new file mode 100644 index 0000000..9f8af60 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/elr_to_bed.py @@ -0,0 +1,91 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +import gzip +from bookend.core.cython_utils._rnaseq_utils import RNAseqDataset +if __name__ == '__main__': + sys.path.append('../../bookend') + from argument_parsers import bed_to_elr_parser as parser + +class ELRtoBEDconverter: + def __init__(self, args): + """Converts each line of BED-formatted input to ELR""" + self.input = args['INPUT'] + self.output = args['OUTPUT'] + if self.output == 'stdout': + self.output_file = 'stdout' + else: + self.output_file = open(self.output, 'w') + + self.linecount = 0 + self.readcount = 0 + self.dataset = RNAseqDataset() + + def process_input(self): + """Yield a BED line from each line of a ELR input.""" + if self.input.lower().endswith('.elr.gz'): + elr_in = gzip.open(self.input, 'rt') + else: + elr_in = open(self.input, 'r') + + for elr_line in elr_in: + if elr_line[0] == '#': + header_line = elr_line.rstrip().split(' ') + if header_line[0] == '#S': + self.dataset.add_source(header_line[-1]) + if header_line[0] == '#C': + self.dataset.add_chrom(header_line[-1]) + + continue + + self.dataset.add_read_from_ELR(elr_line) + self.linecount += 1 + while len(self.dataset.read_list) > 0: + self.readcount += self.dataset.read_list[-1].weight + bed_line = self.dataset.pop_read('bed') + self.output_line(bed_line, self.output_file) + + current_source_index = self.dataset.source_index + current_chrom_index = self.dataset.chrom_index + + if self.output != 'stdout': + self.output_file.close() + + def output_line(self, line, output_file): + """Takes a list of bed lines and writes + them to the output stream. + """ + if output_file == 'stdout': + print(line) + else: + output_file.write('{}\n'.format(line.rstrip())) + + def run(self): + if __name__ == '__main__':print(self.display_options()) + if not (self.input.lower().endswith('.elr') or self.input.lower().endswith('.elr.gz')): + print("ERROR: input must be in the ELR format (.elr)") + return 1 + + self.process_input() + print(self.display_summary()) + return 0 + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend elr-to-bed |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file: {}\n".format(self.output) + options_string += " Header output: {}\n".format(self.header) + return options_string + + def display_summary(self): + summary_string = '' + summary_string += 'Processed {} lines ({} total reads).\n'.format(self.linecount, round(self.readcount,2)) + return summary_string + + +if __name__ == '__main__': + args = vars(parser.parse_args()) + obj = ELRtoBEDconverter(args) + sys.exit(obj.run()) diff --git a/build/lib.linux-x86_64-3.7/bookend/core/fasta.py b/build/lib.linux-x86_64-3.7/bookend/core/fasta.py new file mode 100644 index 0000000..3c94d48 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/fasta.py @@ -0,0 +1,137 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +import copy +import bookend.core.cython_utils._rnaseq_utils as ru +import bookend.core.cython_utils._fasta_utils as fu +if __name__ == '__main__': + sys.path.append('../../bookend') + +class FastaWriter: + def __init__(self, args): + """Parses input arguments for assembly""" + self.args = args + self.output = self.args['OUT'] + self.genome = self.args['GENOME'] + self.input = self.args['INPUT'] + self.orf = self.args['ORF'] + self.allow_unstranded = self.args['UNSTRANDED'] + if len(self.input) == 0: + parser.print_help() + sys.exit(0) + + if self.file_extension(self.output) not in ['fa','fasta']: # Check for valid file extension on output name + self.output_type = 'fasta' + self.output = self.output + '.fasta' + else: + self.output_file = open(self.output,'w') + self.output_type = self.file_extension(self.output) + self.output_file = open(self.output,'w') + + print(self.display_options()) + config_defaults, gtf_defaults, gff_defaults = self.make_config_dicts() + self.dataset = ru.AnnotationDataset( + annotation_files=self.input, + reference=None, + genome_fasta=self.genome, + config=config_defaults, + gtf_config=gtf_defaults, + gff_config=gff_defaults + ) + self.dataset.source_array = ['', 'bookend'] + self.locus_counter = 0 + self.new_gene_counter = 0 + self.input_transcripts = 0 + self.transcript_counter = 0 + self.updated_transcript_counter = 0 + + def make_config_dicts(self): + """Converts commandline input into three config dicts + to pass to the AnnotationDataset.""" + config_defaults = copy.copy(ru.config_defaults) + gtf_defaults = copy.copy(ru.gtf_defaults) + gff_defaults = copy.copy(ru.gff_defaults) + return config_defaults, gtf_defaults, gff_defaults + + def output_transcripts(self, transcript): + """Writes the transcript FASTA entry corresponding to an RNAseqMapping object.""" + sequence = self.dataset.get_transcript_fasta(transcript) + if self.orf: + orf = fu.longest_orf(sequence)[0] + if transcript.strand == 0: + rev_orf = fu.longest_orf(fu.rc(sequence))[0] + if len(rev_orf) > len(orf): + orf = rev_orf + + sequence = orf + + if len(sequence) == 0: + sequence = '-' + + self.output_file.write('>{}\n{}\n'.format( + transcript.attributes['transcript_id'], + sequence + )) + + def process_entry(self, chunk): + self.locus_counter += 1 + for transcript in chunk: + if not self.allow_unstranded and transcript.strand == 0: + continue + + self.transcript_counter += 1 + self.output_transcripts(transcript) + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend fasta |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file:\n\t{}\n".format('\n\t'.join(self.input)) + options_string += " Reference genome (--genome):\n\t{}\n".format(self.genome) + options_string += " Output file (-o):\n\t{}\n".format(self.output) + return options_string + + def display_summary(self): + summary = '\n' + summary += "{} loci processed ({} total input transcripts).\n".format(self.locus_counter, self.input_transcripts) + summary += "{} transcripts written.\n".format(self.transcript_counter) + return summary + + def file_extension(self, filename): + """Boolean if the file's extension is valid (BED, ELR)""" + split_name = filename.split('.') + if len(split_name) == 1: + return None + else: + extension = split_name[-1].lower() + return extension + + def input_is_valid(self, filename): + """Boolean if the file is a format that Assembler can parse.""" + if self.file_extension(filename) in ['bed','bed12','elr','gtf','gff3','gff']: + return True + else: + return False + + def navigate_to(self, gene_id): + generator = self.dataset.generate_loci() + for chunk in generator: + if gene_id in [r.attributes['gene_id'] for r in chunk]: + return copy.deepcopy(chunk) + + def run(self): + """Executes end labeling on all reads.""" + for chunk in self.dataset.generator: + if len(chunk) > 0: + self.process_entry(chunk) + + self.output_file.close() + print(self.display_summary()) + + +if __name__ == '__main__': + from argument_parsers import merge_parser as parser + args = vars(parser.parse_args()) + obj = FastaWriter(args) + sys.exit(obj.run()) + diff --git a/build/lib.linux-x86_64-3.7/bookend/core/fastq_end_label.py b/build/lib.linux-x86_64-3.7/bookend/core/fastq_end_label.py new file mode 100644 index 0000000..c32c806 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/fastq_end_label.py @@ -0,0 +1,328 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import re +import sys +import gzip +if __name__ == '__main__': + sys.path.append('../../bookend') + +from collections import Counter +import bookend.core.cython_utils._fasta_utils as fu +if sys.version_info >= (3,0): + izip = zip +else: + from itertools import izip + +class EndLabeler: + def __init__(self, args): + """Parses input arguments for end labeling FASTQ file(s)""" + self.namesplit = re.compile('[ /\t]') + self.input = args['FASTQ'] + self.file1 = None + self.file2 = None + self.verbose = args['VERBOSE'] + self.minstart = args['MIN_START'] + self.minend = args['MIN_END'] + self.maxstart = args['MAX_START'] + self.maxend = args['MAX_END'] + self.minlen = args['MINLEN'] + self.minqual = args['MINQUAL'] + self.qualmask = args['QUALMASK'] + self.strand = args['STRAND'] + self.discard_untrimmed = args['DISCARD_UNTRIMMED'] + self.out1 = args['OUT1'] + self.out2 = args['OUT2'] + self.pseudomates = args['PSEUDOMATES'] + self.umi = args['UMI'] + self.umi_range = (0,0) + self.umi_count = 0 + if self.pseudomates: + self.single_out = None + else: + self.single_out = args['SINGLE_OUT'] + + self.mm_rate = args['MM_RATE'] + self.labeldict = Counter() + self.open_input_files() + + self.s_label = '' if args['START'].lower() == 'none' else args['START'] + self.S5string = self.s_label + if len(self.S5string) > 1: + if self.umi == 'S': + self.umi_range = (self.S5string.find('N'), self.S5string.rfind('N')+1) + if self.umi_range[1]-self.umi_range[0] == 0: + print("ERROR: No string of N's found for UMI in S label.") + sys.exit(1) + + if self.S5string[-1] == '+': # 3'-terminal monomer is specified + self.S5monomer = fu.IUPACnum[self.S5string[-2]] + self.S3monomer = fu.IUPACnum[fu.complement(self.S5string[-2])] + self.S5string = self.S5string[:-1] + else: + self.S5monomer = self.S3monomer = -1 + else: + self.S5monomer = self.S3monomer = -1 + + self.S3string = fu.complement(self.S5string) + self.e_label = '' if args['END'].lower() == 'none' else args['END'] + self.E5string = self.e_label + if len(self.E5string) > 1: + if self.umi == 'E': + self.umi_range = (self.E5string.find('N')-len(self.E5string), self.E5string.rfind('N')+1-len(self.S5string)) + if self.umi_range[1]-self.umi_range[0] == 0: + print("ERROR: No string of N's found for UMI in E label.") + sys.exit(1) + + if self.E5string[-1] == '+': # Monomer is specified + self.E5monomer = fu.IUPACnum[self.E5string[-2]] + self.E3monomer = fu.IUPACnum[fu.complement(self.E5string[-2])] + self.E5string = self.E5string[:-1] + else: + self.E5monomer = self.E3monomer = -1 + else: + self.E5monomer = self.E3monomer = -1 + + self.E3string = fu.complement(self.E5string) + self.S5array = fu.nuc_to_int(self.S5string, 'J'*len(self.S5string)) + self.S3array = fu.nuc_to_int(self.S3string, 'J'*len(self.S3string)) + self.E5array = fu.nuc_to_int(self.E5string, 'J'*len(self.E5string)) + self.E3array = fu.nuc_to_int(self.E3string, 'J'*len(self.E3string)) + if self.single_out is not None: + self.outfile_single=open(self.single_out,'w') + + if self.file2 is None: # Single-end input + self.out1 = self.outfile1 = self.out2 = self.outfile2 = None + else: # Paired-end input + self.outfile1 = open(self.out1,'w') + self.outfile2 = open(self.out2,'w') + + self.fastq_generator = self.generate_fastq_entries() + + def run(self): + """Executes end labeling on all reads.""" + print(self.display_options()) + for fastq_entry in self.fastq_generator: + self.label_fastq_entry(fastq_entry) + + if self.single_out is not None: + self.outfile_single.close() + + if self.file2 is not None: + self.outfile1.close() + self.outfile2.close() + + print(self.display_label_summary()) + + def open_input_files(self): + self.experiment_type = "SE" + if self.input[0].endswith('gz'): + self.file1 = gzip.open(self.input[0], 'rt') + else: + self.file1 = open(self.input[0],'r') + + if len(self.input) == 2: + self.experiment_type = "PE" + if self.input[1].endswith('gz'): + self.file2 = gzip.open(self.input[1], 'rt') + else: + self.file2 = open(self.input[1],'r') + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend label |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file(s): {}\n".format(self.input) + options_string += " Output single-end (--single_out): {}\n".format(self.single_out) + options_string += " Output paired-end mate 1 (--out1): {}\n".format(self.out1) + options_string += " Output paired-end mate 2 (--out2): {}\n".format(self.out2) + options_string += " *** Experiment parameters ***\n" + options_string += " Start tag (-S/--start): {}\n".format(self.s_label) + options_string += " End tag (-E/--end): {}\n".format(self.e_label) + options_string += " UMI (--umi): {} ({}-{})\n".format(self.umi, self.umi_range[0], self.umi_range[1]) + options_string += " cDNA strand (--strand): {}\n".format(self.strand) + options_string += " *** Filters ***\n" + options_string += " --discard_untrimmed: {}\n".format(self.discard_untrimmed) + options_string += " --mismatch_rate: {}\n".format(self.mm_rate) + options_string += " S tag length min (--min_start): {}\n".format(self.minstart) + options_string += " E tag length min (--min_end): {}\n".format(self.minend) + options_string += " S tag length max (--max_start): {}\n".format(self.maxstart) + options_string += " E tag length max (--max_end): {}\n".format(self.maxend) + options_string += " Trimmed length min (--minlen): {}\n".format(self.minlen) + options_string += " Min avg. phred score (--minqual): {}\n".format(self.minqual) + options_string += " Phred to mask as N (--qualmask): {}\n".format(self.qualmask) + options_string += " Write pseudomates (--pseudomates): {}\n".format(self.pseudomates) + return options_string + + def display_trim(self, mate1, mate2, trim1, trim2, label): + """Returns a summary string of the trimming operation""" + if mate2: + trimstring = '[{}]\t{}|{} --> {}|{}'.format(label, mate1, mate2, trim1, trim2) + else: + trimstring = '[{}]\t{} --> {}'.format(label, mate1, trim1) + + return trimstring + + def display_label_summary(self): + """Given a Counter object of end labels, returns a summary of their length frequency distribution.""" + total = sum(self.labeldict.values()) + if total == 0: + summary_string = "No reads processed.\n" + else: + no_tag = self.labeldict['']+self.labeldict['XD'] + s_tag = sum([self.labeldict[k] for k in self.labeldict.keys() if 'S' in k]) + e_tag = sum([self.labeldict[k] for k in self.labeldict.keys() if 'E' in k]) + xl_tag = self.labeldict.get('XL', 0) + xq_tag = self.labeldict.get('XQ', 0) + kept = total-(xl_tag+xq_tag) + summary_string = "Total reads processed: {}\n".format(total) + summary_string += "Start labeled: {} ({}%)\n".format(s_tag, int(s_tag/total*1000)/10) + summary_string += "End labeled: {} ({}%)\n".format(e_tag, int(e_tag/total*1000)/10) + summary_string += "UMIs detected: {} ({}%)\n".format(self.umi_count, int(self.umi_count/total*1000)/10) + summary_string += "Unlabeled: {} ({}%)\n".format(no_tag, int(no_tag/total*1000)/10) + summary_string += "Removed (short): {} ({}%)\n".format(xl_tag, int(xl_tag/total*1000)/10) + summary_string += "Removed (qual): {} ({}%)\n".format(xq_tag, int(xq_tag/total*1000)/10) + summary_string += "Total output: {} ({}%)\n".format(kept, int(kept/total*1000)/10) + + multilabel = set([k for k in self.labeldict.keys() if 'S' in k and 'E' in k]) + for m in multilabel: + s, e = m.lstrip('S').split('E') + self.labeldict['S{}'.format(s)] += self.labeldict[m] + self.labeldict['E{}'.format(e)] += self.labeldict[m] + + label_lengths = [int(i.strip('SE')) for i in self.labeldict.keys() if i != '' and i not in multilabel and 'X' not in i] + if len(label_lengths) > 0: + summary_string += "\nlen\tS_tag\tE_tag\n" + max_len = max(label_lengths) + for i in range(1, max_len+1): + s_count = self.labeldict['S{}'.format(i)] + e_count = self.labeldict['E{}'.format(i)] + if s_count > 0 or e_count > 0: + summary_string += '{}\t{}\t{}\n'.format(i, s_count, e_count) + + if len(multilabel) > 0: + summary_string += "Multi-label reads: {}".format(sum([self.labeldict[m] for m in multilabel])) + + return summary_string + + def generate_fastq_entries(self): + """Generator object to iterate over one or two FASTQ files + and package each read as a tuple""" + file1_read = file2_read = None + linecounter=0 + if self.file1 and self.file2: + for line1, line2 in izip(self.file1, self.file2): + linecounter+=1 + if linecounter % 4 == 1: + if file1_read and file2_read: + yield (file1_read, file2_read) + + name1 = re.split(self.namesplit,line1)[0].rstrip() + name2 = re.split(self.namesplit,line2)[0].rstrip() + if name1 != name2: + name1 = name1[:-2] + name2 = name2[:-2] + + assert name1 == name2, "ERROR: mate pair names do not match" + file1_read = [name1] + file2_read = [name2] + else: + file1_read.append(line1.rstrip()) + file2_read.append(line2.rstrip()) + + yield (file1_read, file2_read) + elif self.file1: + for line1 in self.file1: + linecounter+=1 + if linecounter % 4 == 1: + if file1_read: + yield (file1_read, None) + + name1 = re.split(self.namesplit,line1)[0].rstrip() + file1_read = [name1] + else: + file1_read.append(line1.rstrip()) + + yield (file1_read, None) + + def label_fastq_entry(self, fastq_entry): + file1_read, file2_read = fastq_entry + if file1_read and file2_read: + # Execute paired-end trimming + trim1, qtrm1, trim2, qtrm2, label = fu.terminal_trim( + file1_read[1], file1_read[3], file2_read[1], file2_read[3], + self.S5array, self.S5monomer, self.S3array, self.S3monomer, + self.E5array, self.E5monomer, self.E3array, self.E3monomer, + self.strand, self.minstart, self.minend, self.minlen, self.minqual, self.qualmask, self.mm_rate, self.umi, self.umi_range, self.maxstart, self.maxend + ) + if self.verbose: + print(self.display_trim(file1_read[1], file2_read[1], trim1, trim2, label)) + + if len(trim1) > 0: + if not self.discard_untrimmed or label != '': + if trim2 is None: + if len(trim1) >= self.minlen: # A single read was written from the pair + if fu.is_homopolymer(trim1): + self.labeldict['XQ'] += 1 + else: + if self.pseudomates: + self.outfile1.write('{}_TAG={}\n{}\n{}\n{}\n'.format(file1_read[0], label, trim1, file1_read[2], qtrm1)) + self.outfile2.write('{}_TAG={}\n{}\n{}\n{}\n'.format(file1_read[0], label, fu.rc(trim1), file1_read[2], qtrm1[::-1])) + else: + self.outfile_single.write('{}_TAG={}\n{}\n{}\n{}\n'.format(file1_read[0], label, trim1, file1_read[2], qtrm1)) + + self.labeldict[label.split('_UMI=')[0]] += 1 + else: + self.labeldict['XL'] += 1 + else: + if len(trim1) >= self.minlen and len(trim2) >= self.minlen: # Write trimmed, oriented, paired-end reads + if fu.is_homopolymer(trim1) or fu.is_homopolymer(trim2): + self.labeldict['XQ'] += 1 + else: + self.outfile1.write('{}_TAG={}\n{}\n{}\n{}\n'.format(file1_read[0], label, trim1, file1_read[2], qtrm1)) + self.outfile2.write('{}_TAG={}\n{}\n{}\n{}\n'.format(file2_read[0], label, trim2, file2_read[2], qtrm2)) + self.labeldict[label.split('_UMI=')[0]] += 1 + else: + self.labeldict['XL'] += 1 + else: + self.labeldict['XD'] += 1 + else: + if label == '': + self.labeldict['XQ'] += 1 + else: + self.labeldict['XL'] += 1 + elif file1_read: # Execute single-end trimming + trim1, qtrm1, trim2, qtrm2, label = fu.terminal_trim( + file1_read[1], file1_read[3], '', '', + self.S5array, self.S5monomer, self.S3array, self.S3monomer, + self.E5array, self.E5monomer, self.E3array, self.E3monomer, + self.strand, self.minstart, self.minend, self.minlen, self.minqual, self.qualmask, self.mm_rate, self.umi, self.umi_range, self.maxstart, self.maxend + ) + if self.verbose: + print(self.display_trim(file1_read[1], '', trim1, '', label)) + + if len(trim1) > 0: + if fu.is_homopolymer(trim1): + self.labeldict['XQ'] += 1 + elif not self.discard_untrimmed or label != '': + if len(trim1) >= self.minlen: # A single read was output + self.outfile_single.write('{}_TAG={}\n{}\n{}\n{}\n'.format(file1_read[0], label, trim1, file1_read[2], qtrm1)) + self.labeldict[label.split('_UMI=')[0]] += 1 + else: + self.labeldict['XL'] += 1 + else: + self.labeldict['XD'] += 1 + else: + if label == '': + self.labeldict['XQ'] += 1 + else: + self.labeldict['XL'] += 1 + + if '_UMI=' in label: + self.umi_count += 1 + +########################## +if __name__ == '__main__': + from argument_parsers import end_label_parser + args = vars(end_label_parser.parse_args()) + obj = EndLabeler(args) + sys.exit(obj.run()) diff --git a/build/lib.linux-x86_64-3.7/bookend/core/gtf_classify.py b/build/lib.linux-x86_64-3.7/bookend/core/gtf_classify.py new file mode 100644 index 0000000..63ba94a --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/gtf_classify.py @@ -0,0 +1,292 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +import copy +import bookend.core.cython_utils._rnaseq_utils as ru +from collections import namedtuple +from math import ceil +if __name__ == '__main__': + sys.path.append('../../bookend') + + +class AssemblyClassifier: + def __init__(self, args): + """Parses input arguments for assembly""" + self.match_data = namedtuple('match_data', 'matchtype transcript gene exonoverlap reflen tlen ref diff5p diff3p') + self.args = args + self.output = self.args['OUT'] + self.end_buffer = self.args['END_BUFFER'] + self.input = self.args['INPUT'] + self.verbose = self.args['VERBOSE'] + self.reference = self.args['REFERENCE'] + self.match_unstranded = self.args['UNSTRANDED'] + if len(self.input) == 0 and self.reference is None: + parser.print_help() + sys.exit(0) + + self.gene_attr = self.args['PARENT_ATTR_GENE'] + self.gene_attr_child = self.args['CHILD_ATTR_GENE'] + self.gtf_parent = self.args['GFF_PARENT'] + self.gtf_child = self.args['GFF_CHILD'] + self.gff_parent = self.args['GFF_PARENT'] + self.gff_child = self.args['GFF_CHILD'] + self.refid_parent = self.args['PARENT_ATTR_TRANSCRIPT'] + self.refid_child = self.args['CHILD_ATTR_TRANSCRIPT'] + self.gene_delim = self.args['GENE_DELIM'] + if self.input_is_valid(self.output): # Check for valid file extension on output name + self.output_type = self.file_extension(self.output) + self.output_file = open(self.output,'w') + else: + self.output_type = 'tsv' + self.output = self.output + '.tsv' + self.output_file = open(self.output,'w') + + print(self.display_options()) + config_defaults, gtf_defaults, gff_defaults = self.make_config_dicts() + self.dataset = ru.AnnotationDataset( + annotation_files=self.input, + reference=self.reference, + genome_fasta=None, + config=config_defaults, + gtf_config=gtf_defaults, + gff_config=gff_defaults + ) + self.output_file.write('assembly_id\tclassification\tref_match\tref_gene\tassembly_len\tref_len\toverlap_len\tdiff5p\tdiff3p\tcov\tS.reads\tS.capped\tE.reads\n') + self.dataset.source_array = ['reference', 'assembly'] + self.generator = self.dataset.generator + self.locus_counter = 0 + self.new_gene_counter = 0 + self.ref_transcript_count = 0 + self.input_transcript_count = 0 + self.transcript_counter = 0 + self.updated_transcript_counter = 0 + self.match_types = [ + 'intergenic', # 0 (lowest classification) no ref match + 'ambiguous', # 1 overlapping with no strand information + 'antisense', # 2 only overlaps a ref in antisense + 'intronic', # 3 fully contained in a ref intron (sense) + 'isoform', # 4 overlaps, incompatible exon chain + 'fragment', # 5 compatible with, but fewer exons than, a ref + 'fusion', # 6 shares exons with 2 or more ref genes + 'exon_match', # 7 shares entire exon chain, but not ends + 'full_match' # 8 shares entire exon chan and ends + ] + + def make_config_dicts(self): + """Converts commandline input into three config dicts + to pass to the AnnotationDataset.""" + config_defaults = copy.copy(ru.config_defaults) + gtf_defaults = copy.copy(ru.gtf_defaults) + gff_defaults = copy.copy(ru.gff_defaults) + config_defaults['min_reps'] = 0 + config_defaults['cap_percent'] = 0 + config_defaults['verbose'] = self.verbose + config_defaults['gene_delim'] = self.gene_delim + if self.gtf_parent: gtf_defaults['parent_types'] = set(self.gtf_parent) + if self.gtf_child: gtf_defaults['child_types'] = set(self.gtf_child) + if self.gff_parent: gff_defaults['parent_types'] = set(self.gff_parent) + if self.gff_child: gff_defaults['child_types'] = set(self.gff_child) + if self.gene_attr is None: + self.gene_attr = gtf_defaults['parent_key_gene'] + else: + gff_defaults['parent_key_gene'] = self.gene_attr + gtf_defaults['parent_key_gene'] = self.gene_attr + + if self.gene_attr_child is not None: + gff_defaults['child_key_gene'] = self.gene_attr_child + + if self.refid_parent is not None: + gff_defaults['parent_key_transcript'] += self.refid_parent + gtf_defaults['parent_key_transcript'] += self.refid_parent + + if self.refid_child is not None: + gff_defaults['child_key_transcript'] += self.refid_child + gtf_defaults['child_key_transcript'] += self.refid_child + + return config_defaults, gtf_defaults, gff_defaults + + def compare_transcripts(self, input_transcripts, reference_transcripts): + """Iterate over the set of input transcripts (highest TPM first) + and classify each input relative to the reference according to the + definition in calculate_match_type() + """ + for transcript in input_transcripts: + match_data = self.calculate_match_type(transcript, reference_transcripts) + classification = '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format( + transcript.attributes['transcript_id'], + self.match_types[match_data.matchtype], + match_data.transcript, + match_data.gene, + match_data.tlen, + match_data.reflen, + match_data.exonoverlap, + match_data.diff5p, + match_data.diff3p, + round(float(transcript.attributes.get('cov', 0)),1), + round(float(transcript.attributes.get('S.reads', 0)),1), + round(float(transcript.attributes.get('S.capped', 0)),1), + round(float(transcript.attributes.get('E.reads', 0)),1) + ) + self.output_file.write(classification) + if self.verbose: + print(classification.rstrip()) + + return + + def update_match(self, old_match, new_match): + """Given an existing ref match, decide how the new match + updates the old match. Can replace the old match, be skipped, + or turn the match into a fusion the transcript matches two genes. + 'matchtype transcript gene exonoverlap reflen tlen' + """ + if old_match.matchtype == 8: + if new_match.matchtype == 8 and new_match.exonoverlap > old_match.exonoverlap: + return new_match + else: + return old_match + elif new_match.matchtype == 8: + return new_match + elif new_match.gene != old_match.gene and old_match.gene != 'NA': # Evaluate if a fusion + if new_match.exonoverlap >= .9*new_match.reflen or new_match.matchtype == 4: + if old_match.exonoverlap >= .9*old_match.reflen or old_match.matchtype == 4: + if old_match.ref.shared_bases(new_match.ref) < .9*min([old_match.reflen, new_match.reflen]): + fused_match = self.match_data( + 6, + '{},{}'.format(old_match.transcript, new_match.transcript), + '{},{}'.format(old_match.gene, new_match.gene), + max(old_match.exonoverlap, new_match.exonoverlap), + max(old_match.reflen, new_match.reflen), + old_match.tlen, + old_match.ref if old_match.exonoverlap > new_match.exonoverlap else new_match.ref, + old_match.diff5p if abs(old_match.diff5p) <= abs(new_match.diff5p) else new_match.diff5p, + old_match.diff3p if abs(old_match.diff3p) <= abs(new_match.diff3p) else new_match.diff3p + ) + return fused_match + + if new_match.matchtype > old_match.matchtype: + return new_match + elif new_match.matchtype == old_match.matchtype and new_match.exonoverlap > old_match.exonoverlap: + return new_match + else: + return old_match + + def calculate_match_type(self, transcript, reference_transcripts): + """Finds the best match in the list of reference transcripts + and classifies it according to one of the self.match_types: + 'intergenic', # 0 (lowest classification) no ref match + 'ambiguous', # 1 overlapping with no strand information + 'antisense', # 2 only overlaps a ref in antisense + 'intronic', # 3 fully contained in a ref intron (sense) + 'isoform', # 4 overlaps, incompatible exon chain + 'truncation', # 5 compatible with, but fewer exons than, a ref + 'fusion', # 6 shares exons with 2 or more ref genes + 'exon_match', # 7 shares entire exon chain, but not ends + 'full_match' # 8 shares entire exon chan and ends + """ + tlen = transcript.get_length() + best_match = self.match_data(0, 'NA', 'NA', 0, 0, tlen, None, 'NA', 'NA') + for ref in reference_transcripts: + match_type = 0 + if not transcript.overlaps(ref): + continue + + reflen = ref.get_length() + shared_bases = transcript.shared_bases(ref) + left_diff = transcript.ranges[0][0]-ref.ranges[0][0] + right_diff = transcript.ranges[-1][1]-ref.ranges[-1][1] + diff5p = left_diff if transcript.strand == 1 else right_diff + diff3p = right_diff if transcript.strand == 1 else left_diff + if transcript.splice_match(ref, ignore_ends=True): + if abs(left_diff) <= self.end_buffer and abs(right_diff) <= self.end_buffer: + match_type = 8 # full_match + else: + match_type = 7 # exon_match + elif transcript.is_compatible(ref, ignore_ends=True, ignore_source=True): # Truncation or extension + if reflen > tlen: + match_type = 5 # truncation + else: + match_type = 4 # isoform (possibly a fusion of two genes) + else: # Incompatible but overlapping + if transcript.strand == 0: + match_type = 1 # ambiguous + elif transcript.strand != ref.strand: + match_type = 2 # antisense + elif shared_bases == 0: + match_type = 3 + else: # At least some shared, sense, exonic sequence + match_type = 4 # isoform + + if not self.match_unstranded: + if transcript.strand == 0 and match_type in [8, 7, 4]: + match_type = 1 + + new_match = self.match_data(match_type, ref.attributes['transcript_id'], ref.attributes[self.gene_attr], shared_bases, reflen, tlen, ref, diff5p, diff3p) + best_match = self.update_match(best_match, new_match) + + return best_match + + def process_entry(self, chunk): + self.locus_counter += 1 + ref_transcripts = [t for t in chunk if t.is_reference] + self.ref_transcript_count += len(ref_transcripts) + input_transcripts = [t for t in chunk if not t.is_reference] + self.input_transcript_count += len(input_transcripts) + if len(input_transcripts) > 0: # Work needs to be done on non-reference transcripts + self.compare_transcripts(input_transcripts, ref_transcripts) + + return + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend classify |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input files:\n\t{}\n".format('\n\t'.join(self.input)) + options_string += " Reference file (-r):\n\t{}\n".format(self.reference) + options_string += " Output file (-o):\n\t{}\n".format(self.output) + options_string += " *** Experiment parameters ***\n" + options_string += " Cluster distance for ends (--end_buffer): {}\n".format(self.end_buffer) + return options_string + + def display_summary(self): + summary = '\n' + summary += "{} loci processed ({} reference transcripts, {} input transcripts).\n".format(self.locus_counter, self.ref_transcript_count, self.input_transcript_count) + return summary + + def file_extension(self, filename): + """Boolean if the file's extension is valid (BED, ELR)""" + split_name = filename.split('.') + if len(split_name) == 1: + return None + else: + extension = split_name[-1].lower() + return extension + + def input_is_valid(self, filename): + """Boolean if the file is a format that Assembler can parse.""" + if self.file_extension(filename) in ['tsv','txt']: + return True + else: + return False + + def navigate_to(self, gene_id): + generator = self.dataset.generate_loci() + for chunk in generator: + if gene_id in [r.attributes[self.gene_attr] for r in chunk]: + return copy.deepcopy(chunk) + + def run(self): + """Executes end labeling on all reads.""" + for chunk in self.generator: + if len(chunk)>0: + self.process_entry(chunk) + + self.output_file.close() + print(self.display_summary()) + + +if __name__ == '__main__': + from argument_parsers import classify_parser as parser + args = vars(parser.parse_args()) + obj = AssemblyClassifier(args) + sys.exit(obj.run()) + diff --git a/build/lib.linux-x86_64-3.7/bookend/core/gtf_ends.py b/build/lib.linux-x86_64-3.7/bookend/core/gtf_ends.py new file mode 100644 index 0000000..d6f8d95 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/gtf_ends.py @@ -0,0 +1,230 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys +import os +import copy +import bookend.core.cython_utils._rnaseq_utils as ru + +class GTFendwriter: + def __init__(self, args): + """Writes the set of nonoverlapping ends in the input annotation as BED features.""" + self.input = args['INPUT'] + self.output = args['OUT'] + self.extend = args['EXTEND'] + self.force = args['FORCE'] + self.name_attr = args['NAME_ATTR'] + self.score = args['SCORE'] + self.gtf_parent = args['GTF_PARENT'] + self.gtf_child = args['GTF_CHILD'] + self.gff_parent = args['GFF_PARENT'] + self.gff_child = args['GFF_CHILD'] + self.parent_key_gene = args['PARENT_ATTR_GENE'] + self.child_key_gene = args['CHILD_ATTR_GENE'] + self.parent_key_transcript = args['PARENT_ATTR_TRANSCRIPT'] + self.child_key_transcript = args['CHILD_ATTR_TRANSCRIPT'] + self.type = args['TYPE'].upper() + self.source = self.input + self.linecount = 0 + self.outlinecount = 0 + if self.output == 'stdout': + self.output_type = 'bed' + self.output_file = 'stdout' + else: + self.output_type = self.file_extension(self.output) + if self.output_type is None or self.output_type not in ['bed', 'bed12']: + self.output += '.bed' + self.output_type = 'bed' + + if self.force or not os.path.exists(self.output): + self.output_file = open(self.output,'w') + else: + print("ERROR: output file already exists") + sys.exit(1) + + config_defaults, gtf_defaults, gff_defaults = self.make_config_dicts() + self.gtf_parent = gtf_defaults['parent_types'] + self.gtf_child = gtf_defaults['child_types'] + self.gff_parent = gff_defaults['parent_types'] + self.gff_child = gff_defaults['child_types'] + self.dataset = ru.AnnotationDataset( + annotation_files=[], + reference=self.input, + config=config_defaults, + gtf_config=gtf_defaults, + gff_config=gff_defaults + ) + self.dataset.source_array = [self.source] + self.generator = self.dataset.generator + self.locus_counter = 0 + self.transcript_counter = 0 + + def run(self): + if self.output != 'stdout': + print(self.display_options()) + + for locus in self.generator: + self.locus_counter += 1 + self.process_locus(locus) + + if self.output != 'stdout': + print(self.display_summary()) + + @staticmethod + def file_extension(filename): + """Boolean if the file's extension is valid (BED, ELR)""" + split_name = filename.split('.') + if len(split_name) == 1: + return None + else: + extension = split_name[-1].lower() + return extension + + def make_config_dicts(self): + """Converts commandline input into three config dicts + to pass to the AnnotationDataset.""" + config_defaults = copy.copy(ru.config_defaults) + gtf_defaults = copy.copy(ru.gtf_defaults) + gff_defaults = copy.copy(ru.gff_defaults) + config_defaults['min_reps'] = 1 + config_defaults['cap_percent'] = 0 + config_defaults['verbose'] = False + if self.gtf_parent: gtf_defaults['parent_types'] = set(self.gtf_parent) + if self.gtf_child: gtf_defaults['child_types'] = set(self.gtf_child) + if self.gff_parent: gff_defaults['parent_types'] = set(self.gff_parent) + if self.gff_child: gff_defaults['child_types'] = set(self.gff_child) + if self.parent_key_transcript is not None: + gtf_defaults['parent_key_transcript'] += self.parent_key_transcript + gff_defaults['parent_key_transcript'] += self.parent_key_transcript + + if self.child_key_transcript is not None: + gtf_defaults['child_key_transcript'] += self.child_key_transcript + gff_defaults['child_key_transcript'] += self.child_key_transcript + + if self.parent_key_gene is not None: + gtf_defaults['parent_key_gene'] = self.parent_key_gene + gff_defaults['parent_key_gene'] = self.parent_key_gene + + if self.child_key_gene is not None: + gtf_defaults['child_key_gene'] = self.child_key_gene + gff_defaults['child_key_gene'] = self.child_key_gene + + return config_defaults, gtf_defaults, gff_defaults + + def process_locus(self, locus): + """Given a chunk of transcripts from an AnnotationDataset, print all as BED12""" + # start/end are tuples (leftmost, rightmost, peak, name) + SP, SM, EP, EM = [], [], [], [] + for transcript in locus: + chrom = self.dataset.chrom_array[transcript.chrom] + self.transcript_counter += 1 + name = transcript.attributes.get(self.name_attr, None) + if name is None: + name = self.transcript_counter + + if transcript.strand == 1: + startname = str(name) + endname = str(name) + if self.extend is None: + pos = transcript.left() + start = (int(transcript.attributes.get('S.left',pos)), int(transcript.attributes.get('S.right',pos)), pos, startname) + pos = transcript.right() + end = (int(transcript.attributes.get('E.left',pos)), int(transcript.attributes.get('E.right',pos)), pos, endname) + else: + pos = transcript.left() + start = (pos-self.extend, pos+self.extend, pos, startname) + pos = transcript.right() + end = (pos-self.extend, pos+self.extend, pos, endname) + + SP.append(start) + EP.append(end) + elif transcript.strand == -1: + startname = str(name) + endname = str(name) + if self.extend is None: + pos = transcript.right() + start = (int(transcript.attributes.get('S.left',pos)), int(transcript.attributes.get('S.right',pos)), pos, startname) + pos = transcript.left() + end = (int(transcript.attributes.get('E.left',pos)), int(transcript.attributes.get('E.right',pos)), pos, endname) + else: + pos = transcript.right() + start = (pos-self.extend, pos+self.extend, pos, startname) + pos = transcript.left() + end = (pos-self.extend, pos+self.extend, pos, endname) + + SM.append(start) + EM.append(end) + + SPout, SMout, EPout, EMout = [], [], [], [] + if self.type in ['ALL','S']: + SPout = self.merge_ends(sorted(SP), 'SP') + SMout = self.merge_ends(sorted(SM), 'SM') + + if self.type in ['ALL','E']: + EPout = self.merge_ends(sorted(EP), 'EP') + EMout = self.merge_ends(sorted(EM), 'EM') + + for bed in sorted([(l,r,'SP:'+name,peak,'+') for l,r,peak,name in SPout] + + [(l,r,'SM:'+name,peak,'-') for l,r,peak,name in SMout] + + [(l,r,'EP:'+name,peak,'+') for l,r,peak,name in EPout] + + [(l,r,'EM:'+name,peak,'-') for l,r,peak,name in EMout]): + self.linecount += 1 + self.output_line('{}\t{}\t{}\t{}\t{}\t{}'.format( + chrom, bed[0], bed[1], bed[2], bed[3], bed[4] + )) + + def merge_ends(self, end_tuples, endtype): + """Given a list of (left, right, peak, name) tuples, + merge into a unique set of nonoverlapping features.""" + peakfunction = {'SP':min, 'SM':max, 'EP':max, 'EM':min}[endtype] + mergelist = [] + if len(end_tuples) > 0: + last_tuple = end_tuples[0] + for i in range(1,len(end_tuples)): + next_tuple = end_tuples[i] + if next_tuple[0] > last_tuple[1]: + mergelist.append(last_tuple) + last_tuple = next_tuple + else: # merge if overlap + last_tuple = ( + min(last_tuple[0],next_tuple[0]), + max(last_tuple[1], next_tuple[1]), + peakfunction(last_tuple[2],next_tuple[2]), + ','.join([last_tuple[3], next_tuple[3]]) + ) + + mergelist.append(last_tuple) + + return mergelist + + def output_line(self, line): + """Takes a list of bed lines and writes + them to the output stream. + """ + if self.output_file == 'stdout': + print(line) + else: + self.output_file.write('{}\n'.format(line.rstrip())) + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend gtf-to-bed |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file: {}\n".format(self.output) + options_string += " *** Parameters ***\n" + options_string += " Name attribute: {}\n".format(self.name_attr) + options_string += " End type: {}\n".format(self.type) + input_type = self.file_extension(self.input) + return options_string + + def display_summary(self): + summary = '\n' + summary += "{} transcripts processed ({} unique ends).\n".format(self.transcript_counter, self.linecount) + return summary + +if __name__ == '__main__': + sys.path.append('../../bookend') + from argument_parsers import gtf_ends_parser as parser + args = vars(parser.parse_args()) + obj = GTFendwriter(args) + sys.exit(obj.run()) diff --git a/build/lib.linux-x86_64-3.7/bookend/core/gtf_merge.py b/build/lib.linux-x86_64-3.7/bookend/core/gtf_merge.py new file mode 100644 index 0000000..00be37a --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/gtf_merge.py @@ -0,0 +1,311 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +import copy +import bookend.core.cython_utils._rnaseq_utils as ru +from bookend.core.cython_utils._fasta_utils import longest_orf +from bookend.core.cython_utils._assembly_utils import Locus +from numpy import argsort +from collections import Counter +from math import ceil +if __name__ == '__main__': + sys.path.append('../../bookend') + +class AnnotationMerger: + def __init__(self, args): + """Parses input arguments for assembly""" + self.args = args + self.output = self.args['OUT'] + self.fasta_out = self.args['FASTA_OUT'] + self.orf_out = self.args['ORF_OUT'] + self.genome = self.args['GENOME'] + self.end_cluster = self.args['END_CLUSTER'] + self.min_reps = self.args['MIN_REPS'] + self.minlen = self.args['MINLEN'] + self.cap_percent = self.args['CAP_PERCENT'] + self.input = self.args['INPUT'] + self.confidence_threshold = self.args['CONFIDENCE'] + self.confidence = ceil(self.confidence_threshold * len(self.input)) + self.verbose = self.args['VERBOSE'] + self.reference = self.args['REFERENCE'] + self.refname = self.args['REFNAME'] + if self.refname is None and self.reference is not None: + self.refname = '.'.join(self.reference.split('/')[-1].split('.')[:-1]) + + if len(self.input) == 0 and self.reference is None: + parser.print_help() + sys.exit(0) + + self.gtf_parent = self.args['GTF_PARENT'] + self.gtf_child = self.args['GTF_CHILD'] + self.gff_parent = self.args['GFF_PARENT'] + self.gff_child = self.args['GFF_CHILD'] + self.refid_parent = self.args['REF_ID_PARENT'] + self.refid_child = self.args['REF_ID_CHILD'] + + if self.input_is_valid(self.output): # Check for valid file extension on output name + self.output_type = self.file_extension(self.output) + self.output_file = open(self.output,'w') + else: + self.output_type = 'gtf' + self.output = self.output + '.gtf' + self.output_file = open(self.output,'w') + + if self.fasta_out: + self.output_file_fasta = open(self.fasta_out, 'w') + + if self.orf_out: + self.output_file_orf = open(self.orf_out, 'w') + + print(self.display_options()) + config_defaults, gtf_defaults, gff_defaults = self.make_config_dicts() + self.dataset = ru.AnnotationDataset( + annotation_files=self.input, + reference=self.reference, + genome_fasta=self.genome, + config=config_defaults, + gtf_config=gtf_defaults, + gff_config=gff_defaults + ) + self.dataset.source_array = [self.refname, 'bookend'] + self.generator = self.dataset.generator + self.locus_counter = 0 + self.new_gene_counter = 0 + self.input_transcripts = 0 + self.transcript_counter = 0 + self.updated_transcript_counter = 0 + + def make_config_dicts(self): + """Converts commandline input into three config dicts + to pass to the AnnotationDataset.""" + config_defaults = copy.copy(ru.config_defaults) + gtf_defaults = copy.copy(ru.gtf_defaults) + gff_defaults = copy.copy(ru.gff_defaults) + config_defaults['min_reps'] = self.min_reps + config_defaults['cap_percent'] = self.cap_percent + config_defaults['verbose'] = self.verbose + if self.gtf_parent: gtf_defaults['parent_types'] = set(self.gtf_parent) + if self.gtf_child: gtf_defaults['child_types'] = set(self.gtf_child) + if self.gff_parent: gff_defaults['parent_types'] = set(self.gff_parent) + if self.gff_child: gff_defaults['child_types'] = set(self.gff_child) + if self.refid_parent is not None: + gff_defaults['parent_key_transcript'] += self.refid_parent + gtf_defaults['parent_key_transcript'] += self.refid_parent + + if self.refid_child is not None: + gff_defaults['child_key_transcript'] += self.refid_child + gtf_defaults['child_key_transcript'] += self.refid_child + + return config_defaults, gtf_defaults, gff_defaults + + def integrate_assemblies_with_reference(self, locus): + """Iterate over the set of filtered transcripts (highest TPM first) + and update the reference by (1) replacement iff ORF is unchanged, + (2) isoform if no containment or if ORF changes, (3) antisense, (4) intergenic. + Updates the list of ref_reads in-place.""" + sort_order = argsort([-t.weight for t in locus.transcripts]) + counts_by_gene = Counter([read.attributes['gene_id'] for read in locus.ref_reads]) + for i in sort_order: + ref_match = sense_match = antisense_match = -1 + transcript = locus.transcripts[i] + if transcript.get_length() <= self.minlen: # Do NOT add to reference + continue + + transcript.attributes['TPM'] = round(transcript.weight,1) + ref_match = locus.matching_ref(transcript) + if ref_match > -1: + # Do identical work + ref = locus.ref_reads[ref_match] + # One final check that transcript is not truncated relative to best match ref + left_change = ref.span[0] - transcript.span[0] + right_change = transcript.span[1] - ref.span[1] + if ref.attributes['source'] == 'reference': # Best match hasn't been altered yet + if left_change >= -self.end_cluster and right_change >= -self.end_cluster and len(ref.ranges) <= len(transcript.ranges): + # left and right borders did not shrink more than end_cluster + # Update matching ref; DO NOT add new item + del transcript.attributes['gene_id'] + del transcript.attributes['transcript_id'] + ref.attributes.update(transcript.attributes) + ref.ranges = transcript.ranges + ref.weight = transcript.weight + ref.capped = transcript.capped + ref.s_tag = transcript.s_tag + ref.e_tag = transcript.e_tag + continue + else: # Too much was lost on the starts/ends + if transcript.capped: # Pass downstream if capped + ref_match = -1 + else: # Discard if uncapped (fragment) + continue + + # Continue search as a potential isoform + sense_match = locus.sense_ref(transcript) + if sense_match > -1: + # Do sense overlap work + ref = locus.ref_reads[sense_match] + gene_id = ref.attributes['gene_id'] + counts_by_gene[gene_id] += 1 + transcript_count = counts_by_gene[gene_id] + transcript_id = '{}.B{}'.format(gene_id, transcript_count) + transcript.attributes['gene_id'] = gene_id + transcript.attributes['transcript_id'] = transcript_id + else: + # Continue search as a potential antisense RNA + antisense_match = locus.antisense_ref(transcript) + if antisense_match > -1: + # Do antisense work + ref = locus.ref_reads[antisense_match] + gene_id = ref.attributes['gene_id']+'_AS' + counts_by_gene[gene_id] += 1 + transcript_count = counts_by_gene[gene_id] + transcript_id = '{}.B{}'.format(gene_id, transcript_count) + transcript.attributes['gene_id'] = gene_id + transcript.attributes['transcript_id'] = transcript_id + + if ref_match == -1 and sense_match == -1 and antisense_match == -1: + # Do novel transcript work + self.new_gene_counter += 1 + gene_id = 'BOOKEND_{}'.format(self.new_gene_counter) + counts_by_gene[gene_id] += 1 + transcript_count = counts_by_gene[gene_id] + transcript_id = '{}.B{}'.format(gene_id, transcript_count) + transcript.attributes['gene_id'] = gene_id + transcript.attributes['transcript_id'] = transcript_id + + locus.ref_reads.append(transcript) + + return sorted(locus.ref_reads) + + def output_transcripts(self, transcript, output_type): + """Writes the RNAseqMapping object 'transcript' to an output stream, + formatted as output_type.""" + if output_type == 'elr': + output_line = transcript.write_as_elr() + elif output_type == 'bed': + output_line = transcript.write_as_bed(self.dataset.chrom_array, self.dataset.source_array, score_column='weight', name_attr='transcript_id') + elif output_type == 'gtf': + output_line = transcript.write_as_gtf(self.dataset.chrom_array, self.dataset.source_array[transcript.source]) + + self.output_file.write(output_line+'\n') + + def make_annotation_locus(self, chunk): + locus = Locus( + chrom=chunk[0].chrom, + chunk_number=self.locus_counter, + list_of_reads=chunk, + max_gap=0, + end_cluster=self.end_cluster, + min_overhang=0, + reduce=False, + minimum_proportion=0, + min_intron_length=1, + antisense_filter=0, + cap_bonus=1, + cap_filter=0, + complete=False, + verbose=self.verbose, + naive=True, + intron_filter=0, + ignore_ends=False, + allow_incomplete=True, + require_cap=False + ) + return locus + + def process_entry(self, chunk): + self.locus_counter += 1 + locus = self.make_annotation_locus(chunk) + if locus: # Work needs to be done on non-reference transcripts + locus.filter_fused_and_truncated_annotations() + merged_annotations = self.integrate_assemblies_with_reference(locus) + elif locus is not None: + merged_annotations = locus.ref_reads + else: + return + + for transcript in merged_annotations: + self.transcript_counter += 1 + if transcript.attributes['source'] == 'reference': + transcript.attributes['source'] = self.refname + transcript.source = 0 + del transcript.attributes['TPM'] + else: + self.updated_transcript_counter += 1 + transcript.source = 1 + + if self.fasta_out or self.orf_out: + fasta_sequence = self.dataset.get_transcript_fasta(transcript) + transcript.attributes['transcript_length'] = len(fasta_sequence) + + if self.fasta_out: + self.output_file_fasta.write('>{}\n{}\n'.format(transcript.attributes['transcript_id'], fasta_sequence)) + + if self.orf_out: + orf, pos, stopless = longest_orf(fasta_sequence) + + if stopless: + transcript.attributes['orf_length'] = 0 + else: + transcript.attributes['orf_length'] = len(orf) + self.output_file_orf.write('>{}\n{}\n'.format(transcript.attributes['transcript_id'], orf)) + + self.output_transcripts(transcript, self.output_type) + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend merge |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input files:\n\t{}\n".format('\n\t'.join(self.input)) + options_string += " Reference file (-r):\n\t{}\n".format(self.reference) + options_string += " Output file (-o):\n\t{}\n".format(self.output) + options_string += " *** Experiment parameters ***\n" + options_string += " Cluster distance for ends (--end_cluster): {}\n".format(self.end_cluster) + options_string += " *** Filters ***\n" + options_string += " Copies needed to keep assembly (--min_reps): {}\n".format(self.min_reps) + options_string += " Min % 5'G reads (--cap_percent): {}\n".format(self.cap_percent) + return options_string + + def display_summary(self): + summary = '\n' + summary += "{} loci processed ({} total input transcripts).\n".format(self.locus_counter, self.input_transcripts) + summary += "{} transcripts written.\n".format(self.transcript_counter) + return summary + + def file_extension(self, filename): + """Boolean if the file's extension is valid (BED, ELR)""" + split_name = filename.split('.') + if len(split_name) == 1: + return None + else: + extension = split_name[-1].lower() + return extension + + def input_is_valid(self, filename): + """Boolean if the file is a format that Assembler can parse.""" + if self.file_extension(filename) in ['bed','bed12','elr','gtf','gff3','gff']: + return True + else: + return False + + def navigate_to(self, gene_id): + generator = self.dataset.generate_loci() + for chunk in generator: + if gene_id in [r.attributes['gene_id'] for r in chunk]: + return copy.deepcopy(chunk) + + def run(self): + """Executes end labeling on all reads.""" + for chunk in self.generator: + if len(chunk) > 0: + self.process_entry(chunk) + + self.output_file.close() + print(self.display_summary()) + + +if __name__ == '__main__': + from argument_parsers import merge_parser as parser + args = vars(parser.parse_args()) + obj = AnnotationMerger(args) + sys.exit(obj.run()) + diff --git a/build/lib.linux-x86_64-3.7/bookend/core/gtf_to_bed.py b/build/lib.linux-x86_64-3.7/bookend/core/gtf_to_bed.py new file mode 100644 index 0000000..9cb6729 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/gtf_to_bed.py @@ -0,0 +1,201 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +import sys +import os +import copy +import bookend.core.cython_utils._rnaseq_utils as ru + +class GTFconverter: + def __init__(self, args): + """Converts each transcript of GTF or GFF3 formatted input to BED12 or ELR""" + self.input = args['INPUT'] + self.output = args['OUT'] + self.score = args['SCORE'] + self.force = args['FORCE'] + self.gtf_parent = args['GTF_PARENT'] + self.gtf_child = args['GTF_CHILD'] + self.gff_parent = args['GFF_PARENT'] + self.gff_child = args['GFF_CHILD'] + self.parent_key_gene = args['PARENT_ATTR_GENE'] + self.child_key_gene = args['CHILD_ATTR_GENE'] + self.parent_key_transcript = args['PARENT_ATTR_TRANSCRIPT'] + self.child_key_transcript = args['CHILD_ATTR_TRANSCRIPT'] + self.color_key = args['COLOR_KEY'] + self.name_attr = args['NAME_ATTR'] + self.extend = args['EXTEND'] + self.source = args['SOURCE'] + if self.source is None: + self.source = self.input + + if self.color_key is None: + self.color_code = ru.gtf_colorcode + self.color_key = 'anno_type' + elif args['COLOR_CODE'] is not None: + self.color_code = self.parse_color_code(args['COLOR_CODE']) + else: + self.color_code = ru.gtf_colorcode + + self.linecount = 0 + self.outlinecount = 0 + + if self.output == 'stdout': + self.output_type = 'bed' + self.output_file = 'stdout' + else: + self.output_type = self.file_extension(self.output) + if self.output_type is None or self.output_type not in ['bed', 'bed12', 'elr']: + self.output += '.bed' + self.output_type = 'bed' + + if self.force or not os.path.exists(self.output): + self.output_file = open(self.output,'w') + else: + print("ERROR: output file already exists") + sys.exit(1) + + config_defaults, gtf_defaults, gff_defaults = self.make_config_dicts() + self.gtf_parent = gtf_defaults['parent_types'] + self.gtf_child = gtf_defaults['child_types'] + self.gff_parent = gff_defaults['parent_types'] + self.gff_child = gff_defaults['child_types'] + self.dataset = ru.AnnotationDataset( + annotation_files=[], + reference=self.input, + config=config_defaults, + gtf_config=gtf_defaults, + gff_config=gff_defaults + ) + self.dataset.source_array = [self.source] + self.generator = self.dataset.generator + self.locus_counter = 0 + self.transcript_counter = 0 + # print(args) + + def run(self): + if self.output != 'stdout': + print(self.display_options()) + + if self.output_type == 'elr': + self.output_file.write('\n'.join(self.dataset.dump_header())+'\n') + + for locus in self.generator: + self.locus_counter += 1 + self.process_locus(locus) + + if self.output != 'stdout': + print(self.display_summary()) + + @staticmethod + def file_extension(filename): + """Boolean if the file's extension is valid (BED, ELR)""" + split_name = filename.split('.') + if len(split_name) == 1: + return None + else: + extension = split_name[-1].lower() + return extension + + @staticmethod + def parse_color_code(filename): + f = open(filename) + lines = f.read() + f.close() + pairs = [l.split('\t') for l in lines.rstrip().split('\n')] + return {k:v for k,v in pairs} + + def make_config_dicts(self): + """Converts commandline input into three config dicts + to pass to the AnnotationDataset.""" + config_defaults = copy.copy(ru.config_defaults) + gtf_defaults = copy.copy(ru.gtf_defaults) + gff_defaults = copy.copy(ru.gff_defaults) + config_defaults['min_reps'] = 1 + config_defaults['cap_percent'] = 0 + config_defaults['verbose'] = False + if self.gtf_parent: gtf_defaults['parent_types'] = set(self.gtf_parent) + if self.gtf_child: gtf_defaults['child_types'] = set(self.gtf_child) + if self.gff_parent: gff_defaults['parent_types'] = set(self.gff_parent) + if self.gff_child: gff_defaults['child_types'] = set(self.gff_child) + if self.parent_key_transcript is not None: + gtf_defaults['parent_key_transcript'] += self.parent_key_transcript + gff_defaults['parent_key_transcript'] += self.parent_key_transcript + + if self.child_key_transcript is not None: + gtf_defaults['child_key_transcript'] += self.child_key_transcript + gff_defaults['child_key_transcript'] += self.child_key_transcript + + if self.parent_key_gene is not None: + gtf_defaults['parent_key_gene'] = self.parent_key_gene + gff_defaults['parent_key_gene'] = self.parent_key_gene + + if self.child_key_gene is not None: + gtf_defaults['child_key_gene'] = self.child_key_gene + gff_defaults['child_key_gene'] = self.child_key_gene + + return config_defaults, gtf_defaults, gff_defaults + + def process_locus(self, locus): + """Given a chunk of transcripts from an AnnotationDataset, print all as BED12""" + for mapping_object in locus: + self.transcript_counter += 1 + mapping_object.source = 0 + if self.output_type == 'elr': + endweights = 'S.reads' in mapping_object.attributes.keys() + condense = not endweights + out_string = mapping_object.write_as_elr(condense=condense, endweights=endweights) + else: + score_column = mapping_object.attributes.get(self.score, '.') + color = self.color_code.get(mapping_object.attributes.get(self.color_key, '.'), '80,80,80') + longStart, longEnd = None, None + if self.extend: + if mapping_object.strand == 1: + longStart = int(mapping_object.attributes['S.left']) if 'S.left' in mapping_object.attributes else None + longEnd = int(mapping_object.attributes['E.right']) if 'E.right' in mapping_object.attributes else None + elif mapping_object.strand == -1: + longStart = int(mapping_object.attributes['E.left']) if 'E.left' in mapping_object.attributes else None + longEnd = int(mapping_object.attributes['S.right']) if 'S.right' in mapping_object.attributes else None + + out_fields = mapping_object.write_as_bed(self.dataset.chrom_array, ['.','.'], as_string=False, score_column=score_column, name_attr=self.name_attr, color=color, longStart=longStart, longEnd = longEnd) + out_string = '\t'.join([str(f) for f in out_fields[:12]]) + + self.output_line(out_string) + + + def output_line(self, line): + """Takes a list of bed lines and writes + them to the output stream. + """ + if self.output_file == 'stdout': + print(line) + else: + self.output_file.write('{}\n'.format(line.rstrip())) + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend gtf-to-bed |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file: {}\n".format(self.output) + options_string += " *** Parameters ***\n" + options_string += " Score column attribute: {}\n".format(self.score) + input_type = self.file_extension(self.input) + if input_type == 'gtf': + options_string += " Parent elements (GTF): {}\n".format(self.gtf_parent) + options_string += " Child elements (GTF): {}\n".format(self.gtf_child) + elif input_type in ['gff','gff3']: + options_string += " Parent elements (GFF3): {}\n".format(self.gff_parent) + options_string += " Child elements (GFF3): {}\n".format(self.gff_child) + + return options_string + + def display_summary(self): + summary = '\n' + summary += "{} loci processed ({} total transcripts).\n".format(self.locus_counter, self.transcript_counter) + return summary + +if __name__ == '__main__': + sys.path.append('../../bookend') + from argument_parsers import gtf_to_bed_parser as parser + args = vars(parser.parse_args()) + obj = GTFconverter(args) + sys.exit(obj.run()) diff --git a/build/lib.linux-x86_64-3.7/bookend/core/sam_sj_out.py b/build/lib.linux-x86_64-3.7/bookend/core/sam_sj_out.py new file mode 100644 index 0000000..4809f94 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/sam_sj_out.py @@ -0,0 +1,130 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +import pysam +if __name__ == '__main__': + sys.path.append('../../bookend') + +from bookend.core.cython_utils._rnaseq_utils import RNAseqDataset, get_flank +from bookend.core.sj_merge import SJobject + +class SAMtoSJconverter: + def __init__(self, args): + """Generates an SJ.out.tab file with splice junction information from a SAM file.""" + self.junction_types = {'GTAG':1, 'CTAC':2, 'GCAG':3, 'CTGC':4, 'ATAC':5, 'GTAT':6} + self.fasta = args['FASTA'] + self.format = args['FORMAT'] + self.filter = args['FILTER'] + self.input = args['INPUT'] + self.sj_dict = {} + save = pysam.set_verbosity(0) + self.sam_in = pysam.AlignmentFile(self.input) + save = pysam.set_verbosity(save) + self.dataset = RNAseqDataset( + chrom_array=self.sam_in.header.references, + chrom_lengths=list(self.sam_in.header.lengths), + source_array=['SAM'], + genome_fasta=self.fasta + ) + + self.generator = self.generate_bam_entries() + + def run(self): + print(self.display_options()) + for entry in self.generator: + self.add_entry_to_sj_dict(entry) + + self.write_sj_dict_to_file() + print(self.display_summary()) + + def write_sj_dict_to_file(self): + outfile_name = self.input+'.SJ.out.tab' + output_file = open(outfile_name, 'w') + for sj in sorted(list(self.sj_dict.items())): + output_file.write(sj.as_string(self.format)) + + output_file.close() + + def generate_bam_entries(self): + """Group all BAM lines with the same read ID + and yield them as a list of pysam objects""" + current_ID = None + bam_lines = [] + for line in self.sam_in: + ID = line.query_name + if ID == current_ID or current_ID is None: + bam_lines.append(line) + current_ID = ID + else: + yield bam_lines + bam_lines = [line] + current_ID = ID + + yield bam_lines + + def get_junction_type(self, chrom, left, right): + """ Returns the sequence motif ID for a splice junction based + on the flanking genomic sequence.""" + flanking_sequence = get_flank(self.dataset.genome, chrom, left-1, '+', 'E', 2) + get_flank(self.dataset.genome, chrom, right, '+', 'S', 2) + flanking_sequence = flanking_sequence.upper() + jtype = self.junction_types.get(flanking_sequence,0) + return jtype + + def add_entry_to_sj_dict(self, entry): + """Extract all splice junctions from the read(s) of a SAM entry""" + try: + Nmap = int(entry[0].get_tag('NH')) + except KeyError: + if entry[0].is_paired: + Nmap = int(len(entry)*0.5) + else: + Nmap = len(entry) + + if Nmap > 1: # multimapper + unique, multi = 0, 1 + elif Nmap == 1: # unique mapper + unique, multi = 1, 0 + + self.dataset.add_read_from_BAM(entry) + read = self.dataset.read_list.pop() + chrom = self.dataset.chrom_array[read.chrom] + strand = 2 if read.strand == -1 else read.strand + junctions = read.junctions() + for i in range(len(junctions)): + l,r = junctions[i] + minoverhang = min([l-read.ranges[i][0], read.ranges[i+1][1]-r]) + motif = self.get_junction_type(chrom, l, r) + if self.filter and motif not in [1,2]: + continue + + SJ_line = '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format( + chrom, l+1, r, strand, motif, 0, unique, multi, minoverhang + ) + sj = SJobject(SJ_line, 'star') + if sj.hash in self.sj_dict: + self.sj_dict[sj.hash].merge(sj) + else: + self.sj_dict[sj.hash] = sj + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend index-fasta |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Genome FASTA: {}\n".format(self.fasta) + options_string += " *** Parameters ***\n" + options_string += " Output format: {}\n".format(self.format) + options_string += " Canonical SJ only: {}\n".format(self.bridge_min) + return options_string + + def display_summary(self): + summary_string = '' + summary_string += 'Splice junctions written to {}.\n'.format(self.input+'.SJ.out.tab') + + return summary_string + +if __name__ == '__main__': + from argument_parsers import sam_sj_parser as parser + args = vars(parser.parse_args()) + obj = SAMtoSJconverter(args) + sys.exit(obj.run()) \ No newline at end of file diff --git a/build/lib.linux-x86_64-3.7/bookend/core/sj_merge.py b/build/lib.linux-x86_64-3.7/bookend/core/sj_merge.py new file mode 100644 index 0000000..2353520 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/sj_merge.py @@ -0,0 +1,173 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +if __name__ == '__main__': + sys.path.append('../../bookend') + +class SJobject: + def __init__(self, line, linetype=None): + """Parses a line of SJ.out.tab or SJ.bed to an SJ object. + O-indexed open coordinates.""" + fields = line.rstrip().split('\t') + if linetype is None: + if len(fields) == 9: + linetype = 'star' + else: + linetype = 'bed' + + self.count = 1 + self.linetype = linetype + self.chrom = fields[0] + self.end = int(fields[2]) + if linetype == 'star': + self.start = int(fields[1]) - 1 + self.strand = ['.', '+', '-'][int(fields[3])] + self.motif = fields[4] + self.new = fields[5] == '0' + self.unique = int(fields[6]) + self.multi = int(fields[7]) + self.overhang = int(fields[8]) + self.name = None + else: + self.start = int(fields[1]) + self.strand = fields[5] + self.motif = 0 + self.new = True + self.unique = int(fields[4]) + self.multi = 0 + self.overhang = 0 + self.name = fields[3] + + self.hash = '{}_{}_{}_{}'.format(self.chrom, self.start, self.end, self.strand) + self.comparator = (self.chrom, self.start, self.end) + + def __eq__(self, other): return self.comparator == other.comparator + def __gt__(self, other): return self.comparator > other.comparator + def __ge__(self, other): return self.comparator >= other.comparator + def __lt__(self, other): return self.comparator < other.comparator + def __le__(self, other): return self.comparator <= other.comparator + def __ne__(self, other): return self.comparator != other.comparator + + def merge(self, other): + """Combines the information of two compatible SJ entries""" + if self.hash == other.hash: + self.count += other.count + self.unique += other.unique + self.multi += other.multi + self.overhang = max(self.overhang, other.overhang) + if self.name is None: + self.name = other.name + + def as_string(self, linetype='star'): + """Writes the SJobject as a SJ.out.tab or SJ.bed format""" + if linetype == 'star': + return '{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\t{}\n'.format( + self.chrom, self.start+1, self.end, + {'.':0, '+':1, '-':2}[self.strand], + self.motif, + 0 if self.new else 1, + self.unique, + self.multi, + self.overhang + ) + else: + return '{}\t{}\t{}\t{}\t{}\t{}\n'.format( + self.chrom, self.start, self.end, self.name, self.unique+self.multi, self.strand + ) + +class SJmerger: + def __init__(self, args): + ''' + Merges any number of 'SJ.out.tab' files (output from the STAR aligner), + or any number of 'SJ.bed' files (--sj_out output from sam_calculate_coverages.py). + Outputs to stdout. + Description of SJ.out.tab, from Star Manual 2.5.1a, copyright Alexander Dobin 2016: + SJ.out.tab contains high confidence collapsed splice junctions in tab-delimited format. Note that + STAR defines the junction start/end as intronic bases, while many other software define them as + exonic bases. The columns have the following meaning: + column 1: chromosome + column 2: first base of the intron (1-based) + column 3: last base of the intron (1-based) + column 4: strand (0: undefined, 1: +, 2: -) + column 5: intron motif: 0: non-canonical; 1: GT/AG, 2: CT/AC, 3: GC/AG, 4: CT/GC, 5: + AT/AC, 6: GT/AT + column 6: 0: unannotated, 1: annotated (only if splice junctions database is used) + column 7: number of uniquely mapping reads crossing the junction + column 8: number of multi-mapping reads crossing the junction + column 9: maximum spliced alignment overhang + + Description of SJ.bed: + column 1: chromosome + column 2: leftmost base of intron + column 3: rightmost base of intron + column 4: name (not used) + column 5: hit-normalized read depth + column 6: strand (+, -, or .) + + File type is inferred from the number of columns + in the first line of the first file. + ''' + self.input = args['INPUT'] + self.output = args['OUT'] + self.min_unique = args['MIN_UNIQUE'] + self.min_reps = args['MIN_REPS'] + self.format = args['FORMAT'] + self.new = args['NEW'] + self.sj_dict = {} + + def run(self): + print(self.display_options()) + for sj_file in self.input: + self.add_sj_file_to_dict(sj_file) + + self.write_sj_dict_to_file() + + def add_sj_file_to_dict(self, sj_file): + filetype = None + sjf = open(sj_file) + for line in sjf: + sj = SJobject(line, filetype) + if filetype is None: + filetype = sj.linetype + + if sj.hash in self.sj_dict: + self.sj_dict[sj.hash].merge(sj) + else: + self.sj_dict[sj.hash] = sj + + sjf.close() + + def write_sj_dict_to_file(self): + outfile_name = self.output + if self.format == 'star' and not outfile_name.endswith('.SJ.out.tab'): + outfile_name += '.SJ.out.tab' + elif self.format == 'bed' and not outfile_name.endswith('.bed'): + outfile_name += '.bed' + + output_file = open(outfile_name, 'w') + for sj_hash, sj in sorted(list(self.sj_dict.items())): + if self.new and not sj.new: continue + if sj.count < self.min_reps: continue + if sj.unique < self.min_unique: continue + output_file.write(sj.as_string(self.format)) + + output_file.close() + + def display_options(self): + """Returns a string describing all input args""" + options_string = "\n/| bookend merge-sj |\\\n¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯\n" + options_string += " Input file: {}\n".format(self.input) + options_string += " Output file: {}\n".format(self.output) + options_string += " *** Parameters ***\n" + options_string += " Output format: {}\n".format(self.format) + options_string += " Min unique: {}\n".format(self.min_unique) + options_string += " Min reps: {}\n".format(self.min_reps) + options_string += " Only new SJs: {}\n".format(self.new) + return options_string + +if __name__ == '__main__': + from argument_parsers import sj_merge_parser as parser + args = vars(parser.parse_args()) + obj = SJmerger(args) + sys.exit(obj.run()) diff --git a/build/lib.linux-x86_64-3.7/bookend/core/sj_to_bed.py b/build/lib.linux-x86_64-3.7/bookend/core/sj_to_bed.py new file mode 100644 index 0000000..32ffd24 --- /dev/null +++ b/build/lib.linux-x86_64-3.7/bookend/core/sj_to_bed.py @@ -0,0 +1,34 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- + +import sys +if __name__ == '__main__': + sys.path.append('../../bookend') + +class SJtoBEDconverter: + def __init__(self, args): + """Converts an SJ.out.tab to an SJ.bed file.""" + self.input = args['INPUT'] + self.output = args['OUT'] + + def run(self): + counter=0 + output_file = open(self.output, 'w') + for line in open(self.input): + counter+=1 + l=line.rstrip().split('\t') + reads = str(int(l[6])+int(l[7])) + if l[3]=='1': + outline = '\t'.join([l[0],str(int(l[1])-1),l[2],'SJ.'+str(counter),reads,'+']) + elif l[3]=='2': + outline = '\t'.join([l[0],str(int(l[1])-1),l[2],'SJ.'+str(counter),reads,'-']) + + output_file.write(outline+'\n') + + output_file.close() + +if __name__ == '__main__': + from argument_parsers import sj_to_bed_parser as parser + args = vars(parser.parse_args()) + obj = SJtoBEDconverter(args) + sys.exit(obj.run()) diff --git a/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_assembly_utils.o b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_assembly_utils.o new file mode 100644 index 0000000..566e58f Binary files /dev/null and b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_assembly_utils.o differ diff --git a/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_element_graph.o b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_element_graph.o new file mode 100644 index 0000000..ee39ee1 Binary files /dev/null and b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_element_graph.o differ diff --git a/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_fasta_utils.o b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_fasta_utils.o new file mode 100644 index 0000000..b5e66bc Binary files /dev/null and b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_fasta_utils.o differ diff --git a/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_pq.o b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_pq.o new file mode 100644 index 0000000..2d09fcf Binary files /dev/null and b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_pq.o differ diff --git a/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_rnaseq_utils.o b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_rnaseq_utils.o new file mode 100644 index 0000000..5db1de1 Binary files /dev/null and b/build/temp.linux-x86_64-3.7/bookend/core/cython_utils/_rnaseq_utils.o differ diff --git a/dist/bookend_rna-1.1.0-py3.7-linux-x86_64.egg b/dist/bookend_rna-1.1.0-py3.7-linux-x86_64.egg index 0766eb0..a9368fe 100644 Binary files a/dist/bookend_rna-1.1.0-py3.7-linux-x86_64.egg and b/dist/bookend_rna-1.1.0-py3.7-linux-x86_64.egg differ