diff -Nru htseq-0.10.0/debian/changelog htseq-0.11.2/debian/changelog --- htseq-0.10.0/debian/changelog 2018-11-03 16:34:46.000000000 +0000 +++ htseq-0.11.2/debian/changelog 2019-01-11 22:31:53.000000000 +0000 @@ -1,14 +1,12 @@ -htseq (0.10.0-1build2) disco; urgency=medium +htseq (0.11.2-1) unstable; urgency=medium - * No-change rebuild to build without python3.6 support. + * New upstream version + * debhelper 12 + * Standards-Version: 4.3.0 + * Secure URI in copyright format + * Drop ancient X-Python-Version field - -- Matthias Klose Sat, 03 Nov 2018 16:34:46 +0000 - -htseq (0.10.0-1build1) cosmic; urgency=medium - - * No change rebuild to add support for Python 3.7. - - -- Michael Hudson-Doyle Fri, 10 Aug 2018 14:56:38 +1200 + -- Andreas Tille Fri, 11 Jan 2019 23:31:53 +0100 htseq (0.10.0-1) unstable; urgency=medium diff -Nru htseq-0.10.0/debian/compat htseq-0.11.2/debian/compat --- htseq-0.10.0/debian/compat 2018-05-28 15:26:34.000000000 +0000 +++ htseq-0.11.2/debian/compat 2019-01-11 22:31:53.000000000 +0000 @@ -1 +1 @@ -11 +12 diff -Nru htseq-0.10.0/debian/control htseq-0.11.2/debian/control --- htseq-0.10.0/debian/control 2018-05-28 15:26:34.000000000 +0000 +++ htseq-0.11.2/debian/control 2019-01-11 22:31:53.000000000 +0000 @@ -5,7 +5,7 @@ Section: python Testsuite: autopkgtest-pkg-python Priority: optional -Build-Depends: debhelper (>= 11~), +Build-Depends: debhelper (>= 12~), python-debian, python-setuptools, python-all-dev, @@ -21,12 +21,10 @@ swig, cython, cython3 -Standards-Version: 4.1.4 +Standards-Version: 4.3.0 Vcs-Browser: https://salsa.debian.org/med-team/htseq Vcs-Git: https://salsa.debian.org/med-team/htseq.git Homepage: http://www-huber.embl.de/users/anders/HTSeq/doc/overview.html -X-Python-Version: >= 2.7 -X-Python3-Version: >= 3.4 Package: python-htseq Architecture: any diff -Nru htseq-0.10.0/debian/copyright htseq-0.11.2/debian/copyright --- htseq-0.10.0/debian/copyright 2018-05-28 15:26:34.000000000 +0000 +++ htseq-0.11.2/debian/copyright 2019-01-11 22:31:53.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: HTSeq Upstream-Contact: Simon Anders Source: https://pypi.python.org/pypi/HTSeq/ diff -Nru htseq-0.10.0/HTSeq.egg-info/PKG-INFO htseq-0.11.2/HTSeq.egg-info/PKG-INFO --- htseq-0.10.0/HTSeq.egg-info/PKG-INFO 2018-05-11 04:57:42.000000000 +0000 +++ htseq-0.11.2/HTSeq.egg-info/PKG-INFO 2019-01-08 02:42:22.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: HTSeq -Version: 0.10.0 +Version: 0.11.2 Summary: A framework to process and analyze data from high-throughput sequencing (HTS) assays Home-page: https://github.com/simon-anders/htseq Author: Simon Anders diff -Nru htseq-0.10.0/PKG-INFO htseq-0.11.2/PKG-INFO --- htseq-0.10.0/PKG-INFO 2018-05-11 04:57:42.000000000 +0000 +++ htseq-0.11.2/PKG-INFO 2019-01-08 02:42:23.000000000 +0000 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: HTSeq -Version: 0.10.0 +Version: 0.11.2 Summary: A framework to process and analyze data from high-throughput sequencing (HTS) assays Home-page: https://github.com/simon-anders/htseq Author: Simon Anders diff -Nru htseq-0.10.0/python2/HTSeq/__init__.py htseq-0.11.2/python2/HTSeq/__init__.py --- htseq-0.10.0/python2/HTSeq/__init__.py 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python2/HTSeq/__init__.py 2019-01-08 02:36:23.000000000 +0000 @@ -7,21 +7,14 @@ import warnings import os import shlex +import sys -try: - from _HTSeq import * -except ImportError: - if os.path.isfile("setup.py"): - raise ImportError("Cannot import 'HTSeq' when working directory is HTSeq's own build directory.") - else: - raise +from _HTSeq import * from _version import __version__ -#from vcf_reader import * - ######################### -## Utils +# Utils ######################### @@ -82,7 +75,7 @@ ######################### -## Features +# Features ######################### class GenomicFeature(object): @@ -137,9 +130,10 @@ sep = "=" else: sep = " " - attr_str = '; '.join(['%s%s\"%s\"' % (ak, sep, attr[ak]) for ak in attr]) + attr_str = '; '.join( + ['%s%s\"%s\"' % (ak, sep, attr[ak]) for ak in attr]) return "\t".join(str(a) for a in (self.iv.chrom, source, - self.type, self.iv.start+1, self.iv.end, score, + self.type, self.iv.start + 1, self.iv.end, score, self.iv.strand, frame, attr_str)) + "\n" @@ -151,24 +145,27 @@ """Parses a GFF attribute string and returns it as a dictionary. If 'extra_return_first_value' is set, a pair is returned: the dictionary - and the value of the first attribute. This might be useful if this is the ID. + and the value of the first attribute. This might be useful if this is the + ID. """ if attrStr.endswith("\n"): attrStr = attrStr[:-1] d = {} first_val = "_unnamed_" - for (i, attr) in itertools.izip(itertools.count(), _HTSeq.quotesafe_split(attrStr)): + for (i, attr) in itertools.izip( + itertools.count(), + _HTSeq.quotesafe_split(attrStr)): if _re_attr_empty.match(attr): continue if attr.count('"') not in (0, 2): - raise ValueError("The attribute string seems to contain mismatched quotes.") + raise ValueError( + "The attribute string seems to contain mismatched quotes.") mo = _re_attr_main.match(attr) if not mo: raise ValueError("Failure parsing GFF attribute line") val = mo.group(2) if val.startswith('"') and val.endswith('"'): val = val[1:-1] - # val = urllib.unquote(val) d[intern(mo.group(1))] = intern(val) if extra_return_first_value and i == 0: first_val = val @@ -210,9 +207,15 @@ strand, frame, attributeStr) = line.split("\t", 8) (attr, name) = parse_GFF_attribute_string(attributeStr, True) if self.end_included: - iv = GenomicInterval(seqname, int(start)-1, int(end), strand) + iv = GenomicInterval( + seqname, + int(start) - 1, int(end), + strand) else: - iv = GenomicInterval(seqname, int(start)-1, int(end)-1, strand) + iv = GenomicInterval( + seqname, + int(start) - 1, int(end) - 1, + strand) f = GenomicFeature(name, feature, iv) if score != ".": score = float(score) @@ -224,6 +227,7 @@ f.attr = attr yield f + def make_feature_dict(feature_sequence): """A feature dict is a convenient way to organize a sequence of Feature object (which you have got, e.g., from parse_GFF). @@ -260,16 +264,17 @@ ######################### -## GenomicArray +# GenomicArray ######################### def read_chrom_lens(filename, delimiter="\t"): - return dict(((chrom, int(len)) - for chrom, len in csv.reader(open(filename), delimiter=delimiter))) + return dict( + ((chrom, int(len)) + for chrom, len in csv.reader(open(filename), delimiter=delimiter))) ######################### -## Sequence readers +# Sequence readers ######################### _re_fasta_header_line = re.compile(r'>\s*(\S+)\s*(.*)') @@ -286,87 +291,96 @@ self.raw_iterator = raw_iterator def __iter__(self): - seq = None - for line in FileOrSequence.__iter__(self): - if line.startswith(">"): - if seq: - if self.raw_iterator: - s = (seq, name, descr) - else: - s = Sequence(seq, name) - s.descr = descr - yield s - mo = _re_fasta_header_line.match(line) - name = mo.group(1) - descr = mo.group(2) - seq = "" - else: - assert seq is not None, "FASTA file does not start with '>'." - seq += line[:-1] - if seq is not None: - if self.raw_iterator: - s = (seq, name, descr) - else: - s = Sequence(seq, name) - s.descr = descr - yield s + seq = None + name = None + descr = None + for line in FileOrSequence.__iter__(self): + if line.startswith(">"): + if seq: + if self.raw_iterator: + s = (seq, name, descr) + else: + s = Sequence(seq, name) + s.descr = descr + yield s + mo = _re_fasta_header_line.match(line) + name = mo.group(1) + descr = mo.group(2) + seq = "" + else: + assert seq is not None, "FASTA file does not start with '>'." + seq += line[:-1] + if seq is not None: + if self.raw_iterator: + s = (seq, name, descr) + else: + s = Sequence(seq, name) + s.descr = descr + yield s def get_sequence_lengths(self): - seqname = None - seqlengths = {} - for line in FileOrSequence.__iter__(self): - if line.startswith(">"): - if seqname is not None: - seqlengths[ seqname ] = length - mo = _re_fasta_header_line.match(line) - seqname = mo.group(1) - length = 0 - else: - assert seqname is not None, "FASTA file does not start with '>'." - length += len(line.rstrip()) - if seqname is not None: - seqlengths[ seqname ] = length - return seqlengths + seqname = None + length = 0 + seqlengths = {} + for line in FileOrSequence.__iter__(self): + if line.startswith(">"): + if seqname is not None: + seqlengths[seqname] = length + mo = _re_fasta_header_line.match(line) + seqname = mo.group(1) + length = 0 + else: + assert seqname is not None, "FASTA file does not start with '>'." + length += len(line.rstrip()) + if seqname is not None: + seqlengths[seqname] = length + return seqlengths @staticmethod def _import_pysam(): - global pysam - try: - import pysam - except ImportError: - sys.stderr.write("Please install the 'pysam' package to be able to use the Fasta indexing functionality.") - raise - - def build_index(self, force = False): - self._import_pysam() - if not isinstance(self.fos, str): - raise TypeError, "This function only works with FastaReader objects " + \ - "connected to a fasta file via file name" - index_filename = self.fos + ".fai" - if os.access(index_filename, os.R_OK): - if (not force) and os.stat(self.filename_or_sequence).st_mtime <= \ - os.stat(index_filename).st_mtime: - # index is up to date - return - pysam.faidx(self.fos) - if not os.access(index_filename, os.R_OK): - raise SystemError, "Building of Fasta index failed due to unknown error." + global pysam + try: + import pysam + except ImportError: + sys.stderr.write( + "Please install the 'pysam' package to be able to use the Fasta indexing functionality.") + raise + + def build_index(self, force=False): + self._import_pysam() + if not isinstance(self.fos, str): + raise TypeError( + "This function only works with FastaReader objects " + + "connected to a fasta file via file name") + index_filename = self.fos + ".fai" + if os.access(index_filename, os.R_OK): + if (not force) and os.stat(self.filename_or_sequence).st_mtime <= \ + os.stat(index_filename).st_mtime: + # index is up to date + return + pysam.faidx(self.fos) + if not os.access(index_filename, os.R_OK): + raise SystemError( + "Building of Fasta index failed due to unknown error.") def __getitem__(self, iv): - if not isinstance(iv, GenomicInterval): - raise TypeError, "GenomicInterval expected as key." - if not isinstance(self.fos, str): - raise TypeError, "This function only works with FastaReader objects " + \ - "connected to a fasta file via file name" - self._import_pysam() - fasta = pysam.faidx(self.fos, "%s:%d-%d" % (iv.chrom, iv.start, iv.end-1)) - ans = list(FastaReader(fasta)) - assert len(ans) == 1 - ans[0].name = str(iv) - if iv.strand != "-": - return ans[0] - else: - return ans[0].get_reverse_complement() + if not isinstance(iv, GenomicInterval): + raise TypeError("GenomicInterval expected as key.") + if not isinstance(self.fos, str): + raise TypeError( + "This function only works with FastaReader objects " + + "connected to a fasta file via file name") + self._import_pysam() + fasta = pysam.faidx( + self.fos, + "%s:%d-%d" % (iv.chrom, iv.start, iv.end - 1)) + ans = list(FastaReader(fasta)) + assert len(ans) == 1 + ans[0].name = str(iv) + if iv.strand != "-": + return ans[0] + else: + return ans[0].get_reverse_complement() class FastqReader(FileOrSequence): @@ -401,20 +415,26 @@ if not qual.endswith("\n"): qual += "\n" if not id1.startswith("@"): - raise ValueError("Primary ID line in FASTQ file does" - "not start with '@'. Either this is not FASTQ data or the parser got out of sync.") + raise ValueError( + "Primary ID line in FASTQ file does " + "not start with '@'. Either this is not FASTQ data or the " + "parser got out of sync.") if not id2.startswith("+"): - raise ValueError("Secondary ID line in FASTQ file does" - "not start with '+'. Maybe got out of sync.") + raise ValueError( + "Secondary ID line in FASTQ file does" + "not start with '+'. Maybe got out of sync.") if len(id2) > 2 and id1[1:] != id2[1:]: - raise ValueError("Primary and secondary ID line in FASTQ" - "disagree.") + raise ValueError( + "Primary and secondary ID line in FASTQ" + "disagree.") if self.raw_iterator: s = (seq[:-1], id1[1:-1], qual[:-1], self.qual_scale) else: - s = SequenceWithQualities(seq[:-1], id1[1:-1], qual[:-1], - self.qual_scale) + s = SequenceWithQualities( + seq[:-1], id1[1:-1], + qual[:-1], + self.qual_scale) yield s @@ -430,119 +450,145 @@ except ValueError: if line.startswith("Reported "): continue - warnings.warn("BowtieReader: Ignoring the following line, which could not be parsed:\n%s\n" % line, - RuntimeWarning) + warnings.warn( + "BowtieReader: Ignoring the following line, which could " + "not be parsed:\n%s\n" % line, + RuntimeWarning) yield algnt def bundle_multiple_alignments(sequence_of_alignments): - """Some alignment programs, e.g., Bowtie, can output multiple alignments, - i.e., the same read is reported consecutively with different alignments. - This function takes an iterator over alignments and bundles consecutive - alignments regarding the same read to a list of Alignment objects and - returns an iterator over these. - """ - alignment_iter = iter(sequence_of_alignments) - algnt = alignment_iter.next() - ma = [ algnt ] - for algnt in alignment_iter: - if algnt.read.name != ma[0].read.name: - yield ma - ma = [ algnt ] - else: - ma.append(algnt) - yield ma + """Some alignment programs, e.g., Bowtie, can output multiple alignments, + i.e., the same read is reported consecutively with different alignments. + This function takes an iterator over alignments and bundles consecutive + alignments regarding the same read to a list of Alignment objects and + returns an iterator over these. + """ + alignment_iter = iter(sequence_of_alignments) + algnt = alignment_iter.next() + ma = [algnt] + for algnt in alignment_iter: + if algnt.read.name != ma[0].read.name: + yield ma + ma = [algnt] + else: + ma.append(algnt) + yield ma class SolexaExportAlignment(Alignment): - """Iterating over SolexaExportReader objects will yield SoelxaExportRecord - objects. These have four fields: - read - a SequenceWithQualities object - aligned - a boolean, indicating whether the object was aligned - iv - a GenomicInterval giving the alignment (or None, if not aligned) - passed_filter - a boolean, indicating whether the object passed the filter - nomatch_code - a code indicating why no match was found (or None, if the - read was aligned) - - As long as 'aligned' is True, a SolexaExportRecord can be treated as an - Alignment object. - """ - - def __init__(self): - # Data is filled in by SolexaExportRecord - pass - - def __repr__(self): - if self.aligned: - return "< %s object: Read '%s', aligned to %s >" % ( - self.__class__.__name__, self.read.name, self.iv) - else: - return "< %s object: Non-aligned read '%s' >" % ( - self.__class__.__name__, self.read.name) + """Iterating over SolexaExportReader objects will yield SoelxaExportRecord + objects. These have four fields: + read - a SequenceWithQualities object + aligned - a boolean, indicating whether the object was aligned + iv - a GenomicInterval giving the alignment (or None, if not aligned) + passed_filter - a boolean, indicating whether the object passed the filter + nomatch_code - a code indicating why no match was found (or None, if the + read was aligned) + + As long as 'aligned' is True, a SolexaExportRecord can be treated as an + Alignment object. + """ + + def __init__(self): + # Data is filled in by SolexaExportRecord + pass + + def __repr__(self): + if self.aligned: + return "< %s object: Read '%s', aligned to %s >" % ( + self.__class__.__name__, self.read.name, self.iv) + else: + return "< %s object: Non-aligned read '%s' >" % ( + self.__class__.__name__, self.read.name) + class SolexaExportReader(FileOrSequence): - """Parser for *_export.txt files from the SolexaPipeline software. + """Parser for *_export.txt files from the SolexaPipeline software. - Iterating over a SolexaExportReader yields SolexaExportRecord objects. - """ + Iterating over a SolexaExportReader yields SolexaExportRecord objects. + """ + + def __init__(self, filename_or_sequence, solexa_old=False): + FileOrSequence.__init__(self, filename_or_sequence) + if solexa_old: + self.qualscale = "solexa-old" + else: + self.qualscale = "solexa" - def __init__(self, filename_or_sequence, solexa_old = False): - FileOrSequence.__init__(self, filename_or_sequence) - if solexa_old: - self.qualscale = "solexa-old" - else: - self.qualscale = "solexa" - - @classmethod - def parse_line_bare(dummy, line): - if line[-1] == "\n": - line = line[:-1] - res = {} - (res['machine'], res['run_number'], res['lane'], res['tile'], res['x_coord'], - res['y_coord'], res['index_string'], res['read_nbr'], res['read_seq'], - res['qual_str'], res['chrom'], res['contig'], res['pos'], res['strand'], - res['match_descr'], res['single_read_algnt_score'], - res['paired_read_algnt_score'], res['partner_chrom'], res['partner_contig'], - res['partner_offset'], res['partner_strand'], res['passed_filtering']) \ - = line.split("\t") - return res - - def __iter__(self): - for line in FileOrSequence.__iter__(self): - record = SolexaExportAlignment() - fields = SolexaExportReader.parse_line_bare(line) - if fields['read_nbr'] != "1": - warnings.warn("Paired-end read encountered. PE is so far supported only for " + - "SAM files, not yet for SolexaExport. All PE-related fields are ignored. ") - record.read = SequenceWithQualities( - fields['read_seq'], - "%s:%s:%s:%s:%s#0" % (fields['machine'], fields['lane'], fields['tile'], - fields['x_coord'], fields['y_coord']), - fields['qual_str'], self.qualscale) - if fields['passed_filtering'] == 'Y': - record.passed_filter = True - elif fields['passed_filtering'] == 'N': - record.passed_filter = False - else: - raise ValueError, "Illegal 'passed filter' value in Solexa export data: '%s'." % fields['passed_filtering'] - record.index_string = fields['index_string'] - if fields['pos'] == '': - record.iv = None - record.nomatch_code = fields['chrom'] - else: - if fields['strand'] == 'F': - strand = '+' - elif fields['strand'] == 'R': - strand = '-' + @classmethod + def parse_line_bare(dummy, line): + if line[-1] == "\n": + line = line[:-1] + res = {} + (res['machine'], + res['run_number'], + res['lane'], + res['tile'], + res['x_coord'], + res['y_coord'], + res['index_string'], + res['read_nbr'], + res['read_seq'], + res['qual_str'], + res['chrom'], + res['contig'], + res['pos'], + res['strand'], + res['match_descr'], + res['single_read_algnt_score'], + res['paired_read_algnt_score'], + res['partner_chrom'], + res['partner_contig'], + res['partner_offset'], + res['partner_strand'], + res['passed_filtering']) = line.split("\t") + return res + + def __iter__(self): + for line in FileOrSequence.__iter__(self): + record = SolexaExportAlignment() + fields = SolexaExportReader.parse_line_bare(line) + if fields['read_nbr'] != "1": + warnings.warn( + "Paired-end read encountered. PE is so far supported only " + "for SAM files, not yet for SolexaExport. All PE-related " + "fields are ignored.") + record.read = SequenceWithQualities( + fields['read_seq'], + "%s:%s:%s:%s:%s#0" % (fields['machine'], + fields['lane'], + fields['tile'], + fields['x_coord'], + fields['y_coord']), + fields['qual_str'], self.qualscale) + if fields['passed_filtering'] == 'Y': + record.passed_filter = True + elif fields['passed_filtering'] == 'N': + record.passed_filter = False else: - raise ValueError, "Illegal strand value in Solexa export data." - start = int(fields['pos']) - chrom = fields['chrom'] - if fields['chrom'] == "": - chrom = fields['contig'] - record.iv = GenomicInterval(chrom, start, - start + len(fields['read_seq']), strand) - yield record + raise ValueError( + "Illegal 'passed filter' value in Solexa export data: '%s'." % fields['passed_filtering']) + record.index_string = fields['index_string'] + if fields['pos'] == '': + record.iv = None + record.nomatch_code = fields['chrom'] + else: + if fields['strand'] == 'F': + strand = '+' + elif fields['strand'] == 'R': + strand = '-' + else: + raise ValueError( + "Illegal strand value in Solexa export data.") + start = int(fields['pos']) + chrom = fields['chrom'] + if fields['chrom'] == "": + chrom = fields['contig'] + record.iv = GenomicInterval( + chrom, start, + start + len(fields['read_seq']), strand) + yield record class SAM_Reader(FileOrSequence): @@ -582,15 +628,53 @@ ########################### -## paired-end handling +# paired-end handling ########################### - -def pair_SAM_alignments(alignments, bundle=False): +def pair_SAM_alignments( + alignments, + bundle=False, + primary_only=False): + '''Iterate over SAM aligments, name-sorted paired-end + + Args: + alignments (iterator of SAM/BAM alignments): the alignments to wrap + bundle (bool): if True, bundle all alignments from one read pair into a + single yield. If False (default), each pair of alignments is + yielded separately. + primary_only (bool): for each read, consider only the primary line + (SAM flag 0x900 = 0). The SAM specification requires one and only + one of those for each read. + + Yields: + 2-tuples with each pair of alignments or, if bundle==True, each bundled + list of alignments. + ''' mate_missing_count = [0] def process_list(almnt_list): + '''Transform a list of alignment with the same read name into pairs + + Args: + almnt_list (list): alignments to process + + Yields: + each pair of alignments. + + This function is needed because each line of a BAM file is not a read + but an alignment. For uniquely mapped and unmapped reads, those two are + the same. For multimapped reads, however, there can be more than one + alignment for each read. Also, it is normal for a mapper to uniquely + map one read and multimap its mate. + + This function goes down the list of alignments for a given read name + and tries to find the first mate. So if read 1 is uniquely mapped but + read 2 is mapped 4 times, only (read 1, read 2 - first occurrence) will + yield; the other 3 alignments of read 2 are ignored. + ''' + + while len(almnt_list) > 0: a1 = almnt_list.pop(0) # Find its mate @@ -608,7 +692,8 @@ if a1.mate_aligned: mate_missing_count[0] += 1 if mate_missing_count[0] == 1: - warnings.warn("Read " + a1.read.name + " claims to have an aligned mate " + + warnings.warn( + "Read " + a1.read.name + " claims to have an aligned mate " + "which could not be found in an adjacent line.") a2 = None if a2 is not None: @@ -623,9 +708,14 @@ current_name = None for almnt in alignments: if not almnt.paired_end: - raise ValueError, "'pair_alignments' needs a sequence of paired-end alignments" + raise ValueError( + "'pair_alignments' needs a sequence of paired-end alignments") if almnt.pe_which == "unknown": - raise ValueError, "Paired-end read found with 'unknown' 'pe_which' status." + raise ValueError( + "Paired-end read found with 'unknown' 'pe_which' status.") + # FIXME: almnt.not_primary_alignment currently means secondary + if primary_only and (almnt.not_primary_alignment or almnt.supplementary): + continue if almnt.read.name == current_name: almnt_list.append(almnt) else: @@ -642,118 +732,144 @@ for p in process_list(almnt_list): yield p if mate_missing_count[0] > 1: - warnings.warn("%d reads with missing mate encountered." % mate_missing_count[0]) + warnings.warn("%d reads with missing mate encountered." % + mate_missing_count[0]) -def pair_SAM_alignments_with_buffer(alignments, max_buffer_size=30000000): +def pair_SAM_alignments_with_buffer( + alignments, + max_buffer_size=30000000, + primary_only=False): + '''Iterate over SAM aligments with buffer, position-sorted paired-end + + Args: + alignments (iterator of SAM/BAM alignments): the alignments to wrap + max_buffer_size (int): maxmal numer of alignments to keep in memory. + primary_only (bool): for each read, consider only the primary line + (SAM flag 0x900 = 0). The SAM specification requires one and only + one of those for each read. + + Yields: + 2-tuples with each pair of alignments. + ''' - almnt_buffer = {} - ambiguous_pairing_counter = 0 - for almnt in alignments: - - if not almnt.paired_end: - raise ValueError, "Sequence of paired-end alignments expected, but got single-end alignment." - if almnt.pe_which == "unknown": - raise ValueError, "Cannot process paired-end alignment found with 'unknown' 'pe_which' status." - - matekey = ( - almnt.read.name, - "second" if almnt.pe_which == "first" else "first", - almnt.mate_start.chrom if almnt.mate_aligned else None, - almnt.mate_start.pos if almnt.mate_aligned else None, - almnt.iv.chrom if almnt.aligned else None, - almnt.iv.start if almnt.aligned else None, - -almnt.inferred_insert_size if almnt.aligned and almnt.mate_aligned else None) - - if matekey in almnt_buffer: - if len(almnt_buffer[ matekey ]) == 1: - mate = almnt_buffer[ matekey ][ 0 ] - del almnt_buffer[ matekey ] - else: - mate = almnt_buffer[ matekey ].pop(0) - if ambiguous_pairing_counter == 0: - ambiguous_pairing_first_occurance = matekey - ambiguous_pairing_counter += 1 - if almnt.pe_which == "first": - yield (almnt, mate) - else: - yield (mate, almnt) - else: - almntkey = ( - almnt.read.name, almnt.pe_which, - almnt.iv.chrom if almnt.aligned else None, - almnt.iv.start if almnt.aligned else None, + almnt_buffer = {} + ambiguous_pairing_counter = 0 + for almnt in alignments: + if not almnt.paired_end: + raise ValueError( + "Sequence of paired-end alignments expected, but got single-end alignment.") + if almnt.pe_which == "unknown": + raise ValueError( + "Cannot process paired-end alignment found with 'unknown' 'pe_which' status.") + # FIXME: almnt.not_primary_alignment currently means secondary + if primary_only and (almnt.not_primary_alignment or almnt.supplementary): + continue + + matekey = ( + almnt.read.name, + "second" if almnt.pe_which == "first" else "first", almnt.mate_start.chrom if almnt.mate_aligned else None, almnt.mate_start.pos if almnt.mate_aligned else None, - almnt.inferred_insert_size if almnt.aligned and almnt.mate_aligned else None) - if almntkey not in almnt_buffer: - almnt_buffer[ almntkey ] = [ almnt ] - else: - almnt_buffer[ almntkey ].append(almnt) - if len(almnt_buffer) > max_buffer_size: - raise ValueError, "Maximum alignment buffer size exceeded while pairing SAM alignments." - - if len(almnt_buffer) > 0: - warnings.warn("Mate records missing for %d records; first such record: %s." % - (len(almnt_buffer), str(almnt_buffer.values()[0][0]))) - for almnt_list in almnt_buffer.values(): - for almnt in almnt_list: + almnt.iv.chrom if almnt.aligned else None, + almnt.iv.start if almnt.aligned else None, + -almnt.inferred_insert_size if almnt.aligned and almnt.mate_aligned else None) + + if matekey in almnt_buffer: + if len(almnt_buffer[matekey]) == 1: + mate = almnt_buffer[matekey][0] + del almnt_buffer[matekey] + else: + mate = almnt_buffer[matekey].pop(0) + if ambiguous_pairing_counter == 0: + ambiguous_pairing_first_occurance = matekey + ambiguous_pairing_counter += 1 if almnt.pe_which == "first": - yield (almnt, None) + yield (almnt, mate) else: - yield (None, almnt) + yield (mate, almnt) + else: + almntkey = ( + almnt.read.name, almnt.pe_which, + almnt.iv.chrom if almnt.aligned else None, + almnt.iv.start if almnt.aligned else None, + almnt.mate_start.chrom if almnt.mate_aligned else None, + almnt.mate_start.pos if almnt.mate_aligned else None, + almnt.inferred_insert_size if almnt.aligned and almnt.mate_aligned else None) + if almntkey not in almnt_buffer: + almnt_buffer[almntkey] = [almnt] + else: + almnt_buffer[almntkey].append(almnt) + if len(almnt_buffer) > max_buffer_size: + raise ValueError( + "Maximum alignment buffer size exceeded while pairing SAM alignments.") + + if len(almnt_buffer) > 0: + warnings.warn( + "Mate records missing for %d records; first such record: %s." % + (len(almnt_buffer), str(almnt_buffer.values()[0][0]))) + for almnt_list in almnt_buffer.values(): + for almnt in almnt_list: + if almnt.pe_which == "first": + yield (almnt, None) + else: + yield (None, almnt) - if ambiguous_pairing_counter > 0: - warnings.warn("Mate pairing was ambiguous for %d records; mate key for first such record: %s." % - (ambiguous_pairing_counter, str(ambiguous_pairing_first_occurance))) + if ambiguous_pairing_counter > 0: + warnings.warn( + "Mate pairing was ambiguous for %d records; mate key for first such record: %s." % + (ambiguous_pairing_counter, str(ambiguous_pairing_first_occurance))) ########################### -## variant calls +# variant calls ########################### _re_vcf_meta_comment = re.compile("^##([a-zA-Z]+)\=(.*)$") -_re_vcf_meta_descr = re.compile('ID=[^,]+,?|Number=[^,]+,?|Type=[^,]+,?|Description="[^"]+",?') +_re_vcf_meta_descr = re.compile( + 'ID=[^,]+,?|Number=[^,]+,?|Type=[^,]+,?|Description="[^"]+",?') _re_vcf_meta_types = re.compile("[INFO|FILTER|FORMAT]") _vcf_typemap = { - "Integer":int, - "Float":float, - "String":str, - "Flag":bool + "Integer": int, + "Float": float, + "String": str, + "Flag": bool } + class VariantCall(object): - def __init__(self, chrom = None, pos = None, identifier = None, ref = None, alt = None, qual = None, filtr = None, info = None): - self.chrom = chrom - self.pos = pos - self.id = identifier - self.ref = ref - self.alt = alt - self.qual = qual + def __init__(self, chrom=None, pos=None, identifier=None, ref=None, + alt=None, qual=None, filtr=None, info=None): + self.chrom = chrom + self.pos = pos + self.id = identifier + self.ref = ref + self.alt = alt + self.qual = qual self.filter = filtr - self.info = info + self.info = info self._original_line = None @classmethod def fromdict(cls, dictionary): ret = cls() - ret.chrom = dictionary["chrom"] - ret.pos = dictionary["pos"] - ret.id = dictionary["id"] - ret.ref = dictionary["ref"] - ret.alt = dictionary["alt"] - ret.qual = dictionary["qual"] - ret.filter = dictionary["filter"] - ret.info = dictionary["info"] + ret.chrom = dictionary["chrom"] + ret.pos = dictionary["pos"] + ret.id = dictionary["id"] + ret.ref = dictionary["ref"] + ret.alt = dictionary["alt"] + ret.qual = dictionary["qual"] + ret.filter = dictionary["filter"] + ret.info = dictionary["info"] ret._original_line = None @classmethod - def fromline(cls, line, nsamples = 0, sampleids = []): + def fromline(cls, line, nsamples=0, sampleids=[]): ret = cls() if nsamples == 0: ret.format = None @@ -763,9 +879,10 @@ ret.chrom, ret.pos, ret.id, ret.ref, ret.alt, ret.qual, ret.filter, ret.info = lsplit[:8] ret.format = lsplit[8].split(":") ret.samples = {} - spos=9 + spos = 9 for sid in sampleids: - ret.samples[ sid ] = dict((name, value) for (name, value) in itertools.izip(ret.format, lsplit[spos].split(":"))) + ret.samples[sid] = dict((name, value) for ( + name, value) in itertools.izip(ret.format, lsplit[spos].split(":"))) spos += 1 ret.pos = GenomicPosition(ret.chrom, int(ret.pos)) ret.alt = ret.alt.split(",") @@ -779,28 +896,29 @@ return self.info def get_original_line(self): - warnings.warn("Original line is empty, probably this object was created from scratch and not from a line in a .vcf file!") - return self._original_line + warnings.warn( + "Original line is empty, probably this object was created from scratch and not from a line in a .vcf file!") + return self._original_line def sampleline(self): - if self.format == None: - print >> sys.stderr, "No samples in this variant call!" - return "" - keys = self.format - ret = [ ":".join(keys) ] - for sid in self.samples: - tmp = [] - for k in keys: - if k in self.samples[sid]: - tmp.append(self.samples[sid][k]) - ret.append(":".join(tmp)) - return "\t".join(ret) + if self.format == None: + sys.stderr.write("No samples in this variant call!\n") + return "" + keys = self.format + ret = [":".join(keys)] + for sid in self.samples: + tmp = [] + for k in keys: + if k in self.samples[sid]: + tmp.append(self.samples[sid][k]) + ret.append(":".join(tmp)) + return "\t".join(ret) def to_line(self): - if self.format == None: - return "\t".join(map(str, [ self.pos.chrom, self.pos.pos, self.id, self.ref, ",".join(self.alt), self.qual, self.filter, self.infoline() ])) + "\n" - else: - return "\t".join(map(str, [ self.pos.chrom, self.pos.pos, self.id, self.ref, ",".join(self.alt), self.qual, self.filter, self.infoline(), self.sampleline() ])) + "\n" + if self.format == None: + return "\t".join(map(str, [self.pos.chrom, self.pos.pos, self.id, self.ref, ",".join(self.alt), self.qual, self.filter, self.infoline()])) + "\n" + else: + return "\t".join(map(str, [self.pos.chrom, self.pos.pos, self.id, self.ref, ",".join(self.alt), self.qual, self.filter, self.infoline(), self.sampleline()])) + "\n" def __descr__(self): return "" % (str(self.pos).rstrip("/."), self.ref, str(self.alt).strip("[]")) @@ -817,9 +935,9 @@ tmp[token[0]] = map(infodict[token[0]], token[1].split(",")) else: tmp[token[0]] = token[1].split(",") - if len(tmp[ token[0] ]) == 1: + if len(tmp[token[0]]) == 1: tmp[token[0]] = tmp[token[0]][0] - else: #Flag attribute found + else: # Flag attribute found tmp[token] = True diff = set(infodict.keys()).difference(set(tmp.keys())) for key in diff: @@ -827,6 +945,7 @@ tmp[key] = False self.info = tmp + class VCF_Reader(FileOrSequence): def __init__(self, filename_or_sequence): @@ -839,10 +958,12 @@ self.sampleids = [] def make_info_dict(self): - self.infodict = dict((key, _vcf_typemap[self.info[key]["Type"]]) for key in self.info.keys()) + self.infodict = dict( + (key, + _vcf_typemap[self.info[key]["Type"]]) for key in self.info.keys()) - def parse_meta(self, header_filename = None): - if header_filename == None: + def parse_meta(self, header_filename=None): + if header_filename is None: the_iter = FileOrSequence.__iter__(self) else: the_iter = open(header_filename, "r") @@ -854,22 +975,25 @@ if mo: value = mo.group(2) if mo.group(1) == "INFO": - value = dict(e.rstrip(",").split("=",1) for e in _re_vcf_meta_descr.findall(value)) + value = dict(e.rstrip(",").split("=", 1) + for e in _re_vcf_meta_descr.findall(value)) key = value["ID"] del value["ID"] - self.info[ key ] = value + self.info[key] = value elif mo.group(1) == "FILTER": - value = dict(e.rstrip(",").split("=",1) for e in _re_vcf_meta_descr.findall(value)) + value = dict(e.rstrip(",").split("=", 1) + for e in _re_vcf_meta_descr.findall(value)) key = value["ID"] del value["ID"] - self.filters[ key ] = value + self.filters[key] = value elif mo.group(1) == "FORMAT": - value = dict(e.rstrip(",").split("=",1) for e in _re_vcf_meta_descr.findall(value)) + value = dict(e.rstrip(",").split("=", 1) + for e in _re_vcf_meta_descr.findall(value)) key = value["ID"] del value["ID"] - self.formats[ key ] = value + self.formats[key] = value else: - self.metadata[ mo.group(1) ] = mo.group(2) + self.metadata[mo.group(1)] = mo.group(2) else: self.sampleids = line.rstrip("\t\n").split("\t")[9:] self.nsamples = len(self.sampleids) @@ -961,14 +1085,14 @@ try: import pysam except ImportError: - sys.stderr.write("Please Install PySam to use the BAM_Reader Class (http://code.google.com/p/pysam/)") + sys.stderr.write( + "Please Install PySam to use the BAM_Reader Class (http://code.google.com/p/pysam/)") raise def __iter__(self): sf = pysam.Samfile(self.filename, "rb", check_sq=self.check_sq) self.record_no = 0 for pa in sf: - #yield SAM_Alignment.from_pysam_AlignedRead(pa, sf) yield SAM_Alignment.from_pysam_AlignedSegment(pa, sf) self.record_no += 1 @@ -996,13 +1120,15 @@ def __getitem__(self, iv): if not isinstance(iv, GenomicInterval): - raise TypeError("Use a HTSeq.GenomicInterval to access regions within .bam-file!") + raise TypeError( + "Use a HTSeq.GenomicInterval to access regions within .bam-file!") if self.sf is None: self.sf = pysam.Samfile(self.filename, "rb", check_sq=self.check_sq) # NOTE: pysam 0.9 has renames _hasIndex into has_index if (hasattr(self.sf, '_hasIndex') and (not self.sf._hasIndex())) or (not self.sf.has_index()): - raise ValueError("The .bam-file has no index, random-access is disabled!") - for pa in self.sf.fetch(iv.chrom, iv.start+1, iv.end): + raise ValueError( + "The .bam-file has no index, random-access is disabled!") + for pa in self.sf.fetch(iv.chrom, iv.start + 1, iv.end): yield SAM_Alignment.from_pysam_AlignedRead(pa, self.sf) def get_header_dict(self): @@ -1011,11 +1137,13 @@ class BAM_Writer(object): - def __init__(self, filename, template=None, referencenames=None, referencelengths=None, text=None, header=None): + def __init__(self, filename, template=None, referencenames=None, + referencelengths=None, text=None, header=None): try: import pysam except ImportError: - sys.stderr.write("Please Install PySam to use the BAM_Writer Class (http://code.google.com/p/pysam/)") + sys.stderr.write( + "Please Install PySam to use the BAM_Writer Class (http://code.google.com/p/pysam/)") raise self.filename = filename @@ -1038,7 +1166,6 @@ return BAM_Writer(filename=fn, header=br.get_header_dict()) def write(self, alnmt): - #self.sf.write(alnmt.to_pysam_AlignedRead(self.sf)) self.sf.write(alnmt.to_pysam_AlignedSegment(self.sf)) def close(self): @@ -1059,9 +1186,21 @@ raise ValueError("BED file line contains less than 3 fields") if len(fields) > 9: raise ValueError("BED file line contains more than 9 fields") - iv = GenomicInterval(fields[0], int(fields[1]), int(fields[2]), fields[5] if len(fields) > 5 else ".") - f = GenomicFeature(fields[3] if len(fields) > 3 else "unnamed", "BED line", iv) + iv = GenomicInterval( + fields[0], + int(fields[1]), + int(fields[2]), + fields[5] if len(fields) > 5 else ".") + f = GenomicFeature( + fields[3] if len(fields) > 3 else "unnamed", + "BED line", + iv) f.score = float(fields[4]) if len(fields) > 4 else None - f.thick = GenomicInterval(iv.chrom, int(fields[6]), int(fields[7]), iv.strand) if len(fields) > 7 else None - f.itemRgb = [int(a) for a in fields[8].split(",")] if len(fields) > 8 else None + f.thick = GenomicInterval( + iv.chrom, + int(fields[6]), + int(fields[7]), + iv.strand) if len(fields) > 7 else None + f.itemRgb = [int(a) for a in fields[8].split(",") + ] if len(fields) > 8 else None yield(f) diff -Nru htseq-0.10.0/python2/HTSeq/scripts/count.py htseq-0.11.2/python2/HTSeq/scripts/count.py --- htseq-0.10.0/python2/HTSeq/scripts/count.py 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python2/HTSeq/scripts/count.py 2019-01-08 02:36:23.000000000 +0000 @@ -41,12 +41,13 @@ r = (r,) for read in r: if read is not None: - samoutfile.write(read.original_sam_line.rstrip() + - "\tXF:Z:" + assignment + "\n") + read.optional_fields.append(('XF', assignment)) + samoutfile.write(read.get_sam_line() + "\n") - if samouts != "": + if samouts != []: if len(samouts) != len(sam_filenames): - raise ValueError('Select the same number of SAM input and output files') + raise ValueError( + 'Select the same number of SAM input and output files') # Try to open samout files early in case any of them has issues for samout in samouts: with open(samout, 'w'): @@ -73,12 +74,14 @@ try: feature_id = f.attr[id_attribute] except KeyError: - raise ValueError("Feature %s does not contain a '%s' attribute" % - (f.name, id_attribute)) + raise ValueError( + "Feature %s does not contain a '%s' attribute" % + (f.name, id_attribute)) if stranded != "no" and f.iv.strand == ".": - raise ValueError("Feature %s at %s does not have strand information but you are " - "running htseq-count in stranded mode. Use '--stranded=no'." % - (f.name, f.iv)) + raise ValueError( + "Feature %s at %s does not have strand information but you are " + "running htseq-count in stranded mode. Use '--stranded=no'." % + (f.name, f.iv)) features[f.iv] += feature_id counts[f.attr[id_attribute]] = 0 attributes[f.attr[id_attribute]] = [ @@ -116,22 +119,28 @@ lowqual_all = [] nonunique_all = [] for isam, (sam_filename) in enumerate(sam_filenames): - if samouts != '': + if samouts != []: samoutfile = open(samouts[isam], 'w') else: samoutfile = None try: - if sam_filename != "-": - read_seq_file = SAM_or_BAM_Reader(sam_filename) - read_seq = read_seq_file - first_read = next(iter(read_seq)) - else: + if sam_filename == "-": read_seq_file = SAM_or_BAM_Reader(sys.stdin) - read_seq_iter = iter(read_seq_file) + else: + read_seq_file = SAM_or_BAM_Reader(sam_filename) + read_seq_iter = iter(read_seq_file) + # Catch empty BAM files + try: first_read = next(read_seq_iter) + pe_mode = first_read.paired_end + except: + first_read = None + pe_mode = False + if first_read is not None: read_seq = itertools.chain([first_read], read_seq_iter) - pe_mode = first_read.paired_end + else: + read_seq = [] except: sys.stderr.write( "Error occured when reading beginning of SAM/BAM file.\n") @@ -175,7 +184,10 @@ try: if r.optional_field("NH") > 1: nonunique += 1 - write_to_samout(r, "__alignment_not_unique", samoutfile) + write_to_samout( + r, + "__alignment_not_unique", + samoutfile) if multimapped_mode == 'none': continue except KeyError: @@ -325,7 +337,8 @@ print('\t'.join(["__alignment_not_unique"] + pad + [str(c) for c in nonunique_all])) -def my_showwarning(message, category, filename, lineno=None, file=None, line=None): +def my_showwarning(message, category, filename, lineno=None, file=None, + line=None): sys.stderr.write("Warning: %s\n" % message) @@ -396,9 +409,11 @@ "suitable for Ensembl GTF files: gene_id)") pa.add_argument( - "--additional-attr", type=str, nargs='+', - default=(), help="Additional feature attributes (default: none, " + - "suitable for Ensembl GTF files: gene_name)") + "--additional-attr", type=str, + action='append', + default=[], help="Additional feature attributes (default: none, " + + "suitable for Ensembl GTF files: gene_name). Use multiple times " + + "for each different attribute") pa.add_argument( "-m", "--mode", dest="mode", @@ -414,19 +429,20 @@ pa.add_argument( "--secondary-alignments", dest="secondary_alignments", type=str, - choices=("score", "ignore"), default="score", + choices=("score", "ignore"), default="ignore", help="Whether to score secondary alignments (0x100 flag)") pa.add_argument( "--supplementary-alignments", dest="supplementary_alignments", type=str, - choices=("score", "ignore"), default="score", + choices=("score", "ignore"), default="ignore", help="Whether to score supplementary alignments (0x800 flag)") pa.add_argument( - "-o", "--samout", type=str, dest="samouts", nargs='+', - default="", help="write out all SAM alignment records into an output " + - "SAM file called SAMOUT, annotating each line with its feature assignment " + - "(as an optional field with tag 'XF')") + "-o", "--samout", type=str, dest="samouts", + action='append', + default=[], help="write out all SAM alignment records into " + + "SAM files (one per input file needed), annotating each line " + + "with its feature assignment (as an optional field with tag 'XF')") pa.add_argument( "-q", "--quiet", action="store_true", dest="quiet", diff -Nru htseq-0.10.0/python2/HTSeq/scripts/qa.py htseq-0.11.2/python2/HTSeq/scripts/qa.py --- htseq-0.10.0/python2/HTSeq/scripts/qa.py 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python2/HTSeq/scripts/qa.py 2019-01-08 02:36:23.000000000 +0000 @@ -5,18 +5,21 @@ # (c) Simon Anders, European Molecular Biology Laboratory, 2010 # released under GNU General Public License -import sys, time, os.path, optparse +import sys +import os.path +import optparse from itertools import * import numpy import HTSeq + def main(): try: import matplotlib except ImportError: sys.stderr.write("This script needs the 'matplotlib' library, which ") - sys.stderr.write("was not found. Please install it." ) + sys.stderr.write("was not found. Please install it.") matplotlib.use('PDF') from matplotlib import pyplot @@ -26,10 +29,10 @@ except ImportError: from matplotlib.pyplot import normalize as Normalize - # **** Parse command line **** - optParser = optparse.OptionParser( usage = "%prog [options] read_file", + optParser = optparse.OptionParser( + usage="%prog [options] read_file", description= "This script take a file with high-throughput sequencing reads " + "(supported formats: SAM, Solexa _export.txt, FASTQ, Solexa " + @@ -40,62 +43,69 @@ epilog = "Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology " + " Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General " + - " Public License v3. Part of the 'HTSeq' framework, version %s." % HTSeq.__version__ ) - optParser.add_option( "-t", "--type", type="choice", dest="type", - choices = ("sam", "bam", "solexa-export", "fastq", "solexa-fastq"), - default = "sam", help="type of read_file (one of: sam [default], bam, " + - "solexa-export, fastq, solexa-fastq)" ) - optParser.add_option( "-o", "--outfile", type="string", dest="outfile", - help="output filename (default is .pdf)" ) - optParser.add_option( "-r", "--readlength", type="int", dest="readlen", - help="the maximum read length (when not specified, the script guesses from the file" ) - optParser.add_option( "-g", "--gamma", type="float", dest="gamma", + " Public License v3. Part of the 'HTSeq' framework, version %s." % HTSeq.__version__) + optParser.add_option( + "-t", "--type", type="choice", dest="type", + choices=("sam", "bam", "solexa-export", "fastq", "solexa-fastq"), + default="sam", help="type of read_file (one of: sam [default], bam, " + + "solexa-export, fastq, solexa-fastq)") + optParser.add_option( + "-o", "--outfile", type="string", dest="outfile", + help="output filename (default is .pdf)") + optParser.add_option( + "-r", "--readlength", type="int", dest="readlen", + help="the maximum read length (when not specified, the script guesses from the file") + optParser.add_option( + "-g", "--gamma", type="float", dest="gamma", default = 0.3, - help="the gamma factor for the contrast adjustment of the quality score plot" ) - optParser.add_option( "-n", "--nosplit", action="store_true", dest="nosplit", - help="do not split reads in unaligned and aligned ones" ) - optParser.add_option( "-m", "--maxqual", type="int", dest="maxqual", default=41, - help="the maximum quality score that appears in the data (default: 41)" ) + help="the gamma factor for the contrast adjustment of the quality score plot") + optParser.add_option( + "-n", "--nosplit", action="store_true", dest="nosplit", + help="do not split reads in unaligned and aligned ones") + optParser.add_option( + "-m", "--maxqual", type="int", dest="maxqual", default=41, + help="the maximum quality score that appears in the data (default: 41)") - if len( sys.argv ) == 1: + if len(sys.argv) == 1: optParser.print_help() sys.exit(1) (opts, args) = optParser.parse_args() - if len( args ) != 1: - sys.stderr.write( sys.argv[0] + ": Error: Please provide one argument (the read_file).\n" ) - sys.stderr.write( " Call with '-h' to get usage information.\n" ) - sys.exit( 1 ) + if len(args) != 1: + sys.stderr.write( + sys.argv[0] + + ": Error: Please provide one argument (the read_file).\n") + sys.stderr.write(" Call with '-h' to get usage information.\n") + sys.exit(1) readfilename = args[0] if opts.type == "sam": - readfile = HTSeq.SAM_Reader( readfilename ) + readfile = HTSeq.SAM_Reader(readfilename) isAlnmntFile = True elif opts.type == "bam": - readfile = HTSeq.BAM_Reader( readfilename ) + readfile = HTSeq.BAM_Reader(readfilename) isAlnmntFile = True elif opts.type == "solexa-export": - readfile = HTSeq.SolexaExportReader( readfilename ) + readfile = HTSeq.SolexaExportReader(readfilename) isAlnmntFile = True elif opts.type == "fastq": - readfile = HTSeq.FastqReader( readfilename ) + readfile = HTSeq.FastqReader(readfilename) isAlnmntFile = False elif opts.type == "solexa-fastq": - readfile = HTSeq.FastqReader( readfilename, "solexa" ) + readfile = HTSeq.FastqReader(readfilename, "solexa") isAlnmntFile = False else: - sys.error( "Oops." ) + sys.error("Oops.") twoColumns = isAlnmntFile and not opts.nosplit if opts.outfile is None: - outfilename = os.path.basename( readfilename ) + ".pdf" + outfilename = os.path.basename(readfilename) + ".pdf" else: outfilename = opts.outfile - # **** Get read length **** if opts.readlen is not None: @@ -103,25 +113,23 @@ else: readlen = 0 if isAlnmntFile: - reads = ( a.read for a in readfile ) + reads = (a.read for a in readfile) else: reads = readfile - for r in islice( reads, 10000 ): - if len( r ) > readlen: - readlen = len( r ) + for r in islice(reads, 10000): + if len(r) > readlen: + readlen = len(r) max_qual = opts.maxqual gamma = opts.gamma - # **** Initialize count arrays **** - base_arr_U = numpy.zeros( ( readlen, 5 ), numpy.int ) - qual_arr_U = numpy.zeros( ( readlen, max_qual+1 ), numpy.int ) + base_arr_U = numpy.zeros((readlen, 5), numpy.int) + qual_arr_U = numpy.zeros((readlen, max_qual+1), numpy.int) if twoColumns: - base_arr_A = numpy.zeros( ( readlen, 5 ), numpy.int ) - qual_arr_A = numpy.zeros( ( readlen, max_qual+1 ), numpy.int ) - + base_arr_A = numpy.zeros((readlen, 5), numpy.int) + qual_arr_A = numpy.zeros((readlen, max_qual+1), numpy.int) # **** Main counting loop **** @@ -130,110 +138,107 @@ for a in readfile: if isAlnmntFile: r = a.read - else: - r = a - if twoColumns and (isAlnmntFile and a.aligned): - r.add_bases_to_count_array( base_arr_A ) - r.add_qual_to_count_array( qual_arr_A ) - else: - r.add_bases_to_count_array( base_arr_U ) - r.add_qual_to_count_array( qual_arr_U ) - i += 1 - if (i % 200000) == 0: - print i, "reads processed" + else: + r = a + if twoColumns and (isAlnmntFile and a.aligned): + r.add_bases_to_count_array(base_arr_A) + r.add_qual_to_count_array(qual_arr_A) + else: + r.add_bases_to_count_array(base_arr_U) + r.add_qual_to_count_array(qual_arr_U) + i += 1 + if (i % 200000) == 0: + print i, "reads processed" except: - sys.stderr.write( "Error occured in: %s\n" % - readfile.get_line_number_string() ) + sys.stderr.write("Error occured in: %s\n" % + readfile.get_line_number_string()) raise print i, "reads processed" - # **** Normalize result **** - def norm_by_pos( arr ): - arr = numpy.array( arr, numpy.float ) - arr_n = ( arr.T / arr.sum( 1 ) ).T - arr_n[ arr == 0 ] = 0 + def norm_by_pos(arr): + arr = numpy.array(arr, numpy.float) + arr_n = (arr.T / arr.sum(1)).T + arr_n[arr == 0] = 0 return arr_n - def norm_by_start( arr ): - arr = numpy.array( arr, numpy.float ) - arr_n = ( arr.T / arr.sum( 1 )[ 0 ] ).T - arr_n[ arr == 0 ] = 0 + def norm_by_start(arr): + arr = numpy.array(arr, numpy.float) + arr_n = (arr.T / arr.sum(1)[0]).T + arr_n[arr == 0] = 0 return arr_n - - base_arr_U_n = norm_by_pos( base_arr_U ) - qual_arr_U_n = norm_by_start( qual_arr_U ) - nreads_U = base_arr_U[0,:].sum() + base_arr_U_n = norm_by_pos(base_arr_U) + qual_arr_U_n = norm_by_start(qual_arr_U) + nreads_U = base_arr_U[0, :].sum() if twoColumns: - base_arr_A_n = norm_by_pos( base_arr_A ) - qual_arr_A_n = norm_by_start( qual_arr_A ) - nreads_A = base_arr_A[0,:].sum() - + base_arr_A_n = norm_by_pos(base_arr_A) + qual_arr_A_n = norm_by_start(qual_arr_A) + nreads_A = base_arr_A[0, :].sum() # **** Make plot **** - def plot_bases( arr ): - xg = numpy.arange( readlen ) - pyplot.plot( xg, arr[ : , 0 ], marker='.', color='red') - pyplot.plot( xg, arr[ : , 1 ], marker='.', color='darkgreen') - pyplot.plot( xg, arr[ : , 2 ], marker='.',color='lightgreen') - pyplot.plot( xg, arr[ : , 3 ], marker='.',color='orange') - pyplot.plot( xg, arr[ : , 4 ], marker='.',color='grey') - pyplot.axis( (0, readlen-1, 0, 1 ) ) - pyplot.text( readlen*.70, .9, "A", color="red" ) - pyplot.text( readlen*.75, .9, "C", color="darkgreen" ) - pyplot.text( readlen*.80, .9, "G", color="lightgreen" ) - pyplot.text( readlen*.85, .9, "T", color="orange" ) - pyplot.text( readlen*.90, .9, "N", color="grey" ) + def plot_bases(arr): + xg = numpy.arange(readlen) + pyplot.plot(xg, arr[:, 0], marker='.', color='red') + pyplot.plot(xg, arr[:, 1], marker='.', color='darkgreen') + pyplot.plot(xg, arr[:, 2], marker='.', color='lightgreen') + pyplot.plot(xg, arr[:, 3], marker='.', color='orange') + pyplot.plot(xg, arr[:, 4], marker='.', color='grey') + pyplot.axis((0, readlen-1, 0, 1)) + pyplot.text(readlen*.70, .9, "A", color="red") + pyplot.text(readlen*.75, .9, "C", color="darkgreen") + pyplot.text(readlen*.80, .9, "G", color="lightgreen") + pyplot.text(readlen*.85, .9, "T", color="orange") + pyplot.text(readlen*.90, .9, "N", color="grey") pyplot.figure() - pyplot.subplots_adjust( top=.85 ) - pyplot.suptitle( os.path.basename(readfilename), fontweight='bold' ) + pyplot.subplots_adjust(top=.85) + pyplot.suptitle(os.path.basename(readfilename), fontweight='bold') if twoColumns: - pyplot.subplot( 221 ) - plot_bases( base_arr_U_n ) - pyplot.ylabel( "proportion of base" ) - pyplot.title( "non-aligned reads\n%.0f%% (%.3f million)" % - ( 100. * nreads_U / (nreads_U+nreads_A), nreads_U / 1e6 ) ) - - pyplot.subplot( 222 ) - plot_bases( base_arr_A_n ) - pyplot.title( "aligned reads\n%.0f%% (%.3f million)" % - ( 100. * nreads_A / (nreads_U+nreads_A), nreads_A / 1e6 ) ) - - pyplot.subplot( 223 ) - pyplot.pcolor( qual_arr_U_n.T ** gamma, cmap=pyplot.cm.Greens, - norm=Normalize( 0, 1 ) ) - pyplot.axis( (0, readlen-1, 0, max_qual+1 ) ) - pyplot.xlabel( "position in read" ) - pyplot.ylabel( "base-call quality score" ) - - pyplot.subplot( 224 ) - pyplot.pcolor( qual_arr_A_n.T ** gamma, cmap=pyplot.cm.Greens, - norm=Normalize( 0, 1 ) ) - pyplot.axis( (0, readlen-1, 0, max_qual+1 ) ) - pyplot.xlabel( "position in read" ) + pyplot.subplot(221) + plot_bases(base_arr_U_n) + pyplot.ylabel("proportion of base") + pyplot.title("non-aligned reads\n%.0f%% (%.4f million)" % + (100. * nreads_U / (nreads_U+nreads_A), nreads_U / 1e6)) + + pyplot.subplot(222) + plot_bases(base_arr_A_n) + pyplot.title("aligned reads\n%.0f%% (%.4f million)" % + (100. * nreads_A / (nreads_U+nreads_A), nreads_A / 1e6)) + + pyplot.subplot(223) + pyplot.pcolor(qual_arr_U_n.T ** gamma, cmap=pyplot.cm.Greens, + norm=Normalize(0, 1)) + pyplot.axis((0, readlen-1, 0, max_qual+1)) + pyplot.xlabel("position in read") + pyplot.ylabel("base-call quality score") + + pyplot.subplot(224) + pyplot.pcolor(qual_arr_A_n.T ** gamma, cmap=pyplot.cm.Greens, + norm=Normalize(0, 1)) + pyplot.axis((0, readlen-1, 0, max_qual+1)) + pyplot.xlabel("position in read") else: - pyplot.subplot( 211 ) - plot_bases( base_arr_U_n ) - pyplot.ylabel( "proportion of base" ) - pyplot.title( "%.3f million reads" % ( nreads_U / 1e6 ) ) - - pyplot.subplot( 212 ) - pyplot.pcolor( qual_arr_U_n.T ** gamma, cmap=pyplot.cm.Greens, - norm=Normalize( 0, 1 ) ) - pyplot.axis( (0, readlen-1, 0, max_qual+1 ) ) - pyplot.xlabel( "position in read" ) - pyplot.ylabel( "base-call quality score" ) + pyplot.subplot(211) + plot_bases(base_arr_U_n) + pyplot.ylabel("proportion of base") + pyplot.title("%.3f million reads" % (nreads_U / 1e6)) + + pyplot.subplot(212) + pyplot.pcolor(qual_arr_U_n.T ** gamma, cmap=pyplot.cm.Greens, + norm=Normalize(0, 1)) + pyplot.axis((0, readlen-1, 0, max_qual+1)) + pyplot.xlabel("position in read") + pyplot.ylabel("base-call quality score") + pyplot.savefig(outfilename) - pyplot.savefig( outfilename ) if __name__ == "__main__": main() diff -Nru htseq-0.10.0/python2/HTSeq/_version.py htseq-0.11.2/python2/HTSeq/_version.py --- htseq-0.10.0/python2/HTSeq/_version.py 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python2/HTSeq/_version.py 2019-01-08 02:36:23.000000000 +0000 @@ -1 +1 @@ -__version__ = "0.10.0" \ No newline at end of file +__version__ = "0.11.2" \ No newline at end of file diff -Nru htseq-0.10.0/python2/src/HTSeq/_HTSeq.pxd htseq-0.11.2/python2/src/HTSeq/_HTSeq.pxd --- htseq-0.10.0/python2/src/HTSeq/_HTSeq.pxd 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python2/src/HTSeq/_HTSeq.pxd 2019-01-08 02:36:23.000000000 +0000 @@ -7,47 +7,47 @@ cdef public long end cdef str _strand - cpdef is_contained_in( self, GenomicInterval iv ) - cpdef contains( self, GenomicInterval iv ) - cpdef overlaps( self, GenomicInterval iv ) - cpdef extend_to_include( GenomicInterval self, GenomicInterval iv ) + cpdef is_contained_in(self, GenomicInterval iv) + cpdef contains(self, GenomicInterval iv) + cpdef overlaps(self, GenomicInterval iv) + cpdef extend_to_include(GenomicInterval self, GenomicInterval iv) -cdef class GenomicPosition( GenomicInterval ): +cdef class GenomicPosition(GenomicInterval): pass -cdef class Sequence( object ): +cdef class Sequence(object): cdef public bytes seq cdef public str name cdef public str descr - cpdef Sequence get_reverse_complement( self ) - cpdef object add_bases_to_count_array( Sequence self, numpy.ndarray count_array_ ) - cpdef Sequence trim_left_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) - cpdef Sequence trim_right_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) + cpdef Sequence get_reverse_complement(self, bint rename=?) + cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) + cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=?) + cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=?) -cdef class SequenceWithQualities( Sequence ): +cdef class SequenceWithQualities(Sequence): cdef readonly bytes _qualstr cdef readonly bytes _qualstr_phred cdef readonly str _qualscale cdef readonly object _qualarr - cdef _fill_qual_arr( SequenceWithQualities self ) - cpdef object add_qual_to_count_array( SequenceWithQualities self, numpy.ndarray count_array_ ) - cpdef SequenceWithQualities trim_left_end_with_quals( SequenceWithQualities self, - Sequence pattern, int max_mm_qual = ? ) - cpdef SequenceWithQualities trim_right_end_with_quals( SequenceWithQualities self, - Sequence pattern, int max_mm_qual = ? ) + cdef _fill_qual_arr(SequenceWithQualities self) + cpdef object add_qual_to_count_array(SequenceWithQualities self, numpy.ndarray count_array_) + cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, + Sequence pattern, int max_mm_qual=?) + cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, + Sequence pattern, int max_mm_qual=?) -cdef class Alignment( object ): +cdef class Alignment(object): cdef public SequenceWithQualities _read cdef public GenomicInterval iv -cdef class AlignmentWithSequenceReversal( Alignment ): +cdef class AlignmentWithSequenceReversal(Alignment): cdef public SequenceWithQualities read_as_aligned cdef public SequenceWithQualities _read_as_sequenced -cdef class SAM_Alignment( AlignmentWithSequenceReversal ): +cdef class SAM_Alignment(AlignmentWithSequenceReversal): cdef public list cigar cdef public int aQual cdef public GenomicPosition mate_start diff -Nru htseq-0.10.0/python2/src/HTSeq/_HTSeq.pyx htseq-0.11.2/python2/src/HTSeq/_HTSeq.pyx --- htseq-0.10.0/python2/src/HTSeq/_HTSeq.pyx 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python2/src/HTSeq/_HTSeq.pyx 2019-01-08 02:36:23.000000000 +0000 @@ -651,10 +651,15 @@ self.name = name self.descr = None - cpdef Sequence get_reverse_complement(self): - return Sequence( - reverse_complement(self.seq), - "revcomp_of_" + self.name) + cpdef Sequence get_reverse_complement(self, bint rename=True): + if rename: + return Sequence( + reverse_complement(self.seq), + "revcomp_of_" + self.name) + else: + return Sequence( + reverse_complement(self.seq), + self.name) def __str__(self): return self.seq @@ -903,13 +908,20 @@ self.write_to_fastq_file(sio, convert_to_phred) return sio.getvalue() - cpdef SequenceWithQualities get_reverse_complement(self): + cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): cdef SequenceWithQualities res - res = SequenceWithQualities( - reverse_complement(self.seq), - "revcomp_of_" + self.name, - self._qualstr[::-1], - self._qualscale) + if rename: + res = SequenceWithQualities( + reverse_complement(self.seq), + "revcomp_of_" + self.name, + self._qualstr[::-1], + self._qualscale) + else: + res = SequenceWithQualities( + reverse_complement(self.seq), + self.name, + self._qualstr[::-1], + self._qualscale) if self._qualarr is not None: res._qualarr = self._qualarr[::-1] return res diff -Nru htseq-0.10.0/python2/src/_HTSeq.c htseq-0.11.2/python2/src/_HTSeq.c --- htseq-0.10.0/python2/src/_HTSeq.c 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python2/src/_HTSeq.c 2019-01-08 02:36:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Generated by Cython 0.28.2 */ +/* Generated by Cython 0.29.2 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,7 +7,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_28_2" +#define CYTHON_ABI "0_29_2" +#define CYTHON_HEX_VERSION 0x001D02F0 #define CYTHON_FUTURE_DIVISION 0 #include #ifndef offsetof @@ -78,6 +79,10 @@ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 @@ -115,6 +120,10 @@ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 @@ -168,11 +177,17 @@ #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000) + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) @@ -182,6 +197,9 @@ #undef SHIFT #undef BASE #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 @@ -308,6 +326,9 @@ #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 @@ -321,15 +342,40 @@ #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))))) + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif +#if CYTHON_USE_DICT_VERSIONS +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ + } +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) @@ -437,8 +483,8 @@ #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else @@ -453,6 +499,7 @@ #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact + #define PyObject_Unicode PyObject_Str #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) @@ -593,6 +640,9 @@ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) @@ -649,8 +699,9 @@ #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) -#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) @@ -731,7 +782,7 @@ if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); @@ -757,7 +808,7 @@ static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; -static PyObject *__pyx_cython_runtime; +static PyObject *__pyx_cython_runtime = NULL; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; @@ -833,7 +884,7 @@ } __Pyx_BufFmt_Context; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":730 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -842,7 +893,7 @@ */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":731 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -851,7 +902,7 @@ */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":732 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -860,7 +911,7 @@ */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":733 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -869,7 +920,7 @@ */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":737 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -878,7 +929,7 @@ */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":738 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -887,7 +938,7 @@ */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":739 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -896,7 +947,7 @@ */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":740 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -905,7 +956,7 @@ */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":744 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -914,7 +965,7 @@ */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":745 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -923,7 +974,7 @@ */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":754 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -932,7 +983,7 @@ */ typedef npy_long __pyx_t_5numpy_int_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":755 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< @@ -941,7 +992,7 @@ */ typedef npy_longlong __pyx_t_5numpy_long_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":756 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -950,7 +1001,7 @@ */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":758 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -959,7 +1010,7 @@ */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":759 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< @@ -968,7 +1019,7 @@ */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":760 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -977,7 +1028,7 @@ */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":762 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -986,7 +1037,7 @@ */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":763 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -995,7 +1046,7 @@ */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":765 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1004,7 +1055,7 @@ */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":766 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1013,7 +1064,7 @@ */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":767 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1060,7 +1111,7 @@ struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation; struct __pyx_obj_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":769 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1069,7 +1120,7 @@ */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1078,7 +1129,7 @@ */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":771 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1087,7 +1138,7 @@ */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -1095,19 +1146,33 @@ * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; +struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement; struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end; struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_right_end; struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals; struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals; +struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement; struct __pyx_opt_args_5HTSeq_6_HTSeq_parse_cigar; struct __pyx_opt_args_5HTSeq_6_HTSeq_build_cigar_list; struct __pyx_opt_args_5HTSeq_6_HTSeq_quotesafe_split; +/* "HTSeq/_HTSeq.pxd":23 + * cdef public str name + * cdef public str descr + * cpdef Sequence get_reverse_complement(self, bint rename=?) # <<<<<<<<<<<<<< + * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) + * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=?) + */ +struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement { + int __pyx_n; + int rename; +}; + /* "HTSeq/_HTSeq.pxd":25 - * cpdef Sequence get_reverse_complement( self ) - * cpdef object add_bases_to_count_array( Sequence self, numpy.ndarray count_array_ ) - * cpdef Sequence trim_left_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) # <<<<<<<<<<<<<< - * cpdef Sequence trim_right_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) + * cpdef Sequence get_reverse_complement(self, bint rename=?) + * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) + * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=?) # <<<<<<<<<<<<<< + * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=?) * */ struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end { @@ -1116,9 +1181,9 @@ }; /* "HTSeq/_HTSeq.pxd":26 - * cpdef object add_bases_to_count_array( Sequence self, numpy.ndarray count_array_ ) - * cpdef Sequence trim_left_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) - * cpdef Sequence trim_right_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) # <<<<<<<<<<<<<< + * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) + * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=?) + * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=?) # <<<<<<<<<<<<<< * * */ @@ -1128,11 +1193,11 @@ }; /* "HTSeq/_HTSeq.pxd":36 - * cdef _fill_qual_arr( SequenceWithQualities self ) - * cpdef object add_qual_to_count_array( SequenceWithQualities self, numpy.ndarray count_array_ ) - * cpdef SequenceWithQualities trim_left_end_with_quals( SequenceWithQualities self, # <<<<<<<<<<<<<< - * Sequence pattern, int max_mm_qual = ? ) - * cpdef SequenceWithQualities trim_right_end_with_quals( SequenceWithQualities self, + * cdef _fill_qual_arr(SequenceWithQualities self) + * cpdef object add_qual_to_count_array(SequenceWithQualities self, numpy.ndarray count_array_) + * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< + * Sequence pattern, int max_mm_qual=?) + * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, */ struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals { int __pyx_n; @@ -1140,10 +1205,10 @@ }; /* "HTSeq/_HTSeq.pxd":38 - * cpdef SequenceWithQualities trim_left_end_with_quals( SequenceWithQualities self, - * Sequence pattern, int max_mm_qual = ? ) - * cpdef SequenceWithQualities trim_right_end_with_quals( SequenceWithQualities self, # <<<<<<<<<<<<<< - * Sequence pattern, int max_mm_qual = ? ) + * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, + * Sequence pattern, int max_mm_qual=?) + * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< + * Sequence pattern, int max_mm_qual=?) * */ struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals { @@ -1151,7 +1216,19 @@ int max_mm_qual; }; -/* "HTSeq/_HTSeq.pyx":1155 +/* "HTSeq/_HTSeq.pyx":911 + * return sio.getvalue() + * + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< + * cdef SequenceWithQualities res + * if rename: + */ +struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement { + int __pyx_n; + int rename; +}; + +/* "HTSeq/_HTSeq.pyx":1167 * _re_cigar_codes = re.compile('([MIDNSHP=X])') * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -1165,7 +1242,7 @@ PyObject *strand; }; -/* "HTSeq/_HTSeq.pyx":1172 +/* "HTSeq/_HTSeq.pyx":1184 * return build_cigar_list(cl, ref_left, chrom, strand) * * cpdef list build_cigar_list(list cigar_pairs, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -1179,7 +1256,7 @@ PyObject *strand; }; -/* "HTSeq/_HTSeq.pyx":1559 +/* "HTSeq/_HTSeq.pyx":1571 * ########################### * * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): # <<<<<<<<<<<<<< @@ -1210,9 +1287,9 @@ /* "HTSeq/_HTSeq.pxd":15 - * cpdef extend_to_include( GenomicInterval self, GenomicInterval iv ) + * cpdef extend_to_include(GenomicInterval self, GenomicInterval iv) * - * cdef class GenomicPosition( GenomicInterval ): # <<<<<<<<<<<<<< + * cdef class GenomicPosition(GenomicInterval): # <<<<<<<<<<<<<< * pass * */ @@ -1224,7 +1301,7 @@ /* "HTSeq/_HTSeq.pxd":19 * * - * cdef class Sequence( object ): # <<<<<<<<<<<<<< + * cdef class Sequence(object): # <<<<<<<<<<<<<< * cdef public bytes seq * cdef public str name */ @@ -1240,7 +1317,7 @@ /* "HTSeq/_HTSeq.pxd":29 * * - * cdef class SequenceWithQualities( Sequence ): # <<<<<<<<<<<<<< + * cdef class SequenceWithQualities(Sequence): # <<<<<<<<<<<<<< * cdef readonly bytes _qualstr * cdef readonly bytes _qualstr_phred */ @@ -1256,7 +1333,7 @@ /* "HTSeq/_HTSeq.pxd":42 * * - * cdef class Alignment( object ): # <<<<<<<<<<<<<< + * cdef class Alignment(object): # <<<<<<<<<<<<<< * cdef public SequenceWithQualities _read * cdef public GenomicInterval iv */ @@ -1270,7 +1347,7 @@ /* "HTSeq/_HTSeq.pxd":46 * cdef public GenomicInterval iv * - * cdef class AlignmentWithSequenceReversal( Alignment ): # <<<<<<<<<<<<<< + * cdef class AlignmentWithSequenceReversal(Alignment): # <<<<<<<<<<<<<< * cdef public SequenceWithQualities read_as_aligned * cdef public SequenceWithQualities _read_as_sequenced */ @@ -1284,7 +1361,7 @@ /* "HTSeq/_HTSeq.pxd":50 * cdef public SequenceWithQualities _read_as_sequenced * - * cdef class SAM_Alignment( AlignmentWithSequenceReversal ): # <<<<<<<<<<<<<< + * cdef class SAM_Alignment(AlignmentWithSequenceReversal): # <<<<<<<<<<<<<< * cdef public list cigar * cdef public int aQual */ @@ -1341,7 +1418,7 @@ }; -/* "HTSeq/_HTSeq.pyx":1075 +/* "HTSeq/_HTSeq.pyx":1087 * * * cdef class BowtieAlignment(AlignmentWithSequenceReversal): # <<<<<<<<<<<<<< @@ -1355,7 +1432,7 @@ }; -/* "HTSeq/_HTSeq.pyx":1111 +/* "HTSeq/_HTSeq.pyx":1123 * 'X': 'sequence-mismatched'} * * cdef class CigarOperation(object): # <<<<<<<<<<<<<< @@ -1426,7 +1503,7 @@ */ struct __pyx_vtabstruct_5HTSeq_6_HTSeq_Sequence { - struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*get_reverse_complement)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch); + struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*get_reverse_complement)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args); PyObject *(*add_bases_to_count_array)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, PyArrayObject *, int __pyx_skip_dispatch); struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*trim_left_end)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end *__pyx_optional_args); struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*trim_right_end)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_right_end *__pyx_optional_args); @@ -1434,7 +1511,7 @@ static struct __pyx_vtabstruct_5HTSeq_6_HTSeq_Sequence *__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence; -/* "HTSeq/_HTSeq.pyx":790 +/* "HTSeq/_HTSeq.pyx":795 * * * cdef class SequenceWithQualities(Sequence): # <<<<<<<<<<<<<< @@ -1448,7 +1525,7 @@ PyObject *(*add_qual_to_count_array)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, PyArrayObject *, int __pyx_skip_dispatch); struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*trim_left_end_with_quals)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals *__pyx_optional_args); struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*trim_right_end_with_quals)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals *__pyx_optional_args); - struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*get_reverse_complement)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, int __pyx_skip_dispatch); + struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*get_reverse_complement)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args); }; static struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities; @@ -1595,13 +1672,6 @@ /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); -/* PyCFunctionFastCall.proto */ -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); -#else -#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) -#endif - /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ @@ -1611,6 +1681,18 @@ #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall.proto */ @@ -1625,9 +1707,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif -/* PyObjectCallOneArg.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); - /* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); @@ -1635,6 +1714,16 @@ #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); @@ -1648,7 +1737,28 @@ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /* GetModuleGlobalName.proto */ -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif + +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); /* IncludeStringH.proto */ #include @@ -1674,13 +1784,8 @@ PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); -/* PyIntBinop.proto */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); -#else -#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ - PyObject_RichCompare(op1, op2, Py_EQ) - #endif +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ @@ -1757,6 +1862,7 @@ PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, @@ -1822,6 +1928,9 @@ /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); @@ -1953,6 +2062,11 @@ /* None.proto */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) @@ -1992,6 +2106,9 @@ /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + /* UnpackUnboundCMethod.proto */ typedef struct { PyObject *type; @@ -2017,11 +2134,11 @@ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\ (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\ (PY_VERSION_HEX >= 0x030700A0 ?\ - (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ - (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ + (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\ (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\ - (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ - (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ + (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\ + (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\ __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\ __Pyx__CallUnboundCMethod0(cfunc, self)) @@ -2061,12 +2178,24 @@ /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + /* ClassMethod.proto */ #include "descrobject.h" static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* GetNameInClass.proto */ -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK @@ -2261,21 +2390,6 @@ /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); -/* PyIdentifierFromString.proto */ -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) -#else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif -#endif - -/* ModuleImport.proto */ -static PyObject *__Pyx_ImportModule(const char *name); - -/* TypeImport.proto */ -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); - /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); @@ -2283,13 +2397,13 @@ static PyObject *__pyx_f_5HTSeq_6_HTSeq_15GenomicInterval_contains(struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_iv, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_15GenomicInterval_overlaps(struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_iv, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_15GenomicInterval_extend_to_include(struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_iv, int __pyx_skip_dispatch); /* proto*/ -static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_8Sequence_add_bases_to_count_array(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, PyArrayObject *__pyx_v_count_array_, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_trim_left_end(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end *__pyx_optional_args); /* proto*/ static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_trim_right_end(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_right_end *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities__fill_qual_arr(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self); /* proto*/ -struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ -struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args); /* proto*/ +struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_add_qual_to_count_array(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, PyArrayObject *__pyx_v_count_array_, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals *__pyx_optional_args); /* proto*/ static struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals *__pyx_optional_args); /* proto*/ @@ -2406,16 +2520,16 @@ static const char __pyx_k_re[] = "re"; static const char __pyx_k_se[] = "se"; static const char __pyx_k_Inf[] = "Inf"; -static const char __pyx_k__12[] = "\n"; -static const char __pyx_k__13[] = " "; -static const char __pyx_k__14[] = "+\n"; -static const char __pyx_k__18[] = "\t"; -static const char __pyx_k__20[] = "="; -static const char __pyx_k__21[] = ":"; -static const char __pyx_k__22[] = ","; -static const char __pyx_k__27[] = "*"; -static const char __pyx_k__34[] = ";"; -static const char __pyx_k__35[] = "\""; +static const char __pyx_k__11[] = "\n"; +static const char __pyx_k__12[] = " "; +static const char __pyx_k__13[] = "+\n"; +static const char __pyx_k__14[] = "\t"; +static const char __pyx_k__15[] = "="; +static const char __pyx_k__16[] = ":"; +static const char __pyx_k__17[] = ","; +static const char __pyx_k__18[] = "*"; +static const char __pyx_k__23[] = ";"; +static const char __pyx_k__24[] = "\""; static const char __pyx_k_add[] = "add"; static const char __pyx_k_chr[] = "chr"; static const char __pyx_k_csv[] = "csv"; @@ -2510,6 +2624,7 @@ static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_ref_iv[] = "ref_iv"; +static const char __pyx_k_rename[] = "rename"; static const char __pyx_k_rstrip[] = "rstrip"; static const char __pyx_k_second[] = "second"; static const char __pyx_k_solexa[] = "solexa"; @@ -2537,6 +2652,7 @@ static const char __pyx_k_unknown[] = "unknown"; static const char __pyx_k_unnamed[] = "unnamed"; static const char __pyx_k_KeyError[] = "KeyError"; +static const char __pyx_k_Sequence[] = "Sequence"; static const char __pyx_k_StringIO[] = "StringIO"; static const char __pyx_k_contains[] = "contains"; static const char __pyx_k_filename[] = "filename"; @@ -2553,6 +2669,7 @@ static const char __pyx_k_stranded[] = "stranded"; static const char __pyx_k_typecode[] = "typecode"; static const char __pyx_k_warnings[] = "warnings"; +static const char __pyx_k_Alignment[] = "Alignment"; static const char __pyx_k_MIDNSHP_X[] = "([MIDNSHP=X])"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_add_chrom[] = "add_chrom"; @@ -2580,6 +2697,7 @@ static const char __pyx_k_s_object_s[] = "<%s object '%s'>"; static const char __pyx_k_solexa_old[] = "solexa-old"; static const char __pyx_k_AlignedRead[] = "AlignedRead"; +static const char __pyx_k_ChromVector[] = "ChromVector"; static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_bowtie_line[] = "bowtie_line"; @@ -2590,6 +2708,7 @@ static const char __pyx_k_is_unmapped[] = "is_unmapped"; static const char __pyx_k_max_mm_qual[] = "max_mm_qual"; static const char __pyx_k_start_index[] = "start_index"; +static const char __pyx_k_GenomicArray[] = "GenomicArray"; static const char __pyx_k_HTSeq__HTSeq[] = "HTSeq._HTSeq"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_cigar_string[] = "cigar_string"; @@ -2602,6 +2721,7 @@ static const char __pyx_k_s_object_s_s[] = "<%s object, %s, %s>"; static const char __pyx_k_soft_clipped[] = "soft-clipped"; static const char __pyx_k_stringsource[] = "stringsource"; +static const char __pyx_k_SAM_Alignment[] = "SAM_Alignment"; static const char __pyx_k_chrom_vectors[] = "chrom_vectors"; static const char __pyx_k_from_SAM_line[] = "from_SAM_line"; static const char __pyx_k_mismatch_prop[] = "mismatch_prop"; @@ -2610,6 +2730,7 @@ static const char __pyx_k_track_options[] = "track_options"; static const char __pyx_k_trim_left_end[] = "trim_left_end"; static const char __pyx_k_AlignedSegment[] = "AlignedSegment"; +static const char __pyx_k_CigarOperation[] = "CigarOperation"; static const char __pyx_k_HTSeq_internal[] = "_HTSeq_internal"; static const char __pyx_k_base_to_column[] = "base_to_column"; static const char __pyx_k_is_proper_pair[] = "is_proper_pair"; @@ -2618,6 +2739,9 @@ static const char __pyx_k_re_cigar_codes[] = "_re_cigar_codes"; static const char __pyx_k_stop_too_large[] = "stop too large"; static const char __pyx_k_trim_right_end[] = "trim_right_end"; +static const char __pyx_k_BowtieAlignment[] = "BowtieAlignment"; +static const char __pyx_k_GenomicInterval[] = "GenomicInterval"; +static const char __pyx_k_GenomicPosition[] = "GenomicPosition"; static const char __pyx_k_Paired_end_read[] = "Paired-end read"; static const char __pyx_k_Strand_mismatch[] = "Strand mismatch."; static const char __pyx_k_is_contained_in[] = "is_contained_in"; @@ -2657,6 +2781,7 @@ static const char __pyx_k_iadd___locals_addval[] = "__iadd__..addval"; static const char __pyx_k_next_reference_start[] = "next_reference_start"; static const char __pyx_k_GenomicArray_unpickle[] = "_GenomicArray_unpickle"; +static const char __pyx_k_SequenceWithQualities[] = "SequenceWithQualities"; static const char __pyx_k_cigar_operation_codes[] = "cigar_operation_codes"; static const char __pyx_k_cigar_operation_names[] = "cigar_operation_names"; static const char __pyx_k_s_object_s_d_strand_s[] = "<%s object '%s':%d, strand '%s'>"; @@ -2689,6 +2814,7 @@ static const char __pyx_k_Inconsistent_CIGAR_operation[] = "Inconsistent CIGAR operation."; static const char __pyx_k_python2_src_HTSeq__HTSeq_pyx[] = "python2/src/HTSeq/_HTSeq.pyx"; static const char __pyx_k_pyx_unpickle_BowtieAlignment[] = "__pyx_unpickle_BowtieAlignment"; +static const char __pyx_k_AlignmentWithSequenceReversal[] = "AlignmentWithSequenceReversal"; static const char __pyx_k_only_be_used_with_storage_type[] = " only be used with storage type 'StepVector'."; static const char __pyx_k_pyx_unpickle_AlignmentWithSequ[] = "__pyx_unpickle_AlignmentWithSequenceReversal"; static const char __pyx_k_s_d_base_s_s_on_ref_iv_s_query[] = "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >"; @@ -2741,26 +2867,34 @@ static PyObject *__pyx_n_s_A; static PyObject *__pyx_n_s_AlignedRead; static PyObject *__pyx_n_s_AlignedSegment; +static PyObject *__pyx_n_s_Alignment; +static PyObject *__pyx_n_s_AlignmentWithSequenceReversal; static PyObject *__pyx_kp_s_Automatic_adding_of_chromosomes; static PyObject *__pyx_n_s_B; +static PyObject *__pyx_n_s_BowtieAlignment; static PyObject *__pyx_n_s_C; static PyObject *__pyx_kp_s_Cannot_assign_to_zero_length_int; static PyObject *__pyx_kp_s_Cannot_extend_an_interval_to_inc; static PyObject *__pyx_kp_s_Cannot_extend_an_interval_to_inc_2; static PyObject *__pyx_kp_s_Cannot_extend_an_interval_to_inc_3; static PyObject *__pyx_kp_s_Cannot_subset_to_zero_length_int; +static PyObject *__pyx_n_s_ChromVector; static PyObject *__pyx_n_s_ChromVector_steps; static PyObject *__pyx_n_s_ChromVector_unpickle; static PyObject *__pyx_kp_s_Chromosome_name_mismatch; +static PyObject *__pyx_n_s_CigarOperation; static PyObject *__pyx_n_s_D; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_n_s_G; +static PyObject *__pyx_n_s_GenomicArray; static PyObject *__pyx_n_s_GenomicArray_steps; static PyObject *__pyx_n_s_GenomicArray_unpickle; +static PyObject *__pyx_n_s_GenomicInterval; static PyObject *__pyx_n_s_GenomicInterval_from_directional; static PyObject *__pyx_n_s_GenomicInterval_xrange; static PyObject *__pyx_n_s_GenomicInterval_xranged; +static PyObject *__pyx_n_s_GenomicPosition; static PyObject *__pyx_n_s_H; static PyObject *__pyx_n_s_HTSeq__HTSeq; static PyObject *__pyx_n_s_HTSeq_internal; @@ -2803,10 +2937,13 @@ static PyObject *__pyx_kp_s_Required_assignment_signature_no; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_s_S; +static PyObject *__pyx_n_s_SAM_Alignment; static PyObject *__pyx_kp_s_SAM_line_does_not_contain_at_lea; static PyObject *__pyx_kp_s_SAM_optional_field_tag_s_not_fou; static PyObject *__pyx_kp_s_SAM_optional_field_tag_s_not_uni; static PyObject *__pyx_kp_s_SAM_optional_field_with_illegal; +static PyObject *__pyx_n_s_Sequence; +static PyObject *__pyx_n_s_SequenceWithQualities; static PyObject *__pyx_kp_s_Sequence_in_SAM_file_contains_wh; static PyObject *__pyx_kp_s_Sequence_in_SAM_file_contains_wh_2; static PyObject *__pyx_kp_s_Start_of_interval_is_after_its_e; @@ -2823,19 +2960,19 @@ static PyObject *__pyx_n_s_ValueError; static PyObject *__pyx_n_s_X; static PyObject *__pyx_n_s_Z; +static PyObject *__pyx_kp_s__11; static PyObject *__pyx_kp_s__12; static PyObject *__pyx_kp_s__13; static PyObject *__pyx_kp_s__14; +static PyObject *__pyx_kp_s__15; +static PyObject *__pyx_kp_s__16; +static PyObject *__pyx_kp_s__17; static PyObject *__pyx_kp_s__18; static PyObject *__pyx_kp_s__2; -static PyObject *__pyx_kp_s__20; -static PyObject *__pyx_kp_s__21; -static PyObject *__pyx_kp_s__22; -static PyObject *__pyx_kp_s__27; +static PyObject *__pyx_kp_b__23; +static PyObject *__pyx_kp_b__24; static PyObject *__pyx_kp_b__3; static PyObject *__pyx_kp_s__3; -static PyObject *__pyx_kp_b__34; -static PyObject *__pyx_kp_b__35; static PyObject *__pyx_kp_s__8; static PyObject *__pyx_kp_s__9; static PyObject *__pyx_n_s_a; @@ -3023,6 +3160,7 @@ static PyObject *__pyx_n_s_reference_end; static PyObject *__pyx_n_s_reference_id; static PyObject *__pyx_n_s_reference_start; +static PyObject *__pyx_n_s_rename; static PyObject *__pyx_n_s_revcomp_of; static PyObject *__pyx_n_s_rfrom; static PyObject *__pyx_n_s_rstrip; @@ -3197,7 +3335,7 @@ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_6_make_translation_table_for_complementation(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8reverse_complement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */ static int __pyx_pf_5HTSeq_6_HTSeq_8Sequence___init__(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_name); /* proto */ -static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_v_rename); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_4__str__(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_6__repr__(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_5HTSeq_6_HTSeq_8Sequence_8__len__(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self); /* proto */ @@ -3226,7 +3364,7 @@ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_7qualstr___get__(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_6write_to_fastq_file(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, PyObject *__pyx_v_fastq_file); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_8get_fastq_str(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_v_convert_to_phred); /* proto */ -static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_v_rename); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_12add_qual_to_count_array(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, PyArrayObject *__pyx_v_count_array_); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_14trim_left_end_with_quals(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_v_max_mm_qual); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_16trim_right_end_with_quals(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_v_max_mm_qual); /* proto */ @@ -3367,51 +3505,38 @@ static PyObject *__pyx_k__7; static PyObject *__pyx_slice__4; static PyObject *__pyx_tuple__5; -static PyObject *__pyx_slice__11; -static PyObject *__pyx_slice__16; -static PyObject *__pyx_slice__17; -static PyObject *__pyx_slice__29; -static PyObject *__pyx_slice__30; -static PyObject *__pyx_slice__31; -static PyObject *__pyx_tuple__10; -static PyObject *__pyx_tuple__15; -static PyObject *__pyx_tuple__19; -static PyObject *__pyx_tuple__23; -static PyObject *__pyx_tuple__24; +static PyObject *__pyx_slice__10; +static PyObject *__pyx_slice__19; +static PyObject *__pyx_slice__20; +static PyObject *__pyx_slice__21; +static PyObject *__pyx_tuple__22; static PyObject *__pyx_tuple__25; static PyObject *__pyx_tuple__26; +static PyObject *__pyx_tuple__27; static PyObject *__pyx_tuple__28; +static PyObject *__pyx_tuple__29; +static PyObject *__pyx_tuple__30; +static PyObject *__pyx_tuple__31; static PyObject *__pyx_tuple__32; -static PyObject *__pyx_tuple__33; +static PyObject *__pyx_tuple__34; static PyObject *__pyx_tuple__36; -static PyObject *__pyx_tuple__37; static PyObject *__pyx_tuple__38; -static PyObject *__pyx_tuple__39; static PyObject *__pyx_tuple__40; static PyObject *__pyx_tuple__41; -static PyObject *__pyx_tuple__42; static PyObject *__pyx_tuple__43; -static PyObject *__pyx_tuple__44; static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__47; static PyObject *__pyx_tuple__49; -static PyObject *__pyx_tuple__51; -static PyObject *__pyx_tuple__53; -static PyObject *__pyx_tuple__54; -static PyObject *__pyx_tuple__56; -static PyObject *__pyx_tuple__58; -static PyObject *__pyx_tuple__60; -static PyObject *__pyx_tuple__62; static PyObject *__pyx_codeobj__6; +static PyObject *__pyx_codeobj__33; +static PyObject *__pyx_codeobj__35; +static PyObject *__pyx_codeobj__37; +static PyObject *__pyx_codeobj__39; +static PyObject *__pyx_codeobj__42; +static PyObject *__pyx_codeobj__44; static PyObject *__pyx_codeobj__46; static PyObject *__pyx_codeobj__48; static PyObject *__pyx_codeobj__50; -static PyObject *__pyx_codeobj__52; -static PyObject *__pyx_codeobj__55; -static PyObject *__pyx_codeobj__57; -static PyObject *__pyx_codeobj__59; -static PyObject *__pyx_codeobj__61; -static PyObject *__pyx_codeobj__63; /* Late includes */ /* "HTSeq/_HTSeq.pyx":53 @@ -3974,12 +4099,9 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error) - } + __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, 82, __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))) { @@ -4140,7 +4262,7 @@ */ __pyx_t_4 = __Pyx_PyInt_From_long(__pyx_v_self->end); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_sys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_maxint); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 88, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -4288,7 +4410,7 @@ */ __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v_self->end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_sys); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_maxint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -5331,14 +5453,6 @@ * return False */ break; - - /* "HTSeq/_HTSeq.pyx":160 - * return self._strand is other._strand and \ - * self.start == other.start and self.end == other.end - * elif op == 3: # != # <<<<<<<<<<<<<< - * return not (self == other) - * else: - */ case 3: /* "HTSeq/_HTSeq.pyx":161 @@ -5501,69 +5615,56 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; - int __pyx_t_8; __Pyx_RefNannySetupContext("is_contained_in", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_contained_in); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_15is_contained_in)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_contained_in); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_15is_contained_in)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_iv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_iv)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":179 @@ -5574,9 +5675,9 @@ * if self.chrom != iv.chrom: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 179, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 179, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "HTSeq/_HTSeq.pyx":180 * """ @@ -5606,9 +5707,9 @@ * return False * if self._strand is not strand_nostrand and iv.strand is not strand_nostrand and \ */ - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 181, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 181, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":182 * return False @@ -5638,21 +5739,21 @@ * self.strand is not iv._strand: * return False */ - __pyx_t_6 = (__pyx_v_self->_strand != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); - __pyx_t_8 = (__pyx_t_6 != 0); - if (__pyx_t_8) { + __pyx_t_5 = (__pyx_v_self->_strand != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { } else { - __pyx_t_7 = __pyx_t_8; + __pyx_t_6 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_7 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = (__pyx_t_8 != 0); - if (__pyx_t_6) { + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { } else { - __pyx_t_7 = __pyx_t_6; + __pyx_t_6 = __pyx_t_5; goto __pyx_L6_bool_binop_done; } @@ -5665,10 +5766,10 @@ */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (__pyx_t_1 != __pyx_v_iv->_strand); + __pyx_t_5 = (__pyx_t_1 != __pyx_v_iv->_strand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = (__pyx_t_6 != 0); - __pyx_t_7 = __pyx_t_8; + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_6 = __pyx_t_7; __pyx_L6_bool_binop_done:; /* "HTSeq/_HTSeq.pyx":183 @@ -5678,7 +5779,7 @@ * self.strand is not iv._strand: * return False */ - if (__pyx_t_7) { + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":185 * if self._strand is not strand_nostrand and iv.strand is not strand_nostrand and \ @@ -5708,16 +5809,16 @@ * return False * return True */ - __pyx_t_8 = ((__pyx_v_self->start < __pyx_v_iv->start) != 0); - if (!__pyx_t_8) { + __pyx_t_7 = ((__pyx_v_self->start < __pyx_v_iv->start) != 0); + if (!__pyx_t_7) { } else { - __pyx_t_7 = __pyx_t_8; + __pyx_t_6 = __pyx_t_7; goto __pyx_L10_bool_binop_done; } - __pyx_t_8 = ((__pyx_v_self->end > __pyx_v_iv->end) != 0); - __pyx_t_7 = __pyx_t_8; + __pyx_t_7 = ((__pyx_v_self->end > __pyx_v_iv->end) != 0); + __pyx_t_6 = __pyx_t_7; __pyx_L10_bool_binop_done:; - if (__pyx_t_7) { + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":187 * return False @@ -5766,7 +5867,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicInterval.is_contained_in", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -5833,67 +5933,54 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + int __pyx_t_5; __Pyx_RefNannySetupContext("contains", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contains); 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)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_17contains)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contains); 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_5HTSeq_6_HTSeq_15GenomicInterval_17contains)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_iv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 190, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_iv)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":196 @@ -5904,9 +5991,9 @@ * return iv.is_contained_in(self) */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 196, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 196, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "HTSeq/_HTSeq.pyx":197 * """ @@ -5957,7 +6044,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicInterval.contains", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -6024,69 +6110,56 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; - int __pyx_t_8; __Pyx_RefNannySetupContext("overlaps", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_19overlaps)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_19overlaps)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_iv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_iv)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":210 @@ -6097,9 +6170,9 @@ * if self.chrom != iv.chrom: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 210, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "HTSeq/_HTSeq.pyx":211 * """ @@ -6129,9 +6202,9 @@ * return False * if self.strand is not strand_nostrand and iv.strand is not strand_nostrand and \ */ - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 212, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 212, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":213 * return False @@ -6163,22 +6236,22 @@ */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_5 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = (__pyx_t_6 != 0); - if (__pyx_t_8) { + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { } else { - __pyx_t_7 = __pyx_t_8; + __pyx_t_6 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_7 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = (__pyx_t_8 != 0); - if (__pyx_t_6) { + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { } else { - __pyx_t_7 = __pyx_t_6; + __pyx_t_6 = __pyx_t_5; goto __pyx_L6_bool_binop_done; } @@ -6193,11 +6266,11 @@ __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = (__pyx_t_1 != __pyx_t_2); + __pyx_t_5 = (__pyx_t_1 != __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = (__pyx_t_6 != 0); - __pyx_t_7 = __pyx_t_8; + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_6 = __pyx_t_7; __pyx_L6_bool_binop_done:; /* "HTSeq/_HTSeq.pyx":214 @@ -6207,7 +6280,7 @@ * self.strand is not iv.strand: * return False */ - if (__pyx_t_7) { + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":216 * if self.strand is not strand_nostrand and iv.strand is not strand_nostrand and \ @@ -6237,8 +6310,8 @@ * return self.end > iv.start * else: */ - __pyx_t_7 = ((__pyx_v_self->start <= __pyx_v_iv->start) != 0); - if (__pyx_t_7) { + __pyx_t_6 = ((__pyx_v_self->start <= __pyx_v_iv->start) != 0); + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":218 * return False @@ -6293,7 +6366,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicInterval.overlaps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -6431,7 +6503,7 @@ * def xrange_d(GenomicInterval self, long int step=1): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GenomicInterval_xrange); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -6599,7 +6671,7 @@ * cpdef extend_to_include(GenomicInterval self, GenomicInterval iv): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GenomicInterval_xranged); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -6696,72 +6768,59 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; - int __pyx_t_8; + long __pyx_t_8; long __pyx_t_9; long __pyx_t_10; - long __pyx_t_11; __Pyx_RefNannySetupContext("extend_to_include", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend_to_include); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_25extend_to_include)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend_to_include); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 234, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_25extend_to_include)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_iv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_iv)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":236 @@ -6771,9 +6830,9 @@ * raise TypeError, "Cannot extend an interval to include None." * if self.chrom != iv.chrom: */ - __pyx_t_6 = (((PyObject *)__pyx_v_iv) == Py_None); - __pyx_t_7 = (__pyx_t_6 != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_5 = (((PyObject *)__pyx_v_iv) == Py_None); + __pyx_t_6 = (__pyx_t_5 != 0); + if (unlikely(__pyx_t_6)) { /* "HTSeq/_HTSeq.pyx":237 * """Extend the interval such that it includes iv.""" @@ -6801,9 +6860,9 @@ * raise ValueError, "Cannot extend an interval to include an interval on another chromosome." * if self.strand is not strand_nostrand and iv.strand is not strand_nostrand and \ */ - __pyx_t_7 = (__Pyx_PyString_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) - __pyx_t_6 = (__pyx_t_7 != 0); - if (unlikely(__pyx_t_6)) { + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 238, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_6 != 0); + if (unlikely(__pyx_t_5)) { /* "HTSeq/_HTSeq.pyx":239 * raise TypeError, "Cannot extend an interval to include None." @@ -6833,22 +6892,22 @@ */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_6 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = (__pyx_t_7 != 0); - if (__pyx_t_8) { + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { } else { - __pyx_t_6 = __pyx_t_8; + __pyx_t_5 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_7 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = (__pyx_t_8 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_7 != 0); + if (__pyx_t_6) { } else { - __pyx_t_6 = __pyx_t_7; + __pyx_t_5 = __pyx_t_6; goto __pyx_L6_bool_binop_done; } @@ -6863,11 +6922,11 @@ __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (__pyx_t_1 != __pyx_t_2); + __pyx_t_6 = (__pyx_t_1 != __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = (__pyx_t_7 != 0); - __pyx_t_6 = __pyx_t_8; + __pyx_t_7 = (__pyx_t_6 != 0); + __pyx_t_5 = __pyx_t_7; __pyx_L6_bool_binop_done:; /* "HTSeq/_HTSeq.pyx":240 @@ -6877,7 +6936,7 @@ * self.strand is not iv.strand: * raise ValueError, "Cannot extend an interval to include an interval on another strand." */ - if (unlikely(__pyx_t_6)) { + if (unlikely(__pyx_t_5)) { /* "HTSeq/_HTSeq.pyx":242 * if self.strand is not strand_nostrand and iv.strand is not strand_nostrand and \ @@ -6905,14 +6964,14 @@ * self.end = max(self.end, iv.end) * */ - __pyx_t_9 = __pyx_v_iv->start; - __pyx_t_10 = __pyx_v_self->start; - if (((__pyx_t_9 < __pyx_t_10) != 0)) { - __pyx_t_11 = __pyx_t_9; + __pyx_t_8 = __pyx_v_iv->start; + __pyx_t_9 = __pyx_v_self->start; + if (((__pyx_t_8 < __pyx_t_9) != 0)) { + __pyx_t_10 = __pyx_t_8; } else { - __pyx_t_11 = __pyx_t_10; + __pyx_t_10 = __pyx_t_9; } - __pyx_v_self->start = __pyx_t_11; + __pyx_v_self->start = __pyx_t_10; /* "HTSeq/_HTSeq.pyx":244 * raise ValueError, "Cannot extend an interval to include an interval on another strand." @@ -6921,14 +6980,14 @@ * * def copy(self): */ - __pyx_t_11 = __pyx_v_iv->end; - __pyx_t_9 = __pyx_v_self->end; - if (((__pyx_t_11 > __pyx_t_9) != 0)) { - __pyx_t_10 = __pyx_t_11; + __pyx_t_10 = __pyx_v_iv->end; + __pyx_t_8 = __pyx_v_self->end; + if (((__pyx_t_10 > __pyx_t_8) != 0)) { + __pyx_t_9 = __pyx_t_10; } else { - __pyx_t_10 = __pyx_t_9; + __pyx_t_9 = __pyx_t_8; } - __pyx_v_self->end = __pyx_t_10; + __pyx_v_self->end = __pyx_t_9; /* "HTSeq/_HTSeq.pyx":234 * return _HTSeq_internal.GenomicInterval_xranged(self, step) @@ -6946,7 +7005,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicInterval.extend_to_include", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -7351,7 +7409,7 @@ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_1GenomicInterval_from_directional(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_1GenomicInterval_from_directional = {"GenomicInterval_from_directional", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_1GenomicInterval_from_directional, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_1GenomicInterval_from_directional = {"GenomicInterval_from_directional", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_1GenomicInterval_from_directional, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_1GenomicInterval_from_directional(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_chrom = 0; long __pyx_v_start_d; @@ -8542,7 +8600,7 @@ * else: * ncv.array = numpy.empty(shape=(iv.length, ), dtype=typecode) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -8584,7 +8642,7 @@ * elif storage == "memmap": */ /*else*/ { - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -8650,7 +8708,7 @@ * filename=os.path.join(memmap_dir, iv.chrom + iv.strand + ".nmm"), mode='w+') * elif storage == "step": */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_memmap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -8675,7 +8733,7 @@ * elif storage == "step": * ncv.array = StepVector.StepVector.create(typecode=typecode) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -8784,7 +8842,7 @@ * else: * raise ValueError, "Illegal storage mode." */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_StepVector); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_StepVector); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_StepVector); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -9646,12 +9704,9 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error) - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 391, __pyx_L1_error) @@ -10533,7 +10588,6 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("addval", 0); __pyx_outer_scope = (struct __pyx_obj_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__ *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; @@ -10557,12 +10611,9 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 445, __pyx_L1_error) - } + __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, 445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_y = __pyx_t_1; @@ -10588,38 +10639,10 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __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 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_cur_scope->__pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_cur_scope->__pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_value); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 446, __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; @@ -10648,7 +10671,6 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("HTSeq._HTSeq.ChromVector.__iadd__.addval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -10675,7 +10697,6 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__iadd__", 0); __pyx_cur_scope = (struct __pyx_obj_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__ *)__pyx_tp_new_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__(__pyx_ptype_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -10729,38 +10750,10 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_value}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_value}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 442, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_value); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_cur_scope->__pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_value); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 442, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -10796,48 +10789,20 @@ */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_apply); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_addval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_addval}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_addval}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_addval); - __Pyx_GIVEREF(__pyx_v_addval); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_addval); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); 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_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_addval) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_addval); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 448, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -10868,7 +10833,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.ChromVector.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -10928,12 +10892,9 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error) - } + __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, 452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; @@ -11053,7 +11014,6 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("steps", 0); /* "HTSeq/_HTSeq.pyx":458 @@ -11064,7 +11024,7 @@ * def apply(self, fun): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChromVector_steps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -11079,38 +11039,10 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 458, __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 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __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; @@ -11129,7 +11061,6 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("HTSeq._HTSeq.ChromVector.steps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -11194,12 +11125,9 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) - } + __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, 461, __pyx_L1_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)) { @@ -11311,38 +11239,10 @@ __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_value); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "HTSeq/_HTSeq.pyx":462 @@ -11354,14 +11254,14 @@ */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 462, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PyNumber_Subtract(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_7 = PyNumber_Subtract(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); /* "HTSeq/_HTSeq.pyx":463 * for iv, value in self.steps(): @@ -11380,12 +11280,12 @@ * self.offset] = fun(value) * */ - __pyx_t_9 = PyNumber_Subtract(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 462, __pyx_L1_error) + __pyx_t_9 = PyNumber_Subtract(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_PyObject_SetSlice(__pyx_v_self->array, __pyx_t_1, 0, 0, &__pyx_t_3, &__pyx_t_9, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 462, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_PyObject_SetSlice(__pyx_v_self->array, __pyx_t_1, 0, 0, &__pyx_t_7, &__pyx_t_9, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 462, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11569,7 +11469,7 @@ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ChromVector_unpickle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ChromVector_unpickle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 470, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "HTSeq/_HTSeq.pyx":471 @@ -12109,7 +12009,7 @@ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_3_ChromVector_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_3_ChromVector_unpickle = {"_ChromVector_unpickle", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_3_ChromVector_unpickle, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_3_ChromVector_unpickle = {"_ChromVector_unpickle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_3_ChromVector_unpickle, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_3_ChromVector_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_array = 0; PyObject *__pyx_v_iv = 0; @@ -12669,7 +12569,7 @@ } __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 507, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_maxint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); @@ -12937,7 +12837,6 @@ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); /* "HTSeq/_HTSeq.pyx":517 @@ -13047,41 +12946,11 @@ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 521, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -13134,15 +13003,15 @@ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 524, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 524, __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 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; @@ -13180,12 +13049,12 @@ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 526, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 526, __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_r = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; goto __pyx_L0; } @@ -13221,28 +13090,28 @@ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 529, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_chrom); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_strand); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, &__pyx_t_8, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, &__pyx_t_6, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 529, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; goto __pyx_L0; /* "HTSeq/_HTSeq.pyx":528 @@ -13267,23 +13136,23 @@ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 531, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_chrom); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 531, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, 0, &__pyx_t_3, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 0, &__pyx_t_3, &__pyx_t_6, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; @@ -13333,7 +13202,6 @@ __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicArray.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -13374,7 +13242,6 @@ PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__setitem__", 0); /* "HTSeq/_HTSeq.pyx":537 @@ -13437,12 +13304,9 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 540, __pyx_L1_error) - } + __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, 540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 540, __pyx_L1_error) @@ -13665,41 +13529,11 @@ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_7) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 550, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 550, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -13740,8 +13574,8 @@ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 552, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -13756,8 +13590,8 @@ __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_PyObject_SetSlice(__pyx_t_8, __pyx_v_value, 0, 0, &__pyx_t_4, &__pyx_t_5, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 552, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_PyObject_SetSlice(__pyx_t_3, __pyx_v_value, 0, 0, &__pyx_t_4, &__pyx_t_5, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 552, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -13809,12 +13643,12 @@ */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 556, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_PyObject_SetSlice(__pyx_t_5, __pyx_v_value, 0, 0, &__pyx_t_4, &__pyx_t_8, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 555, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 556, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_PyObject_SetSlice(__pyx_t_5, __pyx_v_value, 0, 0, &__pyx_t_4, &__pyx_t_3, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L18:; @@ -13857,7 +13691,6 @@ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicArray.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -13972,7 +13805,7 @@ * iv = GenomicInterval(chrom, start_index, sys.maxint, ".") * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maxint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -13990,7 +13823,7 @@ * else: * iv = GenomicInterval(chrom, start_index, start_index + length, ".") */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maxint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -14197,12 +14030,9 @@ __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 572, __pyx_L1_error) - } + __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, 572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 572, __pyx_L1_error) @@ -14467,7 +14297,7 @@ * def write_bedgraph_file(self, file_or_filename, strand=".", track_options=""): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GenomicArray_unpickle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_GenomicArray_unpickle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->stranded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -14615,13 +14445,13 @@ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; - Py_ssize_t __pyx_t_10; + int __pyx_t_10; int __pyx_t_11; - int __pyx_t_12; - Py_ssize_t __pyx_t_13; - PyObject *(*__pyx_t_14)(PyObject *); + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *(*__pyx_t_16)(PyObject *); PyObject *__pyx_t_17 = NULL; @@ -14786,12 +14616,24 @@ * else: * f.write("track type=bedGraph %s\n" % track_options) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 596, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 596, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_kp_s_track_type_bedGraph) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s_track_type_bedGraph); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 596, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "HTSeq/_HTSeq.pyx":595 * else: @@ -14811,57 +14653,27 @@ * for iv, value in self.chrom_vectors[chrom][strand].steps(): */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_track_type_bedGraph_s, __pyx_v_track_options); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyString_FormatSafe(__pyx_kp_s_track_type_bedGraph_s, __pyx_v_track_options); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 598, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - } - } - if (!__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 598, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 598, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L12:; @@ -14872,23 +14684,23 @@ * for iv, value in self.chrom_vectors[chrom][strand].steps(): * if iv.start == -sys.maxint - 1 or iv.end == sys.maxint: */ - __pyx_t_9 = 0; + __pyx_t_8 = 0; if (unlikely(__pyx_v_self->chrom_vectors == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 599, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->chrom_vectors, 1, ((PyObject *)NULL), (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_3); - __pyx_t_3 = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->chrom_vectors, 1, ((PyObject *)NULL), (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __pyx_t_5 = __pyx_t_3; + __pyx_t_3 = 0; while (1) { - __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_10, &__pyx_t_9, &__pyx_t_5, NULL, NULL, __pyx_t_11); - if (unlikely(__pyx_t_12 == 0)) break; - if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF_SET(__pyx_v_chrom, __pyx_t_5); - __pyx_t_5 = 0; + __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_9, &__pyx_t_8, &__pyx_t_3, NULL, NULL, __pyx_t_10); + if (unlikely(__pyx_t_11 == 0)) break; + if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_chrom, __pyx_t_3); + __pyx_t_3 = 0; /* "HTSeq/_HTSeq.pyx":600 * f.write("track type=bedGraph %s\n" % track_options) @@ -14901,63 +14713,60 @@ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 600, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_v_chrom); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_v_chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_steps); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_strand); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_steps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_6) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { - __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_13 = 0; - __pyx_t_14 = NULL; + __pyx_t_3 = (__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_3)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; + __pyx_t_13 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 600, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(!__pyx_t_14)) { - if (likely(PyList_CheckExact(__pyx_t_8))) { - if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_8)) break; + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_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, 600, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_8)) break; + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 600, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_5 = __pyx_t_14(__pyx_t_8); - if (unlikely(!__pyx_t_5)) { + __pyx_t_3 = __pyx_t_13(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); @@ -14965,10 +14774,10 @@ } break; } - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_3); } - if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { - PyObject* sequence = __pyx_t_5; + 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); @@ -14977,31 +14786,31 @@ } #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); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_7 = PyList_GET_ITEM(sequence, 0); + __pyx_t_14 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_14); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 600, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 600, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); #endif - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_15 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 600, __pyx_L1_error) + __pyx_t_15 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 600, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext; - index = 0; __pyx_t_6 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L17_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); - index = 1; __pyx_t_7 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed; + index = 0; __pyx_t_7 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_14 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_14); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) __PYX_ERR(0, 600, __pyx_L1_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -15013,10 +14822,10 @@ __PYX_ERR(0, 600, __pyx_L1_error) __pyx_L18_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_iv, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_iv, __pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_14); + __pyx_t_14 = 0; /* "HTSeq/_HTSeq.pyx":601 * for chrom in self.chrom_vectors: @@ -15025,41 +14834,41 @@ * continue * f.write("%s\t%d\t%d\t%f\n" % */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_sys); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_maxint); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_maxint); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = PyNumber_Negative(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_t_14, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_7, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (!__pyx_t_1) { } else { __pyx_t_4 = __pyx_t_1; goto __pyx_L20_bool_binop_done; } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_maxint); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_maxint); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyObject_RichCompare(__pyx_t_14, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_1; __pyx_L20_bool_binop_done:; if (__pyx_t_4) { @@ -15089,8 +14898,8 @@ * (iv.chrom, iv.start, iv.end, value)) * if not hasattr(file_or_filename, "write"): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); /* "HTSeq/_HTSeq.pyx":604 * continue @@ -15099,16 +14908,16 @@ * if not hasattr(file_or_filename, "write"): * f.close() */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_chrom); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_chrom); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_start); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_17 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_17); __pyx_t_18 = PyTuple_New(4); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_18); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_14); __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_18, 1, __pyx_t_15); __Pyx_GIVEREF(__pyx_t_17); @@ -15116,7 +14925,7 @@ __Pyx_INCREF(__pyx_v_value); __Pyx_GIVEREF(__pyx_v_value); PyTuple_SET_ITEM(__pyx_t_18, 3, __pyx_v_value); - __pyx_t_7 = 0; + __pyx_t_14 = 0; __pyx_t_15 = 0; __pyx_t_17 = 0; @@ -15131,52 +14940,22 @@ __Pyx_GOTREF(__pyx_t_17); __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0; __pyx_t_18 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_18)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_18); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - } - } - if (!__pyx_t_18) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_17); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_18, __pyx_t_17}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_18, __pyx_t_17}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; - } else - #endif - { - __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_15); - __Pyx_GIVEREF(__pyx_t_18); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_18); __pyx_t_18 = NULL; - __Pyx_GIVEREF(__pyx_t_17); - PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_17); - __pyx_t_17 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_18) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_18, __pyx_t_17) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_17); + __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0; + __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "HTSeq/_HTSeq.pyx":600 * f.write("track type=bedGraph %s\n" % track_options) @@ -15187,9 +14966,9 @@ */ __pyx_L15_continue:; } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "HTSeq/_HTSeq.pyx":605 * f.write("%s\t%d\t%d\t%f\n" % @@ -15209,27 +14988,24 @@ * * def steps(self): */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __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, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "HTSeq/_HTSeq.pyx":605 * f.write("%s\t%d\t%d\t%f\n" % @@ -15256,7 +15032,7 @@ __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_17); __Pyx_XDECREF(__pyx_t_18); @@ -15299,7 +15075,6 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("steps", 0); /* "HTSeq/_HTSeq.pyx":609 @@ -15310,7 +15085,7 @@ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GenomicArray_steps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -15325,38 +15100,10 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 609, __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 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __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; @@ -15375,7 +15122,6 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicArray.steps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -15730,7 +15476,7 @@ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_5_GenomicArray_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_5_GenomicArray_unpickle = {"_GenomicArray_unpickle", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_5_GenomicArray_unpickle, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_5_GenomicArray_unpickle = {"_GenomicArray_unpickle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_5_GenomicArray_unpickle, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_5_GenomicArray_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stranded = 0; PyObject *__pyx_v_typecode = 0; @@ -16062,7 +15808,6 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("reverse_complement", 0); /* "HTSeq/_HTSeq.pyx":641 @@ -16073,7 +15818,7 @@ * base_to_column = {'A': 0, 'C': 1, 'G': 2, 'T': 3, 'N': 4} */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_seq, __pyx_slice__11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_seq, __pyx_slice__10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 641, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -16088,38 +15833,10 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 641, __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 = NULL; - __Pyx_INCREF(__pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); - __Pyx_GIVEREF(__pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 641, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); @@ -16139,7 +15856,6 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("HTSeq._HTSeq.reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -16305,7 +16021,7 @@ * self.name = name * self.descr = None # <<<<<<<<<<<<<< * - * cpdef Sequence get_reverse_complement(self): + * cpdef Sequence get_reverse_complement(self, bint rename=True): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); @@ -16330,116 +16046,205 @@ /* "HTSeq/_HTSeq.pyx":654 * self.descr = None * - * cpdef Sequence get_reverse_complement(self): # <<<<<<<<<<<<<< - * return Sequence( - * reverse_complement(self.seq), + * cpdef Sequence get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< + * if rename: + * return Sequence( */ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_skip_dispatch) { +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args) { + int __pyx_v_rename = ((int)1); struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; __Pyx_RefNannySetupContext("get_reverse_complement", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_rename = __pyx_optional_args->rename; + } + } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_rename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } } - } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 654, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":655 * - * cpdef Sequence get_reverse_complement(self): - * return Sequence( # <<<<<<<<<<<<<< - * reverse_complement(self.seq), - * "revcomp_of_" + self.name) + * cpdef Sequence get_reverse_complement(self, bint rename=True): + * if rename: # <<<<<<<<<<<<<< + * return Sequence( + * reverse_complement(self.seq), */ - __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_6 = (__pyx_v_rename != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":656 - * cpdef Sequence get_reverse_complement(self): - * return Sequence( - * reverse_complement(self.seq), # <<<<<<<<<<<<<< - * "revcomp_of_" + self.name) - * + /* "HTSeq/_HTSeq.pyx":656 + * cpdef Sequence get_reverse_complement(self, bint rename=True): + * if rename: + * return Sequence( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * "revcomp_of_" + self.name) + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + + /* "HTSeq/_HTSeq.pyx":657 + * if rename: + * return Sequence( + * reverse_complement(self.seq), # <<<<<<<<<<<<<< + * "revcomp_of_" + self.name) + * else: */ - __pyx_t_1 = __pyx_v_self->seq; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_v_self->seq; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "HTSeq/_HTSeq.pyx":658 + * return Sequence( + * reverse_complement(self.seq), + * "revcomp_of_" + self.name) # <<<<<<<<<<<<<< + * else: + * return Sequence( + */ + __pyx_t_1 = PyNumber_Add(__pyx_n_s_revcomp_of, __pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "HTSeq/_HTSeq.pyx":656 + * cpdef Sequence get_reverse_complement(self, bint rename=True): + * if rename: + * return Sequence( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * "revcomp_of_" + self.name) + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":657 - * return Sequence( - * reverse_complement(self.seq), - * "revcomp_of_" + self.name) # <<<<<<<<<<<<<< + /* "HTSeq/_HTSeq.pyx":655 * - * def __str__(self): + * cpdef Sequence get_reverse_complement(self, bint rename=True): + * if rename: # <<<<<<<<<<<<<< + * return Sequence( + * reverse_complement(self.seq), */ - __pyx_t_1 = PyNumber_Add(__pyx_n_s_revcomp_of, __pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + } - /* "HTSeq/_HTSeq.pyx":655 + /* "HTSeq/_HTSeq.pyx":660 + * "revcomp_of_" + self.name) + * else: + * return Sequence( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * self.name) + */ + /*else*/ { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + + /* "HTSeq/_HTSeq.pyx":661 + * else: + * return Sequence( + * reverse_complement(self.seq), # <<<<<<<<<<<<<< + * self.name) * - * cpdef Sequence get_reverse_complement(self): - * return Sequence( # <<<<<<<<<<<<<< - * reverse_complement(self.seq), - * "revcomp_of_" + self.name) */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); - __pyx_t_2 = 0; - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_1); - __pyx_t_1 = 0; - goto __pyx_L0; + __pyx_t_1 = __pyx_v_self->seq; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 661, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "HTSeq/_HTSeq.pyx":660 + * "revcomp_of_" + self.name) + * else: + * return Sequence( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * self.name) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __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_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 660, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_4); + __pyx_t_4 = 0; + goto __pyx_L0; + } /* "HTSeq/_HTSeq.pyx":654 * self.descr = None * - * cpdef Sequence get_reverse_complement(self): # <<<<<<<<<<<<<< - * return Sequence( - * reverse_complement(self.seq), + * cpdef Sequence get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< + * if rename: + * return Sequence( */ /* function exit code */ @@ -16448,6 +16253,7 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.get_reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -16457,25 +16263,74 @@ } /* Python wrapper */ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_rename; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_reverse_complement (wrapper)", 0); - __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self)); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rename,0}; + PyObject* values[1] = {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 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 (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rename); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reverse_complement") < 0)) __PYX_ERR(0, 654, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_rename = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_rename == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 654, __pyx_L3_error) + } else { + __pyx_v_rename = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_reverse_complement", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 654, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.get_reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self), __pyx_v_rename); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self) { +static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_v_rename) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement __pyx_t_2; __Pyx_RefNannySetupContext("get_reverse_complement", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.rename = __pyx_v_rename; + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->get_reverse_complement(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16492,8 +16347,8 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":659 - * "revcomp_of_" + self.name) +/* "HTSeq/_HTSeq.pyx":664 + * self.name) * * def __str__(self): # <<<<<<<<<<<<<< * return self.seq @@ -16518,7 +16373,7 @@ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__", 0); - /* "HTSeq/_HTSeq.pyx":660 + /* "HTSeq/_HTSeq.pyx":665 * * def __str__(self): * return self.seq # <<<<<<<<<<<<<< @@ -16530,8 +16385,8 @@ __pyx_r = __pyx_v_self->seq; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":659 - * "revcomp_of_" + self.name) + /* "HTSeq/_HTSeq.pyx":664 + * self.name) * * def __str__(self): # <<<<<<<<<<<<<< * return self.seq @@ -16545,7 +16400,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":662 +/* "HTSeq/_HTSeq.pyx":667 * return self.seq * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16575,7 +16430,7 @@ PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "HTSeq/_HTSeq.pyx":663 + /* "HTSeq/_HTSeq.pyx":668 * * def __repr__(self): * return "<%s object '%s' (length %d)>" % ( # <<<<<<<<<<<<<< @@ -16584,29 +16439,29 @@ */ __Pyx_XDECREF(__pyx_r); - /* "HTSeq/_HTSeq.pyx":664 + /* "HTSeq/_HTSeq.pyx":669 * def __repr__(self): * return "<%s object '%s' (length %d)>" % ( * self.__class__.__name__, self.name, len(self.seq)) # <<<<<<<<<<<<<< * * def __len__(self): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = __pyx_v_self->seq; __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, 664, __pyx_L1_error) + __PYX_ERR(0, 669, __pyx_L1_error) } - __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_3 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 669, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); @@ -16618,21 +16473,21 @@ __pyx_t_2 = 0; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":663 + /* "HTSeq/_HTSeq.pyx":668 * * def __repr__(self): * return "<%s object '%s' (length %d)>" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, self.name, len(self.seq)) * */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_object_s_length_d, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_object_s_length_d, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":662 + /* "HTSeq/_HTSeq.pyx":667 * return self.seq * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16653,7 +16508,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":666 +/* "HTSeq/_HTSeq.pyx":671 * self.__class__.__name__, self.name, len(self.seq)) * * def __len__(self): # <<<<<<<<<<<<<< @@ -16681,7 +16536,7 @@ Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("__len__", 0); - /* "HTSeq/_HTSeq.pyx":667 + /* "HTSeq/_HTSeq.pyx":672 * * def __len__(self): * return len(self.seq) # <<<<<<<<<<<<<< @@ -16692,14 +16547,14 @@ __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, 667, __pyx_L1_error) + __PYX_ERR(0, 672, __pyx_L1_error) } - __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":666 + /* "HTSeq/_HTSeq.pyx":671 * self.__class__.__name__, self.name, len(self.seq)) * * def __len__(self): # <<<<<<<<<<<<<< @@ -16717,7 +16572,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":669 +/* "HTSeq/_HTSeq.pyx":674 * return len(self.seq) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -16747,7 +16602,7 @@ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "HTSeq/_HTSeq.pyx":670 + /* "HTSeq/_HTSeq.pyx":675 * * def __getitem__(self, item): * if self.name.endswith("[part]"): # <<<<<<<<<<<<<< @@ -16756,12 +16611,12 @@ */ if (unlikely(__pyx_v_self->name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "endswith"); - __PYX_ERR(0, 670, __pyx_L1_error) + __PYX_ERR(0, 675, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyStr_Tailmatch(__pyx_v_self->name, __pyx_kp_s_part, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 670, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyStr_Tailmatch(__pyx_v_self->name, __pyx_kp_s_part, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 675, __pyx_L1_error) if ((__pyx_t_1 != 0)) { - /* "HTSeq/_HTSeq.pyx":671 + /* "HTSeq/_HTSeq.pyx":676 * def __getitem__(self, item): * if self.name.endswith("[part]"): * new_name = self.name # <<<<<<<<<<<<<< @@ -16773,7 +16628,7 @@ __pyx_v_new_name = __pyx_t_2; __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":670 + /* "HTSeq/_HTSeq.pyx":675 * * def __getitem__(self, item): * if self.name.endswith("[part]"): # <<<<<<<<<<<<<< @@ -16783,7 +16638,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":673 + /* "HTSeq/_HTSeq.pyx":678 * new_name = self.name * else: * new_name = self.name + "[part]" # <<<<<<<<<<<<<< @@ -16791,14 +16646,14 @@ * */ /*else*/ { - __pyx_t_2 = PyNumber_Add(__pyx_v_self->name, __pyx_kp_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 673, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_self->name, __pyx_kp_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_new_name = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":674 + /* "HTSeq/_HTSeq.pyx":679 * else: * new_name = self.name + "[part]" * return Sequence(self.seq[item], new_name) # <<<<<<<<<<<<<< @@ -16806,9 +16661,9 @@ * def __getstate__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->seq, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->seq, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -16816,14 +16671,14 @@ __Pyx_GIVEREF(__pyx_v_new_name); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_new_name); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 679, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":669 + /* "HTSeq/_HTSeq.pyx":674 * return len(self.seq) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -16844,7 +16699,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":676 +/* "HTSeq/_HTSeq.pyx":681 * return Sequence(self.seq[item], new_name) * * def __getstate__(self): # <<<<<<<<<<<<<< @@ -16871,7 +16726,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__getstate__", 0); - /* "HTSeq/_HTSeq.pyx":677 + /* "HTSeq/_HTSeq.pyx":682 * * def __getstate__(self): * return {'seq': self.seq, # <<<<<<<<<<<<<< @@ -16879,32 +16734,32 @@ * 'descr': self.descr} */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_seq, __pyx_v_self->seq) < 0) __PYX_ERR(0, 677, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_seq, __pyx_v_self->seq) < 0) __PYX_ERR(0, 682, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":678 + /* "HTSeq/_HTSeq.pyx":683 * def __getstate__(self): * return {'seq': self.seq, * 'name': self.name, # <<<<<<<<<<<<<< * 'descr': self.descr} * */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name_2, __pyx_v_self->name) < 0) __PYX_ERR(0, 677, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_name_2, __pyx_v_self->name) < 0) __PYX_ERR(0, 682, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":679 + /* "HTSeq/_HTSeq.pyx":684 * return {'seq': self.seq, * 'name': self.name, * 'descr': self.descr} # <<<<<<<<<<<<<< * * def __setstate__(self, state): */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_descr, __pyx_v_self->descr) < 0) __PYX_ERR(0, 677, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_descr, __pyx_v_self->descr) < 0) __PYX_ERR(0, 682, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":676 + /* "HTSeq/_HTSeq.pyx":681 * return Sequence(self.seq[item], new_name) * * def __getstate__(self): # <<<<<<<<<<<<<< @@ -16923,7 +16778,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":681 +/* "HTSeq/_HTSeq.pyx":686 * 'descr': self.descr} * * def __setstate__(self, state): # <<<<<<<<<<<<<< @@ -16950,55 +16805,55 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate__", 0); - /* "HTSeq/_HTSeq.pyx":682 + /* "HTSeq/_HTSeq.pyx":687 * * def __setstate__(self, state): * self.seq = state['seq'] # <<<<<<<<<<<<<< * self.name = state['name'] * self.descr = state['descr'] */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_s_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_s_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 682, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 687, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->seq); __Pyx_DECREF(__pyx_v_self->seq); __pyx_v_self->seq = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":683 + /* "HTSeq/_HTSeq.pyx":688 * def __setstate__(self, state): * self.seq = state['seq'] * self.name = state['name'] # <<<<<<<<<<<<<< * self.descr = state['descr'] * */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 683, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 688, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":684 + /* "HTSeq/_HTSeq.pyx":689 * self.seq = state['seq'] * self.name = state['name'] * self.descr = state['descr'] # <<<<<<<<<<<<<< * * def __reduce__(self): */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_s_descr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_s_descr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 684, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 689, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->descr); __Pyx_DECREF(__pyx_v_self->descr); __pyx_v_self->descr = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":681 + /* "HTSeq/_HTSeq.pyx":686 * 'descr': self.descr} * * def __setstate__(self, state): # <<<<<<<<<<<<<< @@ -17019,7 +16874,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":686 +/* "HTSeq/_HTSeq.pyx":691 * self.descr = state['descr'] * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -17050,7 +16905,7 @@ PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "HTSeq/_HTSeq.pyx":687 + /* "HTSeq/_HTSeq.pyx":692 * * def __reduce__(self): * return (self.__class__, (self.seq, self.name), self.__getstate__()) # <<<<<<<<<<<<<< @@ -17058,9 +16913,9 @@ * def write_to_fasta_file(self, fasta_file, characters_per_line=70): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->seq); __Pyx_GIVEREF(__pyx_v_self->seq); @@ -17068,7 +16923,7 @@ __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->name); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -17080,15 +16935,12 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 687, __pyx_L1_error) - } + __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, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 687, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -17103,7 +16955,7 @@ __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":686 + /* "HTSeq/_HTSeq.pyx":691 * self.descr = state['descr'] * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -17126,7 +16978,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":689 +/* "HTSeq/_HTSeq.pyx":694 * return (self.__class__, (self.seq, self.name), self.__getstate__()) * * def write_to_fasta_file(self, fasta_file, characters_per_line=70): # <<<<<<<<<<<<<< @@ -17171,7 +17023,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_to_fasta_file") < 0)) __PYX_ERR(0, 689, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_to_fasta_file") < 0)) __PYX_ERR(0, 694, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -17187,7 +17039,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_to_fasta_file", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 689, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_to_fasta_file", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 694, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.write_to_fasta_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -17210,12 +17062,12 @@ PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; + Py_ssize_t __pyx_t_7; Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; __Pyx_RefNannySetupContext("write_to_fasta_file", 0); - /* "HTSeq/_HTSeq.pyx":697 + /* "HTSeq/_HTSeq.pyx":702 * * """ * if self.descr is not None: # <<<<<<<<<<<<<< @@ -17226,16 +17078,16 @@ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":698 + /* "HTSeq/_HTSeq.pyx":703 * """ * if self.descr is not None: * fasta_file.write(">%s %s\n" % (self.name, self.descr)) # <<<<<<<<<<<<<< * else: * fasta_file.write(">%s\n" % self.name) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); @@ -17243,7 +17095,7 @@ __Pyx_INCREF(__pyx_v_self->descr); __Pyx_GIVEREF(__pyx_v_self->descr); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_self->descr); - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 698, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -17256,45 +17108,15 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 698, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __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; - /* "HTSeq/_HTSeq.pyx":697 + /* "HTSeq/_HTSeq.pyx":702 * * """ * if self.descr is not None: # <<<<<<<<<<<<<< @@ -17304,7 +17126,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":700 + /* "HTSeq/_HTSeq.pyx":705 * fasta_file.write(">%s %s\n" % (self.name, self.descr)) * else: * fasta_file.write(">%s\n" % self.name) # <<<<<<<<<<<<<< @@ -17312,133 +17134,73 @@ * if characters_per_line == 0: */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_self->name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = NULL; + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_v_self->name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __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; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":702 + /* "HTSeq/_HTSeq.pyx":707 * fasta_file.write(">%s\n" % self.name) * * if characters_per_line == 0: # <<<<<<<<<<<<<< * fasta_file.write(self.seq + "\n") * else: */ - __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_characters_per_line, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_characters_per_line, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":703 + /* "HTSeq/_HTSeq.pyx":708 * * if characters_per_line == 0: * fasta_file.write(self.seq + "\n") # <<<<<<<<<<<<<< * else: * i = 0 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 703, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 708, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyNumber_Add(__pyx_v_self->seq, __pyx_kp_s__12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = NULL; + __pyx_t_6 = PyNumber_Add(__pyx_v_self->seq, __pyx_kp_s__11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_7)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __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; - /* "HTSeq/_HTSeq.pyx":702 + /* "HTSeq/_HTSeq.pyx":707 * fasta_file.write(">%s\n" % self.name) * * if characters_per_line == 0: # <<<<<<<<<<<<<< @@ -17448,7 +17210,7 @@ goto __pyx_L4; } - /* "HTSeq/_HTSeq.pyx":705 + /* "HTSeq/_HTSeq.pyx":710 * fasta_file.write(self.seq + "\n") * else: * i = 0 # <<<<<<<<<<<<<< @@ -17459,7 +17221,7 @@ __Pyx_INCREF(__pyx_int_0); __pyx_v_i = __pyx_int_0; - /* "HTSeq/_HTSeq.pyx":706 + /* "HTSeq/_HTSeq.pyx":711 * else: * i = 0 * while i * characters_per_line < len(self.seq): # <<<<<<<<<<<<<< @@ -17467,36 +17229,36 @@ * self.seq[i * characters_per_line: (i + 1) * characters_per_line] + "\n") */ while (1) { - __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_v_self->seq; __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 706, __pyx_L1_error) + __PYX_ERR(0, 711, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 706, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 711, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (!__pyx_t_2) break; - /* "HTSeq/_HTSeq.pyx":707 + /* "HTSeq/_HTSeq.pyx":712 * i = 0 * while i * characters_per_line < len(self.seq): * fasta_file.write( # <<<<<<<<<<<<<< * self.seq[i * characters_per_line: (i + 1) * characters_per_line] + "\n") * i += 1 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 707, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 712, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "HTSeq/_HTSeq.pyx":708 + /* "HTSeq/_HTSeq.pyx":713 * while i * characters_per_line < len(self.seq): * fasta_file.write( * self.seq[i * characters_per_line: (i + 1) * characters_per_line] + "\n") # <<<<<<<<<<<<<< @@ -17505,22 +17267,34 @@ */ if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 708, __pyx_L1_error) + __PYX_ERR(0, 713, __pyx_L1_error) } - __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 == Py_None); + if (__pyx_t_2) { + __pyx_t_7 = 0; + } else { + __pyx_t_8 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_8 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_7 = __pyx_t_8; + } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_5 = PyNumber_Multiply(__pyx_t_3, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5 == Py_None); + if (__pyx_t_2) { + __pyx_t_8 = PY_SSIZE_T_MAX; + } else { + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_5); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 713, __pyx_L1_error) + __pyx_t_8 = __pyx_t_9; + } __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PySequence_GetSlice(__pyx_v_self->seq, __pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_5 = PySequence_GetSlice(__pyx_v_self->seq, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_kp_s__11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -17533,52 +17307,22 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 707, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 712, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":709 + /* "HTSeq/_HTSeq.pyx":714 * fasta_file.write( * self.seq[i * characters_per_line: (i + 1) * characters_per_line] + "\n") * i += 1 # <<<<<<<<<<<<<< * * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_): */ - __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 709, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 714, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_6); __pyx_t_6 = 0; @@ -17586,7 +17330,7 @@ } __pyx_L4:; - /* "HTSeq/_HTSeq.pyx":689 + /* "HTSeq/_HTSeq.pyx":694 * return (self.__class__, (self.seq, self.name), self.__getstate__()) * * def write_to_fasta_file(self, fasta_file, characters_per_line=70): # <<<<<<<<<<<<<< @@ -17602,7 +17346,6 @@ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.write_to_fasta_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -17612,7 +17355,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":711 +/* "HTSeq/_HTSeq.pyx":716 * i += 1 * * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_): # <<<<<<<<<<<<<< @@ -17635,16 +17378,16 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - Py_ssize_t __pyx_t_6; - int __pyx_t_7; - char *__pyx_t_8; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + char *__pyx_t_7; + int __pyx_t_8; int __pyx_t_9; - int __pyx_t_10; - npy_intp __pyx_t_11; + npy_intp __pyx_t_10; + Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; - Py_ssize_t __pyx_t_13; - int __pyx_t_14; + int __pyx_t_13; + Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; @@ -17652,7 +17395,6 @@ Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; - Py_ssize_t __pyx_t_22; __Pyx_RefNannySetupContext("add_bases_to_count_array", 0); __pyx_pybuffer_count_array.pybuffer.buf = NULL; __pyx_pybuffer_count_array.refcount = 0; @@ -17661,64 +17403,52 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_bases_to_count_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_21add_bases_to_count_array)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_bases_to_count_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_21add_bases_to_count_array)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_count_array_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_count_array_)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_count_array_)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_count_array_)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_count_array_)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_count_array_)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_count_array_)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_count_array_)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":713 + /* "HTSeq/_HTSeq.pyx":718 * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_): * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ # <<<<<<<<<<<<<< @@ -17729,14 +17459,14 @@ __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_count_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_count_array_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_count_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 713, __pyx_L1_error) + __PYX_ERR(0, 718, __pyx_L1_error) } else {__pyx_pybuffernd_count_array.diminfo[0].strides = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_count_array.diminfo[0].shape = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_count_array.diminfo[1].strides = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_count_array.diminfo[1].shape = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.shape[1]; } } __Pyx_INCREF(((PyObject *)__pyx_v_count_array_)); __pyx_v_count_array = ((PyArrayObject *)__pyx_v_count_array_); - /* "HTSeq/_HTSeq.pyx":714 + /* "HTSeq/_HTSeq.pyx":719 * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ * cdef int seq_length = len(self.seq) # <<<<<<<<<<<<<< @@ -17747,23 +17477,23 @@ __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, 714, __pyx_L1_error) + __PYX_ERR(0, 719, __pyx_L1_error) } - __pyx_t_6 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 714, __pyx_L1_error) + __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 719, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_seq_length = __pyx_t_6; + __pyx_v_seq_length = __pyx_t_5; - /* "HTSeq/_HTSeq.pyx":716 + /* "HTSeq/_HTSeq.pyx":721 * cdef int seq_length = len(self.seq) * * if numpy.PyArray_DIMS(count_array)[0] < seq_length: # <<<<<<<<<<<<<< * raise ValueError, "'count_array' too small for sequence." * if numpy.PyArray_DIMS(count_array)[1] < 5: */ - __pyx_t_7 = (((PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[0]) < __pyx_v_seq_length) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = (((PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[0]) < __pyx_v_seq_length) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":717 + /* "HTSeq/_HTSeq.pyx":722 * * if numpy.PyArray_DIMS(count_array)[0] < seq_length: * raise ValueError, "'count_array' too small for sequence." # <<<<<<<<<<<<<< @@ -17771,9 +17501,9 @@ * raise ValueError, "'count_array' has too few columns." */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_count_array_too_small_for_seque, 0, 0); - __PYX_ERR(0, 717, __pyx_L1_error) + __PYX_ERR(0, 722, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":716 + /* "HTSeq/_HTSeq.pyx":721 * cdef int seq_length = len(self.seq) * * if numpy.PyArray_DIMS(count_array)[0] < seq_length: # <<<<<<<<<<<<<< @@ -17782,17 +17512,17 @@ */ } - /* "HTSeq/_HTSeq.pyx":718 + /* "HTSeq/_HTSeq.pyx":723 * if numpy.PyArray_DIMS(count_array)[0] < seq_length: * raise ValueError, "'count_array' too small for sequence." * if numpy.PyArray_DIMS(count_array)[1] < 5: # <<<<<<<<<<<<<< * raise ValueError, "'count_array' has too few columns." * */ - __pyx_t_7 = (((PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[1]) < 5) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = (((PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[1]) < 5) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":719 + /* "HTSeq/_HTSeq.pyx":724 * raise ValueError, "'count_array' too small for sequence." * if numpy.PyArray_DIMS(count_array)[1] < 5: * raise ValueError, "'count_array' has too few columns." # <<<<<<<<<<<<<< @@ -17800,9 +17530,9 @@ * cdef numpy.npy_intp i */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_count_array_has_too_few_columns, 0, 0); - __PYX_ERR(0, 719, __pyx_L1_error) + __PYX_ERR(0, 724, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":718 + /* "HTSeq/_HTSeq.pyx":723 * if numpy.PyArray_DIMS(count_array)[0] < seq_length: * raise ValueError, "'count_array' too small for sequence." * if numpy.PyArray_DIMS(count_array)[1] < 5: # <<<<<<<<<<<<<< @@ -17811,7 +17541,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":723 + /* "HTSeq/_HTSeq.pyx":728 * cdef numpy.npy_intp i * cdef char b * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -17820,24 +17550,24 @@ */ if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 723, __pyx_L1_error) + __PYX_ERR(0, 728, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 723, __pyx_L1_error) - __pyx_v_seq_cstr = __pyx_t_8; + __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 728, __pyx_L1_error) + __pyx_v_seq_cstr = __pyx_t_7; - /* "HTSeq/_HTSeq.pyx":724 + /* "HTSeq/_HTSeq.pyx":729 * cdef char b * cdef char * seq_cstr = self.seq * for i in xrange(seq_length): # <<<<<<<<<<<<<< * b = seq_cstr[i] * if b == 'A' or b == 'a': */ - __pyx_t_9 = __pyx_v_seq_length; - __pyx_t_10 = __pyx_t_9; - for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { - __pyx_v_i = __pyx_t_11; + __pyx_t_8 = __pyx_v_seq_length; + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":725 + /* "HTSeq/_HTSeq.pyx":730 * cdef char * seq_cstr = self.seq * for i in xrange(seq_length): * b = seq_cstr[i] # <<<<<<<<<<<<<< @@ -17846,7 +17576,7 @@ */ __pyx_v_b = (__pyx_v_seq_cstr[__pyx_v_i]); - /* "HTSeq/_HTSeq.pyx":726 + /* "HTSeq/_HTSeq.pyx":731 * for i in xrange(seq_length): * b = seq_cstr[i] * if b == 'A' or b == 'a': # <<<<<<<<<<<<<< @@ -17857,31 +17587,31 @@ case 'A': case 'a': - /* "HTSeq/_HTSeq.pyx":727 + /* "HTSeq/_HTSeq.pyx":732 * b = seq_cstr[i] * if b == 'A' or b == 'a': * count_array[i, 0] += 1 # <<<<<<<<<<<<<< * elif b == 'C' or b == 'c': * count_array[i, 1] += 1 */ - __pyx_t_12 = __pyx_v_i; - __pyx_t_13 = 0; - __pyx_t_14 = -1; + __pyx_t_11 = __pyx_v_i; + __pyx_t_12 = 0; + __pyx_t_13 = -1; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_12 < 0) { - __pyx_t_12 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_12 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_13 < 0) { - __pyx_t_13 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_12 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 732, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":726 + /* "HTSeq/_HTSeq.pyx":731 * for i in xrange(seq_length): * b = seq_cstr[i] * if b == 'A' or b == 'a': # <<<<<<<<<<<<<< @@ -17889,42 +17619,42 @@ * elif b == 'C' or b == 'c': */ break; + case 'C': - /* "HTSeq/_HTSeq.pyx":728 + /* "HTSeq/_HTSeq.pyx":733 * if b == 'A' or b == 'a': * count_array[i, 0] += 1 * elif b == 'C' or b == 'c': # <<<<<<<<<<<<<< * count_array[i, 1] += 1 * elif b == 'G' or b == 'g': */ - case 'C': case 'c': - /* "HTSeq/_HTSeq.pyx":729 + /* "HTSeq/_HTSeq.pyx":734 * count_array[i, 0] += 1 * elif b == 'C' or b == 'c': * count_array[i, 1] += 1 # <<<<<<<<<<<<<< * elif b == 'G' or b == 'g': * count_array[i, 2] += 1 */ - __pyx_t_15 = __pyx_v_i; - __pyx_t_16 = 1; - __pyx_t_14 = -1; + __pyx_t_14 = __pyx_v_i; + __pyx_t_15 = 1; + __pyx_t_13 = -1; + if (__pyx_t_14 < 0) { + __pyx_t_14 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_14 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_15 < 0) { - __pyx_t_15 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_15 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_16 < 0) { - __pyx_t_16 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_16 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_t_15 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_15 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 734, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":728 + /* "HTSeq/_HTSeq.pyx":733 * if b == 'A' or b == 'a': * count_array[i, 0] += 1 * elif b == 'C' or b == 'c': # <<<<<<<<<<<<<< @@ -17932,42 +17662,42 @@ * elif b == 'G' or b == 'g': */ break; + case 'G': - /* "HTSeq/_HTSeq.pyx":730 + /* "HTSeq/_HTSeq.pyx":735 * elif b == 'C' or b == 'c': * count_array[i, 1] += 1 * elif b == 'G' or b == 'g': # <<<<<<<<<<<<<< * count_array[i, 2] += 1 * elif b == 'T' or b == 't': */ - case 'G': case 'g': - /* "HTSeq/_HTSeq.pyx":731 + /* "HTSeq/_HTSeq.pyx":736 * count_array[i, 1] += 1 * elif b == 'G' or b == 'g': * count_array[i, 2] += 1 # <<<<<<<<<<<<<< * elif b == 'T' or b == 't': * count_array[i, 3] += 1 */ - __pyx_t_17 = __pyx_v_i; - __pyx_t_18 = 2; - __pyx_t_14 = -1; + __pyx_t_16 = __pyx_v_i; + __pyx_t_17 = 2; + __pyx_t_13 = -1; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_17 < 0) { - __pyx_t_17 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_17 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_18 < 0) { - __pyx_t_18 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_18 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 731, __pyx_L1_error) + __pyx_t_17 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 736, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":730 + /* "HTSeq/_HTSeq.pyx":735 * elif b == 'C' or b == 'c': * count_array[i, 1] += 1 * elif b == 'G' or b == 'g': # <<<<<<<<<<<<<< @@ -17975,42 +17705,42 @@ * elif b == 'T' or b == 't': */ break; + case 'T': - /* "HTSeq/_HTSeq.pyx":732 + /* "HTSeq/_HTSeq.pyx":737 * elif b == 'G' or b == 'g': * count_array[i, 2] += 1 * elif b == 'T' or b == 't': # <<<<<<<<<<<<<< * count_array[i, 3] += 1 * elif b == 'N' or b == 'n' or b == ".": */ - case 'T': case 't': - /* "HTSeq/_HTSeq.pyx":733 + /* "HTSeq/_HTSeq.pyx":738 * count_array[i, 2] += 1 * elif b == 'T' or b == 't': * count_array[i, 3] += 1 # <<<<<<<<<<<<<< * elif b == 'N' or b == 'n' or b == ".": * count_array[i, 4] += 1 */ - __pyx_t_19 = __pyx_v_i; - __pyx_t_20 = 3; - __pyx_t_14 = -1; + __pyx_t_18 = __pyx_v_i; + __pyx_t_19 = 3; + __pyx_t_13 = -1; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_20 < 0) { - __pyx_t_20 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_20 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 733, __pyx_L1_error) + __pyx_t_19 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 738, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":732 + /* "HTSeq/_HTSeq.pyx":737 * elif b == 'G' or b == 'g': * count_array[i, 2] += 1 * elif b == 'T' or b == 't': # <<<<<<<<<<<<<< @@ -18018,43 +17748,43 @@ * elif b == 'N' or b == 'n' or b == ".": */ break; + case 'N': - /* "HTSeq/_HTSeq.pyx":734 + /* "HTSeq/_HTSeq.pyx":739 * elif b == 'T' or b == 't': * count_array[i, 3] += 1 * elif b == 'N' or b == 'n' or b == ".": # <<<<<<<<<<<<<< * count_array[i, 4] += 1 * else: */ - case 'N': case 'n': case '.': - /* "HTSeq/_HTSeq.pyx":735 + /* "HTSeq/_HTSeq.pyx":740 * count_array[i, 3] += 1 * elif b == 'N' or b == 'n' or b == ".": * count_array[i, 4] += 1 # <<<<<<<<<<<<<< * else: * raise ValueError, "Illegal base letter encountered." */ - __pyx_t_21 = __pyx_v_i; - __pyx_t_22 = 4; - __pyx_t_14 = -1; + __pyx_t_20 = __pyx_v_i; + __pyx_t_21 = 4; + __pyx_t_13 = -1; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_21 < 0) { - __pyx_t_21 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_21 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_22 < 0) { - __pyx_t_22 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_22 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_21 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 740, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":734 + /* "HTSeq/_HTSeq.pyx":739 * elif b == 'T' or b == 't': * count_array[i, 3] += 1 * elif b == 'N' or b == 'n' or b == ".": # <<<<<<<<<<<<<< @@ -18064,7 +17794,7 @@ break; default: - /* "HTSeq/_HTSeq.pyx":737 + /* "HTSeq/_HTSeq.pyx":742 * count_array[i, 4] += 1 * else: * raise ValueError, "Illegal base letter encountered." # <<<<<<<<<<<<<< @@ -18072,12 +17802,12 @@ * return None */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Illegal_base_letter_encountered, 0, 0); - __PYX_ERR(0, 737, __pyx_L1_error) + __PYX_ERR(0, 742, __pyx_L1_error) break; } } - /* "HTSeq/_HTSeq.pyx":739 + /* "HTSeq/_HTSeq.pyx":744 * raise ValueError, "Illegal base letter encountered." * * return None # <<<<<<<<<<<<<< @@ -18088,7 +17818,7 @@ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":711 + /* "HTSeq/_HTSeq.pyx":716 * i += 1 * * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_): # <<<<<<<<<<<<<< @@ -18102,7 +17832,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -18127,7 +17856,7 @@ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_bases_to_count_array (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_count_array_), __pyx_ptype_5numpy_ndarray, 1, "count_array_", 0))) __PYX_ERR(0, 711, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_count_array_), __pyx_ptype_5numpy_ndarray, 1, "count_array_", 0))) __PYX_ERR(0, 716, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_20add_bases_to_count_array(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self), ((PyArrayObject *)__pyx_v_count_array_)); /* function exit code */ @@ -18145,7 +17874,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("add_bases_to_count_array", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_8Sequence_add_bases_to_count_array(__pyx_v_self, __pyx_v_count_array_, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_8Sequence_add_bases_to_count_array(__pyx_v_self, __pyx_v_count_array_, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18162,7 +17891,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":741 +/* "HTSeq/_HTSeq.pyx":746 * return None * * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=0.): # <<<<<<<<<<<<<< @@ -18208,71 +17937,87 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_left_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_23trim_left_end)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mismatch_prop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 741, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 741, __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 + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 741, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_left_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_23trim_left_end)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mismatch_prop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } } - __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); - __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, 741, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 746, __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 + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 746, __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, 746, __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; + } + __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); + __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, 746, __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_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 746, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 741, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":742 + /* "HTSeq/_HTSeq.pyx":747 * * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=0.): * cdef int seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -18283,13 +18028,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, 742, __pyx_L1_error) + __PYX_ERR(0, 747, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 742, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 747, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seqlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":743 + /* "HTSeq/_HTSeq.pyx":748 * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=0.): * cdef int seqlen = len(self.seq) * cdef int patlen = len(pattern.seq) # <<<<<<<<<<<<<< @@ -18300,13 +18045,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, 743, __pyx_L1_error) + __PYX_ERR(0, 748, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 743, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 748, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_patlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":745 + /* "HTSeq/_HTSeq.pyx":750 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -18316,7 +18061,7 @@ __pyx_t_9 = ((__pyx_v_seqlen < __pyx_v_patlen) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":746 + /* "HTSeq/_HTSeq.pyx":751 * cdef int minlen * if seqlen < patlen: * minlen = seqlen # <<<<<<<<<<<<<< @@ -18325,7 +18070,7 @@ */ __pyx_v_minlen = __pyx_v_seqlen; - /* "HTSeq/_HTSeq.pyx":745 + /* "HTSeq/_HTSeq.pyx":750 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -18335,7 +18080,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":748 + /* "HTSeq/_HTSeq.pyx":753 * minlen = seqlen * else: * minlen = patlen # <<<<<<<<<<<<<< @@ -18347,7 +18092,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":749 + /* "HTSeq/_HTSeq.pyx":754 * else: * minlen = patlen * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -18356,12 +18101,12 @@ */ if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 749, __pyx_L1_error) + __PYX_ERR(0, 754, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 754, __pyx_L1_error) __pyx_v_seq_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":750 + /* "HTSeq/_HTSeq.pyx":755 * minlen = patlen * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq # <<<<<<<<<<<<<< @@ -18370,12 +18115,12 @@ */ if (unlikely(__pyx_v_pattern->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 750, __pyx_L1_error) + __PYX_ERR(0, 755, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 750, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 755, __pyx_L1_error) __pyx_v_pat_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":751 + /* "HTSeq/_HTSeq.pyx":756 * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq * cdef int match = 0 # <<<<<<<<<<<<<< @@ -18384,7 +18129,7 @@ */ __pyx_v_match = 0; - /* "HTSeq/_HTSeq.pyx":754 + /* "HTSeq/_HTSeq.pyx":759 * cdef int i, j * cdef int num_mismatches * for i in xrange(1, minlen + 1): # <<<<<<<<<<<<<< @@ -18396,7 +18141,7 @@ for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "HTSeq/_HTSeq.pyx":755 + /* "HTSeq/_HTSeq.pyx":760 * cdef int num_mismatches * for i in xrange(1, minlen + 1): * num_mismatches = 0 # <<<<<<<<<<<<<< @@ -18405,7 +18150,7 @@ */ __pyx_v_num_mismatches = 0; - /* "HTSeq/_HTSeq.pyx":756 + /* "HTSeq/_HTSeq.pyx":761 * for i in xrange(1, minlen + 1): * num_mismatches = 0 * for j in xrange(i): # <<<<<<<<<<<<<< @@ -18417,7 +18162,7 @@ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; - /* "HTSeq/_HTSeq.pyx":757 + /* "HTSeq/_HTSeq.pyx":762 * num_mismatches = 0 * for j in xrange(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: # <<<<<<<<<<<<<< @@ -18427,7 +18172,7 @@ __pyx_t_9 = (((__pyx_v_seq_cstr[__pyx_v_j]) != (__pyx_v_pat_cstr[((__pyx_v_patlen - __pyx_v_i) + __pyx_v_j)])) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":758 + /* "HTSeq/_HTSeq.pyx":763 * for j in xrange(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: * num_mismatches += 1 # <<<<<<<<<<<<<< @@ -18436,7 +18181,7 @@ */ __pyx_v_num_mismatches = (__pyx_v_num_mismatches + 1); - /* "HTSeq/_HTSeq.pyx":759 + /* "HTSeq/_HTSeq.pyx":764 * if seq_cstr[j] != pat_cstr[patlen - i + j]: * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: # <<<<<<<<<<<<<< @@ -18446,7 +18191,7 @@ __pyx_t_9 = ((__pyx_v_num_mismatches > (__pyx_v_mismatch_prop * __pyx_v_i)) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":760 + /* "HTSeq/_HTSeq.pyx":765 * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: * break # <<<<<<<<<<<<<< @@ -18455,7 +18200,7 @@ */ goto __pyx_L7_break; - /* "HTSeq/_HTSeq.pyx":759 + /* "HTSeq/_HTSeq.pyx":764 * if seq_cstr[j] != pat_cstr[patlen - i + j]: * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: # <<<<<<<<<<<<<< @@ -18464,7 +18209,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":757 + /* "HTSeq/_HTSeq.pyx":762 * num_mismatches = 0 * for j in xrange(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: # <<<<<<<<<<<<<< @@ -18475,7 +18220,7 @@ } /*else*/ { - /* "HTSeq/_HTSeq.pyx":762 + /* "HTSeq/_HTSeq.pyx":767 * break * else: * match = i # <<<<<<<<<<<<<< @@ -18487,7 +18232,7 @@ __pyx_L7_break:; } - /* "HTSeq/_HTSeq.pyx":763 + /* "HTSeq/_HTSeq.pyx":768 * else: * match = i * return self[match: seqlen] # <<<<<<<<<<<<<< @@ -18495,14 +18240,14 @@ * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), __pyx_v_match, __pyx_v_seqlen, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 763, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), __pyx_v_match, __pyx_v_seqlen, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 768, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 763, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 768, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":741 + /* "HTSeq/_HTSeq.pyx":746 * return None * * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=0.): # <<<<<<<<<<<<<< @@ -18561,7 +18306,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_left_end") < 0)) __PYX_ERR(0, 741, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_left_end") < 0)) __PYX_ERR(0, 746, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -18574,20 +18319,20 @@ } __pyx_v_pattern = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)values[0]); if (values[1]) { - __pyx_v_mismatch_prop = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_mismatch_prop == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 741, __pyx_L3_error) + __pyx_v_mismatch_prop = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_mismatch_prop == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 746, __pyx_L3_error) } else { __pyx_v_mismatch_prop = ((float)0.); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trim_left_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 741, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trim_left_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 746, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.trim_left_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 741, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 746, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_22trim_left_end(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self), __pyx_v_pattern, __pyx_v_mismatch_prop); /* function exit code */ @@ -18608,7 +18353,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.mismatch_prop = __pyx_v_mismatch_prop; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->trim_left_end(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 741, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->trim_left_end(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18625,7 +18370,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":765 +/* "HTSeq/_HTSeq.pyx":770 * return self[match: seqlen] * * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): # <<<<<<<<<<<<<< @@ -18671,71 +18416,87 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_right_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_25trim_right_end)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mismatch_prop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 765, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 765, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 765, __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 + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 765, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_right_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_25trim_right_end)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mismatch_prop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 770, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } } - __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); - __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, 765, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 770, __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 + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 770, __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, 770, __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; + } + __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); + __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, 770, __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_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 770, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 765, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":766 + /* "HTSeq/_HTSeq.pyx":771 * * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): * cdef int seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -18746,13 +18507,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, 766, __pyx_L1_error) + __PYX_ERR(0, 771, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 766, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 771, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seqlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":767 + /* "HTSeq/_HTSeq.pyx":772 * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): * cdef int seqlen = len(self.seq) * cdef int patlen = len(pattern.seq) # <<<<<<<<<<<<<< @@ -18763,13 +18524,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, 767, __pyx_L1_error) + __PYX_ERR(0, 772, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 772, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_patlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":769 + /* "HTSeq/_HTSeq.pyx":774 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -18779,7 +18540,7 @@ __pyx_t_9 = ((__pyx_v_seqlen < __pyx_v_patlen) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":770 + /* "HTSeq/_HTSeq.pyx":775 * cdef int minlen * if seqlen < patlen: * minlen = seqlen # <<<<<<<<<<<<<< @@ -18788,7 +18549,7 @@ */ __pyx_v_minlen = __pyx_v_seqlen; - /* "HTSeq/_HTSeq.pyx":769 + /* "HTSeq/_HTSeq.pyx":774 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -18798,7 +18559,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":772 + /* "HTSeq/_HTSeq.pyx":777 * minlen = seqlen * else: * minlen = patlen # <<<<<<<<<<<<<< @@ -18810,7 +18571,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":773 + /* "HTSeq/_HTSeq.pyx":778 * else: * minlen = patlen * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -18819,12 +18580,12 @@ */ if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 773, __pyx_L1_error) + __PYX_ERR(0, 778, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 773, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 778, __pyx_L1_error) __pyx_v_seq_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":774 + /* "HTSeq/_HTSeq.pyx":779 * minlen = patlen * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq # <<<<<<<<<<<<<< @@ -18833,12 +18594,12 @@ */ if (unlikely(__pyx_v_pattern->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 774, __pyx_L1_error) + __PYX_ERR(0, 779, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 774, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 779, __pyx_L1_error) __pyx_v_pat_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":775 + /* "HTSeq/_HTSeq.pyx":780 * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq * cdef int match = 0 # <<<<<<<<<<<<<< @@ -18847,7 +18608,7 @@ */ __pyx_v_match = 0; - /* "HTSeq/_HTSeq.pyx":778 + /* "HTSeq/_HTSeq.pyx":783 * cdef int i, j * cdef int num_mismatches * for i in xrange(1, minlen + 1): # <<<<<<<<<<<<<< @@ -18859,7 +18620,7 @@ for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "HTSeq/_HTSeq.pyx":779 + /* "HTSeq/_HTSeq.pyx":784 * cdef int num_mismatches * for i in xrange(1, minlen + 1): * num_mismatches = 0 # <<<<<<<<<<<<<< @@ -18868,7 +18629,7 @@ */ __pyx_v_num_mismatches = 0; - /* "HTSeq/_HTSeq.pyx":780 + /* "HTSeq/_HTSeq.pyx":785 * for i in xrange(1, minlen + 1): * num_mismatches = 0 * for j in xrange(i): # <<<<<<<<<<<<<< @@ -18880,7 +18641,7 @@ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; - /* "HTSeq/_HTSeq.pyx":781 + /* "HTSeq/_HTSeq.pyx":786 * num_mismatches = 0 * for j in xrange(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: # <<<<<<<<<<<<<< @@ -18890,7 +18651,7 @@ __pyx_t_9 = (((__pyx_v_seq_cstr[((__pyx_v_seqlen - __pyx_v_i) + __pyx_v_j)]) != (__pyx_v_pat_cstr[__pyx_v_j])) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":782 + /* "HTSeq/_HTSeq.pyx":787 * for j in xrange(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * num_mismatches += 1 # <<<<<<<<<<<<<< @@ -18899,7 +18660,7 @@ */ __pyx_v_num_mismatches = (__pyx_v_num_mismatches + 1); - /* "HTSeq/_HTSeq.pyx":783 + /* "HTSeq/_HTSeq.pyx":788 * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: # <<<<<<<<<<<<<< @@ -18909,7 +18670,7 @@ __pyx_t_9 = ((__pyx_v_num_mismatches > (__pyx_v_mismatch_prop * __pyx_v_i)) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":784 + /* "HTSeq/_HTSeq.pyx":789 * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: * break # <<<<<<<<<<<<<< @@ -18918,7 +18679,7 @@ */ goto __pyx_L7_break; - /* "HTSeq/_HTSeq.pyx":783 + /* "HTSeq/_HTSeq.pyx":788 * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: # <<<<<<<<<<<<<< @@ -18927,7 +18688,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":781 + /* "HTSeq/_HTSeq.pyx":786 * num_mismatches = 0 * for j in xrange(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: # <<<<<<<<<<<<<< @@ -18938,7 +18699,7 @@ } /*else*/ { - /* "HTSeq/_HTSeq.pyx":786 + /* "HTSeq/_HTSeq.pyx":791 * break * else: * match = i # <<<<<<<<<<<<<< @@ -18950,7 +18711,7 @@ __pyx_L7_break:; } - /* "HTSeq/_HTSeq.pyx":787 + /* "HTSeq/_HTSeq.pyx":792 * else: * match = i * return self[0: seqlen - match] # <<<<<<<<<<<<<< @@ -18958,14 +18719,14 @@ * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), 0, (__pyx_v_seqlen - __pyx_v_match), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), 0, (__pyx_v_seqlen - __pyx_v_match), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 792, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 787, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 792, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":765 + /* "HTSeq/_HTSeq.pyx":770 * return self[match: seqlen] * * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): # <<<<<<<<<<<<<< @@ -19024,7 +18785,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_right_end") < 0)) __PYX_ERR(0, 765, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_right_end") < 0)) __PYX_ERR(0, 770, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -19037,20 +18798,20 @@ } __pyx_v_pattern = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)values[0]); if (values[1]) { - __pyx_v_mismatch_prop = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_mismatch_prop == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 765, __pyx_L3_error) + __pyx_v_mismatch_prop = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_mismatch_prop == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 770, __pyx_L3_error) } else { __pyx_v_mismatch_prop = ((float)0.); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trim_right_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 765, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trim_right_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 770, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.trim_right_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 765, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 770, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_24trim_right_end(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self), __pyx_v_pattern, __pyx_v_mismatch_prop); /* function exit code */ @@ -19071,7 +18832,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.mismatch_prop = __pyx_v_mismatch_prop; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->trim_right_end(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 765, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->trim_right_end(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 770, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19090,7 +18851,7 @@ /* "HTSeq/_HTSeq.pxd":20 * - * cdef class Sequence( object ): + * cdef class Sequence(object): * cdef public bytes seq # <<<<<<<<<<<<<< * cdef public str name * cdef public str descr @@ -19194,11 +18955,11 @@ } /* "HTSeq/_HTSeq.pxd":21 - * cdef class Sequence( object ): + * cdef class Sequence(object): * cdef public bytes seq * cdef public str name # <<<<<<<<<<<<<< * cdef public str descr - * cpdef Sequence get_reverse_complement( self ) + * cpdef Sequence get_reverse_complement(self, bint rename=?) */ /* Python wrapper */ @@ -19302,8 +19063,8 @@ * cdef public bytes seq * cdef public str name * cdef public str descr # <<<<<<<<<<<<<< - * cpdef Sequence get_reverse_complement( self ) - * cpdef object add_bases_to_count_array( Sequence self, numpy.ndarray count_array_ ) + * cpdef Sequence get_reverse_complement(self, bint rename=?) + * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) */ /* Python wrapper */ @@ -19403,7 +19164,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":796 +/* "HTSeq/_HTSeq.pyx":801 * """ * * def __init__(self, bytes seq, str name, bytes qualstr, str qualscale="phred"): # <<<<<<<<<<<<<< @@ -19453,13 +19214,13 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 796, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 801, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qualstr)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 796, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 801, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -19469,7 +19230,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 796, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 801, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -19489,16 +19250,16 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 796, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 801, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seq), (&PyBytes_Type), 1, "seq", 1))) __PYX_ERR(0, 796, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 796, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualstr), (&PyBytes_Type), 1, "qualstr", 1))) __PYX_ERR(0, 796, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualscale), (&PyString_Type), 1, "qualscale", 1))) __PYX_ERR(0, 796, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seq), (&PyBytes_Type), 1, "seq", 1))) __PYX_ERR(0, 801, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyString_Type), 1, "name", 1))) __PYX_ERR(0, 801, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualstr), (&PyBytes_Type), 1, "qualstr", 1))) __PYX_ERR(0, 801, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualscale), (&PyString_Type), 1, "qualscale", 1))) __PYX_ERR(0, 801, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities___init__(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), __pyx_v_seq, __pyx_v_name, __pyx_v_qualstr, __pyx_v_qualscale); /* function exit code */ @@ -19524,14 +19285,14 @@ Py_ssize_t __pyx_t_9; __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":805 + /* "HTSeq/_HTSeq.pyx":810 * "phred", "solexa", "solexa-old", or "noquals" ) * """ * Sequence.__init__(self, seq, name) # <<<<<<<<<<<<<< * if qualscale != "noquals": * if len(seq) != len(qualstr): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -19548,7 +19309,7 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_seq, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -19556,13 +19317,13 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_seq, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 810, __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; @@ -19576,25 +19337,25 @@ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_name); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __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; - /* "HTSeq/_HTSeq.pyx":806 + /* "HTSeq/_HTSeq.pyx":811 * """ * Sequence.__init__(self, seq, name) * if qualscale != "noquals": # <<<<<<<<<<<<<< * if len(seq) != len(qualstr): * raise ValueError, "'seq' and 'qualstr' do not have the same length." */ - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_qualscale, __pyx_n_s_noquals, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 806, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_qualscale, __pyx_n_s_noquals, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 811, __pyx_L1_error) __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "HTSeq/_HTSeq.pyx":807 + /* "HTSeq/_HTSeq.pyx":812 * Sequence.__init__(self, seq, name) * if qualscale != "noquals": * if len(seq) != len(qualstr): # <<<<<<<<<<<<<< @@ -19603,18 +19364,18 @@ */ if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 807, __pyx_L1_error) + __PYX_ERR(0, 812, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_seq); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_seq); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 812, __pyx_L1_error) if (unlikely(__pyx_v_qualstr == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 807, __pyx_L1_error) + __PYX_ERR(0, 812, __pyx_L1_error) } - __pyx_t_9 = PyBytes_GET_SIZE(__pyx_v_qualstr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 807, __pyx_L1_error) + __pyx_t_9 = PyBytes_GET_SIZE(__pyx_v_qualstr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 812, __pyx_L1_error) __pyx_t_7 = ((__pyx_t_8 != __pyx_t_9) != 0); if (unlikely(__pyx_t_7)) { - /* "HTSeq/_HTSeq.pyx":808 + /* "HTSeq/_HTSeq.pyx":813 * if qualscale != "noquals": * if len(seq) != len(qualstr): * raise ValueError, "'seq' and 'qualstr' do not have the same length." # <<<<<<<<<<<<<< @@ -19622,9 +19383,9 @@ * else: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_seq_and_qualstr_do_not_have_the, 0, 0); - __PYX_ERR(0, 808, __pyx_L1_error) + __PYX_ERR(0, 813, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":807 + /* "HTSeq/_HTSeq.pyx":812 * Sequence.__init__(self, seq, name) * if qualscale != "noquals": * if len(seq) != len(qualstr): # <<<<<<<<<<<<<< @@ -19633,7 +19394,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":809 + /* "HTSeq/_HTSeq.pyx":814 * if len(seq) != len(qualstr): * raise ValueError, "'seq' and 'qualstr' do not have the same length." * self._qualstr = qualstr # <<<<<<<<<<<<<< @@ -19646,7 +19407,7 @@ __Pyx_DECREF(__pyx_v_self->_qualstr); __pyx_v_self->_qualstr = __pyx_v_qualstr; - /* "HTSeq/_HTSeq.pyx":806 + /* "HTSeq/_HTSeq.pyx":811 * """ * Sequence.__init__(self, seq, name) * if qualscale != "noquals": # <<<<<<<<<<<<<< @@ -19656,7 +19417,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":811 + /* "HTSeq/_HTSeq.pyx":816 * self._qualstr = qualstr * else: * self._qualstr = b'' # <<<<<<<<<<<<<< @@ -19672,7 +19433,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":812 + /* "HTSeq/_HTSeq.pyx":817 * else: * self._qualstr = b'' * self._qualscale = qualscale # <<<<<<<<<<<<<< @@ -19685,7 +19446,7 @@ __Pyx_DECREF(__pyx_v_self->_qualscale); __pyx_v_self->_qualscale = __pyx_v_qualscale; - /* "HTSeq/_HTSeq.pyx":813 + /* "HTSeq/_HTSeq.pyx":818 * self._qualstr = b'' * self._qualscale = qualscale * self._qualarr = None # <<<<<<<<<<<<<< @@ -19698,7 +19459,7 @@ __Pyx_DECREF(__pyx_v_self->_qualarr); __pyx_v_self->_qualarr = Py_None; - /* "HTSeq/_HTSeq.pyx":814 + /* "HTSeq/_HTSeq.pyx":819 * self._qualscale = qualscale * self._qualarr = None * self._qualstr_phred = b'' # <<<<<<<<<<<<<< @@ -19711,7 +19472,7 @@ __Pyx_DECREF(__pyx_v_self->_qualstr_phred); __pyx_v_self->_qualstr_phred = __pyx_kp_b__3; - /* "HTSeq/_HTSeq.pyx":796 + /* "HTSeq/_HTSeq.pyx":801 * """ * * def __init__(self, bytes seq, str name, bytes qualstr, str qualscale="phred"): # <<<<<<<<<<<<<< @@ -19734,7 +19495,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":816 +/* "HTSeq/_HTSeq.pyx":821 * self._qualstr_phred = b'' * * cdef _fill_qual_arr(SequenceWithQualities self): # <<<<<<<<<<<<<< @@ -19776,7 +19537,7 @@ __pyx_pybuffernd_qualarr.data = NULL; __pyx_pybuffernd_qualarr.rcbuffer = &__pyx_pybuffer_qualarr; - /* "HTSeq/_HTSeq.pyx":817 + /* "HTSeq/_HTSeq.pyx":822 * * cdef _fill_qual_arr(SequenceWithQualities self): * cdef int seq_len = len(self.seq) # <<<<<<<<<<<<<< @@ -19787,24 +19548,24 @@ __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, 817, __pyx_L1_error) + __PYX_ERR(0, 822, __pyx_L1_error) } - __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 817, __pyx_L1_error) + __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 822, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seq_len = __pyx_t_2; - /* "HTSeq/_HTSeq.pyx":818 + /* "HTSeq/_HTSeq.pyx":823 * cdef _fill_qual_arr(SequenceWithQualities self): * cdef int seq_len = len(self.seq) * if self._qualscale == "missing": # <<<<<<<<<<<<<< * raise ValueError, "Quality string missing." * if seq_len != len(self._qualstr): */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_missing, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_missing, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 823, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (unlikely(__pyx_t_4)) { - /* "HTSeq/_HTSeq.pyx":819 + /* "HTSeq/_HTSeq.pyx":824 * cdef int seq_len = len(self.seq) * if self._qualscale == "missing": * raise ValueError, "Quality string missing." # <<<<<<<<<<<<<< @@ -19812,9 +19573,9 @@ * raise ValueError, "Quality string has not the same length as sequence." */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Quality_string_missing, 0, 0); - __PYX_ERR(0, 819, __pyx_L1_error) + __PYX_ERR(0, 824, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":818 + /* "HTSeq/_HTSeq.pyx":823 * cdef _fill_qual_arr(SequenceWithQualities self): * cdef int seq_len = len(self.seq) * if self._qualscale == "missing": # <<<<<<<<<<<<<< @@ -19823,7 +19584,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":820 + /* "HTSeq/_HTSeq.pyx":825 * if self._qualscale == "missing": * raise ValueError, "Quality string missing." * if seq_len != len(self._qualstr): # <<<<<<<<<<<<<< @@ -19834,14 +19595,14 @@ __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, 820, __pyx_L1_error) + __PYX_ERR(0, 825, __pyx_L1_error) } - __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 820, __pyx_L1_error) + __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 825, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((__pyx_v_seq_len != __pyx_t_2) != 0); if (unlikely(__pyx_t_4)) { - /* "HTSeq/_HTSeq.pyx":821 + /* "HTSeq/_HTSeq.pyx":826 * raise ValueError, "Quality string missing." * if seq_len != len(self._qualstr): * raise ValueError, "Quality string has not the same length as sequence." # <<<<<<<<<<<<<< @@ -19849,9 +19610,9 @@ * cdef int i */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Quality_string_has_not_the_same, 0, 0); - __PYX_ERR(0, 821, __pyx_L1_error) + __PYX_ERR(0, 826, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":820 + /* "HTSeq/_HTSeq.pyx":825 * if self._qualscale == "missing": * raise ValueError, "Quality string missing." * if seq_len != len(self._qualstr): # <<<<<<<<<<<<<< @@ -19860,28 +19621,28 @@ */ } - /* "HTSeq/_HTSeq.pyx":822 + /* "HTSeq/_HTSeq.pyx":827 * if seq_len != len(self._qualstr): * raise ValueError, "Quality string has not the same length as sequence." * cdef numpy.ndarray[numpy.int_t, ndim= 1] qualarr = numpy.empty((seq_len, ), numpy.int) # <<<<<<<<<<<<<< * cdef int i * cdef char * qualstr = self._qualstr */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_seq_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_seq_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -19899,7 +19660,7 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -19909,7 +19670,7 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -19917,7 +19678,7 @@ } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 827, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -19928,18 +19689,18 @@ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_8); __pyx_t_7 = 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, 822, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 827, __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; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 822, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 827, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_qualarr.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_qualarr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 822, __pyx_L1_error) + __PYX_ERR(0, 827, __pyx_L1_error) } else {__pyx_pybuffernd_qualarr.diminfo[0].strides = __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qualarr.diminfo[0].shape = __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.shape[0]; } } @@ -19947,7 +19708,7 @@ __pyx_v_qualarr = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":824 + /* "HTSeq/_HTSeq.pyx":829 * cdef numpy.ndarray[numpy.int_t, ndim= 1] qualarr = numpy.empty((seq_len, ), numpy.int) * cdef int i * cdef char * qualstr = self._qualstr # <<<<<<<<<<<<<< @@ -19956,23 +19717,23 @@ */ if (unlikely(__pyx_v_self->_qualstr == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 824, __pyx_L1_error) + __PYX_ERR(0, 829, __pyx_L1_error) } - __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 824, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 829, __pyx_L1_error) __pyx_v_qualstr = __pyx_t_12; - /* "HTSeq/_HTSeq.pyx":825 + /* "HTSeq/_HTSeq.pyx":830 * cdef int i * cdef char * qualstr = self._qualstr * if self._qualscale == "phred": # <<<<<<<<<<<<<< * for i in xrange(seq_len): * qualarr[i] = qualstr[i] - 33 */ - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_phred, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_phred, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 830, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":826 + /* "HTSeq/_HTSeq.pyx":831 * cdef char * qualstr = self._qualstr * if self._qualscale == "phred": * for i in xrange(seq_len): # <<<<<<<<<<<<<< @@ -19984,7 +19745,7 @@ for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; - /* "HTSeq/_HTSeq.pyx":827 + /* "HTSeq/_HTSeq.pyx":832 * if self._qualscale == "phred": * for i in xrange(seq_len): * qualarr[i] = qualstr[i] - 33 # <<<<<<<<<<<<<< @@ -19999,12 +19760,12 @@ } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_qualarr.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); - __PYX_ERR(0, 827, __pyx_L1_error) + __PYX_ERR(0, 832, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_qualarr.diminfo[0].strides) = ((__pyx_v_qualstr[__pyx_v_i]) - 33); } - /* "HTSeq/_HTSeq.pyx":825 + /* "HTSeq/_HTSeq.pyx":830 * cdef int i * cdef char * qualstr = self._qualstr * if self._qualscale == "phred": # <<<<<<<<<<<<<< @@ -20014,18 +19775,18 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":828 + /* "HTSeq/_HTSeq.pyx":833 * for i in xrange(seq_len): * qualarr[i] = qualstr[i] - 33 * elif self._qualscale == "solexa": # <<<<<<<<<<<<<< * for i in xrange(seq_len): * qualarr[i] = qualstr[i] - 64 */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_solexa, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_solexa, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 833, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":829 + /* "HTSeq/_HTSeq.pyx":834 * qualarr[i] = qualstr[i] - 33 * elif self._qualscale == "solexa": * for i in xrange(seq_len): # <<<<<<<<<<<<<< @@ -20037,7 +19798,7 @@ for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; - /* "HTSeq/_HTSeq.pyx":830 + /* "HTSeq/_HTSeq.pyx":835 * elif self._qualscale == "solexa": * for i in xrange(seq_len): * qualarr[i] = qualstr[i] - 64 # <<<<<<<<<<<<<< @@ -20052,12 +19813,12 @@ } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_qualarr.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); - __PYX_ERR(0, 830, __pyx_L1_error) + __PYX_ERR(0, 835, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_qualarr.diminfo[0].strides) = ((__pyx_v_qualstr[__pyx_v_i]) - 64); } - /* "HTSeq/_HTSeq.pyx":828 + /* "HTSeq/_HTSeq.pyx":833 * for i in xrange(seq_len): * qualarr[i] = qualstr[i] - 33 * elif self._qualscale == "solexa": # <<<<<<<<<<<<<< @@ -20067,18 +19828,18 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":831 + /* "HTSeq/_HTSeq.pyx":836 * for i in xrange(seq_len): * qualarr[i] = qualstr[i] - 64 * elif self._qualscale == "solexa-old": # <<<<<<<<<<<<<< * for i in xrange(seq_len): * qualarr[i] = 10 * \ */ - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_kp_s_solexa_old, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 831, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_kp_s_solexa_old, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 836, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); if (likely(__pyx_t_3)) { - /* "HTSeq/_HTSeq.pyx":832 + /* "HTSeq/_HTSeq.pyx":837 * qualarr[i] = qualstr[i] - 64 * elif self._qualscale == "solexa-old": * for i in xrange(seq_len): # <<<<<<<<<<<<<< @@ -20090,19 +19851,19 @@ for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; - /* "HTSeq/_HTSeq.pyx":834 + /* "HTSeq/_HTSeq.pyx":839 * for i in xrange(seq_len): * qualarr[i] = 10 * \ * math.log10(1 + 10 ** (qualstr[i] - 64) / 10.0) # <<<<<<<<<<<<<< * else: * raise ValueError, "Illegal quality scale '%s'." % self._qualscale */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_log10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_log10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyFloat_FromDouble((1.0 + (__Pyx_pow_long(10, ((__pyx_v_qualstr[__pyx_v_i]) - 64)) / 10.0))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 834, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble((1.0 + (__Pyx_pow_long(10, ((__pyx_v_qualstr[__pyx_v_i]) - 64)) / 10.0))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 839, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { @@ -20114,54 +19875,24 @@ __Pyx_DECREF_SET(__pyx_t_10, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 839, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "HTSeq/_HTSeq.pyx":833 + /* "HTSeq/_HTSeq.pyx":838 * elif self._qualscale == "solexa-old": * for i in xrange(seq_len): * qualarr[i] = 10 * \ # <<<<<<<<<<<<<< * math.log10(1 + 10 ** (qualstr[i] - 64) / 10.0) * else: */ - __pyx_t_10 = PyNumber_Multiply(__pyx_int_10, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_10 = PyNumber_Multiply(__pyx_int_10, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = __Pyx_PyInt_As_npy_long(__pyx_t_10); if (unlikely((__pyx_t_18 == ((npy_long)-1)) && PyErr_Occurred())) __PYX_ERR(0, 833, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyInt_As_npy_long(__pyx_t_10); if (unlikely((__pyx_t_18 == ((npy_long)-1)) && PyErr_Occurred())) __PYX_ERR(0, 838, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_19 = __pyx_v_i; __pyx_t_16 = -1; @@ -20171,12 +19902,12 @@ } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_qualarr.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); - __PYX_ERR(0, 833, __pyx_L1_error) + __PYX_ERR(0, 838, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_qualarr.diminfo[0].strides) = __pyx_t_18; } - /* "HTSeq/_HTSeq.pyx":831 + /* "HTSeq/_HTSeq.pyx":836 * for i in xrange(seq_len): * qualarr[i] = qualstr[i] - 64 * elif self._qualscale == "solexa-old": # <<<<<<<<<<<<<< @@ -20186,7 +19917,7 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":836 + /* "HTSeq/_HTSeq.pyx":841 * math.log10(1 + 10 ** (qualstr[i] - 64) / 10.0) * else: * raise ValueError, "Illegal quality scale '%s'." % self._qualscale # <<<<<<<<<<<<<< @@ -20194,15 +19925,15 @@ * */ /*else*/ { - __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_Illegal_quality_scale_s, __pyx_v_self->_qualscale); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyString_Format(__pyx_kp_s_Illegal_quality_scale_s, __pyx_v_self->_qualscale); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_10, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 836, __pyx_L1_error) + __PYX_ERR(0, 841, __pyx_L1_error) } __pyx_L5:; - /* "HTSeq/_HTSeq.pyx":837 + /* "HTSeq/_HTSeq.pyx":842 * else: * raise ValueError, "Illegal quality scale '%s'." % self._qualscale * self._qualarr = qualarr # <<<<<<<<<<<<<< @@ -20215,7 +19946,7 @@ __Pyx_DECREF(__pyx_v_self->_qualarr); __pyx_v_self->_qualarr = ((PyObject *)__pyx_v_qualarr); - /* "HTSeq/_HTSeq.pyx":816 + /* "HTSeq/_HTSeq.pyx":821 * self._qualstr_phred = b'' * * cdef _fill_qual_arr(SequenceWithQualities self): # <<<<<<<<<<<<<< @@ -20251,7 +19982,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":840 +/* "HTSeq/_HTSeq.pyx":845 * * property qual: * def __get__(self): # <<<<<<<<<<<<<< @@ -20280,7 +20011,7 @@ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":841 + /* "HTSeq/_HTSeq.pyx":846 * property qual: * def __get__(self): * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -20291,18 +20022,18 @@ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":842 + /* "HTSeq/_HTSeq.pyx":847 * def __get__(self): * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * return self._qualarr * */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":841 + /* "HTSeq/_HTSeq.pyx":846 * property qual: * def __get__(self): * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -20311,7 +20042,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":843 + /* "HTSeq/_HTSeq.pyx":848 * if self._qualarr is None: * self._fill_qual_arr() * return self._qualarr # <<<<<<<<<<<<<< @@ -20323,7 +20054,7 @@ __pyx_r = __pyx_v_self->_qualarr; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":840 + /* "HTSeq/_HTSeq.pyx":845 * * property qual: * def __get__(self): # <<<<<<<<<<<<<< @@ -20342,7 +20073,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":845 +/* "HTSeq/_HTSeq.pyx":850 * return self._qualarr * * def __set__(self, newvalue): # <<<<<<<<<<<<<< @@ -20376,7 +20107,7 @@ Py_ssize_t __pyx_t_7; __Pyx_RefNannySetupContext("__set__", 0); - /* "HTSeq/_HTSeq.pyx":846 + /* "HTSeq/_HTSeq.pyx":851 * * def __set__(self, newvalue): * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.int): # <<<<<<<<<<<<<< @@ -20390,24 +20121,24 @@ __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_newvalue, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_newvalue, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_int); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 846, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 851, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; __pyx_t_3 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_3)) { - /* "HTSeq/_HTSeq.pyx":847 + /* "HTSeq/_HTSeq.pyx":852 * def __set__(self, newvalue): * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.int): * raise TypeError, "qual can only be assigned a numpy array of type numpy.int" # <<<<<<<<<<<<<< @@ -20415,9 +20146,9 @@ * raise TypeError, "assignment to qual with illegal shape" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_qual_can_only_be_assigned_a_nump, 0, 0); - __PYX_ERR(0, 847, __pyx_L1_error) + __PYX_ERR(0, 852, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":846 + /* "HTSeq/_HTSeq.pyx":851 * * def __set__(self, newvalue): * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.int): # <<<<<<<<<<<<<< @@ -20426,39 +20157,39 @@ */ } - /* "HTSeq/_HTSeq.pyx":848 + /* "HTSeq/_HTSeq.pyx":853 * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.int): * raise TypeError, "qual can only be assigned a numpy array of type numpy.int" * if not (newvalue.shape == (len(self.seq), )): # <<<<<<<<<<<<<< * raise TypeError, "assignment to qual with illegal shape" * self._qualarr = newvalue */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_newvalue, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_newvalue, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_v_self->__pyx_base.seq; __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, 848, __pyx_L1_error) + __PYX_ERR(0, 853, __pyx_L1_error) } - __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 848, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 853, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_1)) { - /* "HTSeq/_HTSeq.pyx":849 + /* "HTSeq/_HTSeq.pyx":854 * raise TypeError, "qual can only be assigned a numpy array of type numpy.int" * if not (newvalue.shape == (len(self.seq), )): * raise TypeError, "assignment to qual with illegal shape" # <<<<<<<<<<<<<< @@ -20466,9 +20197,9 @@ * self._qualstr = b"" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_assignment_to_qual_with_illegal, 0, 0); - __PYX_ERR(0, 849, __pyx_L1_error) + __PYX_ERR(0, 854, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":848 + /* "HTSeq/_HTSeq.pyx":853 * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.int): * raise TypeError, "qual can only be assigned a numpy array of type numpy.int" * if not (newvalue.shape == (len(self.seq), )): # <<<<<<<<<<<<<< @@ -20477,7 +20208,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":850 + /* "HTSeq/_HTSeq.pyx":855 * if not (newvalue.shape == (len(self.seq), )): * raise TypeError, "assignment to qual with illegal shape" * self._qualarr = newvalue # <<<<<<<<<<<<<< @@ -20490,7 +20221,7 @@ __Pyx_DECREF(__pyx_v_self->_qualarr); __pyx_v_self->_qualarr = __pyx_v_newvalue; - /* "HTSeq/_HTSeq.pyx":851 + /* "HTSeq/_HTSeq.pyx":856 * raise TypeError, "assignment to qual with illegal shape" * self._qualarr = newvalue * self._qualstr = b"" # <<<<<<<<<<<<<< @@ -20503,7 +20234,7 @@ __Pyx_DECREF(__pyx_v_self->_qualstr); __pyx_v_self->_qualstr = __pyx_kp_b__3; - /* "HTSeq/_HTSeq.pyx":852 + /* "HTSeq/_HTSeq.pyx":857 * self._qualarr = newvalue * self._qualstr = b"" * self._qualscale = "none" # <<<<<<<<<<<<<< @@ -20516,7 +20247,7 @@ __Pyx_DECREF(__pyx_v_self->_qualscale); __pyx_v_self->_qualscale = __pyx_n_s_none; - /* "HTSeq/_HTSeq.pyx":853 + /* "HTSeq/_HTSeq.pyx":858 * self._qualstr = b"" * self._qualscale = "none" * self._qualstr_phred = b"" # <<<<<<<<<<<<<< @@ -20529,19 +20260,19 @@ __Pyx_DECREF(__pyx_v_self->_qualstr_phred); __pyx_v_self->_qualstr_phred = __pyx_kp_b__3; - /* "HTSeq/_HTSeq.pyx":856 + /* "HTSeq/_HTSeq.pyx":861 * # Experimentally trying to set qualstr when the array is modified * # directly * tmp = self.qualstr # <<<<<<<<<<<<<< * self._qualstr = self._qualstr_phred * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 856, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 861, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_tmp = __pyx_t_6; __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":857 + /* "HTSeq/_HTSeq.pyx":862 * # directly * tmp = self.qualstr * self._qualstr = self._qualstr_phred # <<<<<<<<<<<<<< @@ -20556,7 +20287,7 @@ __pyx_v_self->_qualstr = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":845 + /* "HTSeq/_HTSeq.pyx":850 * return self._qualarr * * def __set__(self, newvalue): # <<<<<<<<<<<<<< @@ -20579,7 +20310,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":859 +/* "HTSeq/_HTSeq.pyx":864 * self._qualstr = self._qualstr_phred * * def __repr__(self): # <<<<<<<<<<<<<< @@ -20607,7 +20338,7 @@ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "HTSeq/_HTSeq.pyx":860 + /* "HTSeq/_HTSeq.pyx":865 * * def __repr__(self): * return "<%s object '%s'>" % (self.__class__.__name__, self.name) # <<<<<<<<<<<<<< @@ -20615,12 +20346,12 @@ * def __getitem__(self, item): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __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, 860, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); @@ -20628,14 +20359,14 @@ __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.name); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_object_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_object_s, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":859 + /* "HTSeq/_HTSeq.pyx":864 * self._qualstr = self._qualstr_phred * * def __repr__(self): # <<<<<<<<<<<<<< @@ -20655,7 +20386,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":862 +/* "HTSeq/_HTSeq.pyx":867 * return "<%s object '%s'>" % (self.__class__.__name__, self.name) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -20686,7 +20417,7 @@ PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "HTSeq/_HTSeq.pyx":863 + /* "HTSeq/_HTSeq.pyx":868 * * def __getitem__(self, item): * if self.name.endswith("[part]"): # <<<<<<<<<<<<<< @@ -20695,12 +20426,12 @@ */ if (unlikely(__pyx_v_self->__pyx_base.name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "endswith"); - __PYX_ERR(0, 863, __pyx_L1_error) + __PYX_ERR(0, 868, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyStr_Tailmatch(__pyx_v_self->__pyx_base.name, __pyx_kp_s_part, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 863, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyStr_Tailmatch(__pyx_v_self->__pyx_base.name, __pyx_kp_s_part, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 868, __pyx_L1_error) if ((__pyx_t_1 != 0)) { - /* "HTSeq/_HTSeq.pyx":864 + /* "HTSeq/_HTSeq.pyx":869 * def __getitem__(self, item): * if self.name.endswith("[part]"): * new_name = self.name # <<<<<<<<<<<<<< @@ -20712,7 +20443,7 @@ __pyx_v_new_name = __pyx_t_2; __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":863 + /* "HTSeq/_HTSeq.pyx":868 * * def __getitem__(self, item): * if self.name.endswith("[part]"): # <<<<<<<<<<<<<< @@ -20722,7 +20453,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":866 + /* "HTSeq/_HTSeq.pyx":871 * new_name = self.name * else: * new_name = self.name + "[part]" # <<<<<<<<<<<<<< @@ -20730,14 +20461,14 @@ * self.seq[item], new_name, self.qualstr[item]) */ /*else*/ { - __pyx_t_2 = PyNumber_Add(__pyx_v_self->__pyx_base.name, __pyx_kp_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 866, __pyx_L1_error) + __pyx_t_2 = PyNumber_Add(__pyx_v_self->__pyx_base.name, __pyx_kp_s_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 871, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_new_name = __pyx_t_2; __pyx_t_2 = 0; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":867 + /* "HTSeq/_HTSeq.pyx":872 * else: * new_name = self.name + "[part]" * return SequenceWithQualities( # <<<<<<<<<<<<<< @@ -20746,29 +20477,29 @@ */ __Pyx_XDECREF(__pyx_r); - /* "HTSeq/_HTSeq.pyx":868 + /* "HTSeq/_HTSeq.pyx":873 * new_name = self.name + "[part]" * return SequenceWithQualities( * self.seq[item], new_name, self.qualstr[item]) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.seq, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.seq, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":867 + /* "HTSeq/_HTSeq.pyx":872 * else: * new_name = self.name + "[part]" * return SequenceWithQualities( # <<<<<<<<<<<<<< * self.seq[item], new_name, self.qualstr[item]) * */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -20779,14 +20510,14 @@ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 872, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":862 + /* "HTSeq/_HTSeq.pyx":867 * return "<%s object '%s'>" % (self.__class__.__name__, self.name) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -20808,7 +20539,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":871 +/* "HTSeq/_HTSeq.pyx":876 * * @property * def qualstr(self): # <<<<<<<<<<<<<< @@ -20858,7 +20589,7 @@ __pyx_pybuffernd_qual_array.data = NULL; __pyx_pybuffernd_qual_array.rcbuffer = &__pyx_pybuffer_qual_array; - /* "HTSeq/_HTSeq.pyx":873 + /* "HTSeq/_HTSeq.pyx":878 * def qualstr(self): * cdef int seqlen * cdef char * qualstr_phred_cstr = self._qualstr_phred # <<<<<<<<<<<<<< @@ -20867,12 +20598,12 @@ */ if (unlikely(__pyx_v_self->_qualstr_phred == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 873, __pyx_L1_error) + __PYX_ERR(0, 878, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr_phred); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr_phred); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 878, __pyx_L1_error) __pyx_v_qualstr_phred_cstr = __pyx_t_1; - /* "HTSeq/_HTSeq.pyx":876 + /* "HTSeq/_HTSeq.pyx":881 * cdef int i * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array * if qualstr_phred_cstr[0] == 0: # <<<<<<<<<<<<<< @@ -20882,18 +20613,18 @@ __pyx_t_2 = (((__pyx_v_qualstr_phred_cstr[0]) == 0) != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":877 + /* "HTSeq/_HTSeq.pyx":882 * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array * if qualstr_phred_cstr[0] == 0: * if self._qualscale == "noquals": # <<<<<<<<<<<<<< * raise ValueError, "Quality string missing" * if self._qualscale == "phred": */ - __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_noquals, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 877, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_noquals, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 882, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "HTSeq/_HTSeq.pyx":878 + /* "HTSeq/_HTSeq.pyx":883 * if qualstr_phred_cstr[0] == 0: * if self._qualscale == "noquals": * raise ValueError, "Quality string missing" # <<<<<<<<<<<<<< @@ -20901,9 +20632,9 @@ * self._qualstr_phred = self._qualstr */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Quality_string_missing_2, 0, 0); - __PYX_ERR(0, 878, __pyx_L1_error) + __PYX_ERR(0, 883, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":877 + /* "HTSeq/_HTSeq.pyx":882 * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array * if qualstr_phred_cstr[0] == 0: * if self._qualscale == "noquals": # <<<<<<<<<<<<<< @@ -20912,18 +20643,18 @@ */ } - /* "HTSeq/_HTSeq.pyx":879 + /* "HTSeq/_HTSeq.pyx":884 * if self._qualscale == "noquals": * raise ValueError, "Quality string missing" * if self._qualscale == "phred": # <<<<<<<<<<<<<< * self._qualstr_phred = self._qualstr * else: */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_phred, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->_qualscale, __pyx_n_s_phred, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 884, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":880 + /* "HTSeq/_HTSeq.pyx":885 * raise ValueError, "Quality string missing" * if self._qualscale == "phred": * self._qualstr_phred = self._qualstr # <<<<<<<<<<<<<< @@ -20938,7 +20669,7 @@ __pyx_v_self->_qualstr_phred = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":879 + /* "HTSeq/_HTSeq.pyx":884 * if self._qualscale == "noquals": * raise ValueError, "Quality string missing" * if self._qualscale == "phred": # <<<<<<<<<<<<<< @@ -20948,7 +20679,7 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":882 + /* "HTSeq/_HTSeq.pyx":887 * self._qualstr_phred = self._qualstr * else: * seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -20960,32 +20691,32 @@ __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 882, __pyx_L1_error) + __PYX_ERR(0, 887, __pyx_L1_error) } - __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 882, __pyx_L1_error) + __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_seqlen = __pyx_t_5; - /* "HTSeq/_HTSeq.pyx":883 + /* "HTSeq/_HTSeq.pyx":888 * else: * seqlen = len(self.seq) * self._qualstr_phred = (' ') * seqlen # <<<<<<<<<<<<<< * qualstr_phred_cstr = self._qualstr_phred * if self._qualarr is None: */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_seqlen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_seqlen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Multiply(__pyx_kp_s__13, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_kp_s__12, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 883, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 888, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->_qualstr_phred); __Pyx_DECREF(__pyx_v_self->_qualstr_phred); __pyx_v_self->_qualstr_phred = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":884 + /* "HTSeq/_HTSeq.pyx":889 * seqlen = len(self.seq) * self._qualstr_phred = (' ') * seqlen * qualstr_phred_cstr = self._qualstr_phred # <<<<<<<<<<<<<< @@ -20994,12 +20725,12 @@ */ if (unlikely(__pyx_v_self->_qualstr_phred == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 884, __pyx_L1_error) + __PYX_ERR(0, 889, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr_phred); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr_phred); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 889, __pyx_L1_error) __pyx_v_qualstr_phred_cstr = __pyx_t_1; - /* "HTSeq/_HTSeq.pyx":885 + /* "HTSeq/_HTSeq.pyx":890 * self._qualstr_phred = (' ') * seqlen * qualstr_phred_cstr = self._qualstr_phred * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -21010,18 +20741,18 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":886 + /* "HTSeq/_HTSeq.pyx":891 * qualstr_phred_cstr = self._qualstr_phred * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * qual_array = self._qualarr * for i in xrange(seqlen): */ - __pyx_t_6 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":885 + /* "HTSeq/_HTSeq.pyx":890 * self._qualstr_phred = (' ') * seqlen * qualstr_phred_cstr = self._qualstr_phred * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -21030,14 +20761,14 @@ */ } - /* "HTSeq/_HTSeq.pyx":887 + /* "HTSeq/_HTSeq.pyx":892 * if self._qualarr is None: * self._fill_qual_arr() * qual_array = self._qualarr # <<<<<<<<<<<<<< * for i in xrange(seqlen): * qualstr_phred_cstr[i] = 33 + qual_array[i] */ - if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 887, __pyx_L1_error) + if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 892, __pyx_L1_error) __pyx_t_6 = __pyx_v_self->_qualarr; __Pyx_INCREF(__pyx_t_6); { @@ -21055,12 +20786,12 @@ __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_qual_array.diminfo[0].strides = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qual_array.diminfo[0].shape = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.shape[0]; - if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 887, __pyx_L1_error) + if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 892, __pyx_L1_error) } __pyx_v_qual_array = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":888 + /* "HTSeq/_HTSeq.pyx":893 * self._fill_qual_arr() * qual_array = self._qualarr * for i in xrange(seqlen): # <<<<<<<<<<<<<< @@ -21072,7 +20803,7 @@ for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "HTSeq/_HTSeq.pyx":889 + /* "HTSeq/_HTSeq.pyx":894 * qual_array = self._qualarr * for i in xrange(seqlen): * qualstr_phred_cstr[i] = 33 + qual_array[i] # <<<<<<<<<<<<<< @@ -21087,14 +20818,14 @@ } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 889, __pyx_L1_error) + __PYX_ERR(0, 894, __pyx_L1_error) } (__pyx_v_qualstr_phred_cstr[__pyx_v_i]) = (33 + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_qual_array.diminfo[0].strides))); } } __pyx_L5:; - /* "HTSeq/_HTSeq.pyx":876 + /* "HTSeq/_HTSeq.pyx":881 * cdef int i * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array * if qualstr_phred_cstr[0] == 0: # <<<<<<<<<<<<<< @@ -21103,7 +20834,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":890 + /* "HTSeq/_HTSeq.pyx":895 * for i in xrange(seqlen): * qualstr_phred_cstr[i] = 33 + qual_array[i] * return self._qualstr_phred # <<<<<<<<<<<<<< @@ -21115,7 +20846,7 @@ __pyx_r = __pyx_v_self->_qualstr_phred; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":871 + /* "HTSeq/_HTSeq.pyx":876 * * @property * def qualstr(self): # <<<<<<<<<<<<<< @@ -21145,7 +20876,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":892 +/* "HTSeq/_HTSeq.pyx":897 * return self._qualstr_phred * * def write_to_fastq_file(self, fastq_file): # <<<<<<<<<<<<<< @@ -21176,17 +20907,16 @@ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("write_to_fastq_file", 0); - /* "HTSeq/_HTSeq.pyx":893 + /* "HTSeq/_HTSeq.pyx":898 * * def write_to_fastq_file(self, fastq_file): * if hasattr(self, "descr") and self.descr is not None: # <<<<<<<<<<<<<< * fastq_file.write("@%s %s\n" % (self.name, self.descr)) * else: */ - __pyx_t_2 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_descr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_2 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_s_descr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 898, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { @@ -21199,16 +20929,16 @@ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":894 + /* "HTSeq/_HTSeq.pyx":899 * def write_to_fastq_file(self, fastq_file): * if hasattr(self, "descr") and self.descr is not None: * fastq_file.write("@%s %s\n" % (self.name, self.descr)) # <<<<<<<<<<<<<< * else: * fastq_file.write("@%s\n" % self.name) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_v_self->__pyx_base.name); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name); @@ -21216,7 +20946,7 @@ __Pyx_INCREF(__pyx_v_self->__pyx_base.descr); __Pyx_GIVEREF(__pyx_v_self->__pyx_base.descr); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_self->__pyx_base.descr); - __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 894, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -21229,45 +20959,15 @@ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":893 + /* "HTSeq/_HTSeq.pyx":898 * * def write_to_fastq_file(self, fastq_file): * if hasattr(self, "descr") and self.descr is not None: # <<<<<<<<<<<<<< @@ -21277,7 +20977,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":896 + /* "HTSeq/_HTSeq.pyx":901 * fastq_file.write("@%s %s\n" % (self.name, self.descr)) * else: * fastq_file.write("@%s\n" % self.name) # <<<<<<<<<<<<<< @@ -21285,196 +20985,118 @@ * fastq_file.write("+\n") */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_s_2, __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 896, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_7 = NULL; + __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_s_2, __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_7)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_7) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_8); - __pyx_t_8 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 901, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":897 + /* "HTSeq/_HTSeq.pyx":902 * else: * fastq_file.write("@%s\n" % self.name) * fastq_file.write(self.seq + "\n") # <<<<<<<<<<<<<< * fastq_file.write("+\n") * fastq_file.write(self.qualstr + "\n") */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyNumber_Add(__pyx_v_self->__pyx_base.seq, __pyx_kp_s__12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = NULL; + __pyx_t_7 = PyNumber_Add(__pyx_v_self->__pyx_base.seq, __pyx_kp_s__11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_8)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_8) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 897, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":898 + /* "HTSeq/_HTSeq.pyx":903 * fastq_file.write("@%s\n" % self.name) * fastq_file.write(self.seq + "\n") * fastq_file.write("+\n") # <<<<<<<<<<<<<< * fastq_file.write(self.qualstr + "\n") * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_kp_s__13) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_s__13); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 903, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":899 + /* "HTSeq/_HTSeq.pyx":904 * fastq_file.write(self.seq + "\n") * fastq_file.write("+\n") * fastq_file.write(self.qualstr + "\n") # <<<<<<<<<<<<<< * * def get_fastq_str(self, bint convert_to_phred=False): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_6 = PyNumber_Add(__pyx_t_7, __pyx_kp_s__11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_7) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 899, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 904, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":892 + /* "HTSeq/_HTSeq.pyx":897 * return self._qualstr_phred * * def write_to_fastq_file(self, fastq_file): # <<<<<<<<<<<<<< @@ -21490,7 +21112,6 @@ __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.write_to_fastq_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -21499,7 +21120,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":901 +/* "HTSeq/_HTSeq.pyx":906 * fastq_file.write(self.qualstr + "\n") * * def get_fastq_str(self, bint convert_to_phred=False): # <<<<<<<<<<<<<< @@ -21535,7 +21156,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_fastq_str") < 0)) __PYX_ERR(0, 901, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_fastq_str") < 0)) __PYX_ERR(0, 906, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -21546,14 +21167,14 @@ } } if (values[0]) { - __pyx_v_convert_to_phred = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_convert_to_phred == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L3_error) + __pyx_v_convert_to_phred = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_convert_to_phred == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L3_error) } else { __pyx_v_convert_to_phred = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_fastq_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 901, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_fastq_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 906, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.get_fastq_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21578,16 +21199,16 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_fastq_str", 0); - /* "HTSeq/_HTSeq.pyx":902 + /* "HTSeq/_HTSeq.pyx":907 * * def get_fastq_str(self, bint convert_to_phred=False): * sio = cStringIO.StringIO() # <<<<<<<<<<<<<< * self.write_to_fastq_file(sio, convert_to_phred) * return sio.getvalue() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cStringIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cStringIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -21600,27 +21221,24 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 902, __pyx_L1_error) - } + __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, 907, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sio = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":903 + /* "HTSeq/_HTSeq.pyx":908 * def get_fastq_str(self, bint convert_to_phred=False): * sio = cStringIO.StringIO() * self.write_to_fastq_file(sio, convert_to_phred) # <<<<<<<<<<<<<< * return sio.getvalue() * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_fastq_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_fastq_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_convert_to_phred); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_convert_to_phred); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -21637,7 +21255,7 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sio, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -21646,14 +21264,14 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sio, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 908, __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; @@ -21664,22 +21282,22 @@ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 908, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":904 + /* "HTSeq/_HTSeq.pyx":909 * sio = cStringIO.StringIO() * self.write_to_fastq_file(sio, convert_to_phred) * return sio.getvalue() # <<<<<<<<<<<<<< * - * cpdef SequenceWithQualities get_reverse_complement(self): + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sio, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sio, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -21691,19 +21309,16 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __pyx_L1_error) - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 909, __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; - /* "HTSeq/_HTSeq.pyx":901 + /* "HTSeq/_HTSeq.pyx":906 * fastq_file.write(self.qualstr + "\n") * * def get_fastq_str(self, bint convert_to_phred=False): # <<<<<<<<<<<<<< @@ -21727,16 +21342,17 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":906 +/* "HTSeq/_HTSeq.pyx":911 * return sio.getvalue() * - * cpdef SequenceWithQualities get_reverse_complement(self): # <<<<<<<<<<<<<< + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< * cdef SequenceWithQualities res - * res = SequenceWithQualities( + * if rename: */ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch) { +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args) { + int __pyx_v_rename = ((int)1); struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_res = 0; struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -21744,141 +21360,244 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_t_7; __Pyx_RefNannySetupContext("get_reverse_complement", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_rename = __pyx_optional_args->rename; + } + } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_rename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } } - } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 911, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 906, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":909 + /* "HTSeq/_HTSeq.pyx":913 + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): * cdef SequenceWithQualities res - * res = SequenceWithQualities( - * reverse_complement(self.seq), # <<<<<<<<<<<<<< - * "revcomp_of_" + self.name, - * self._qualstr[::-1], + * if rename: # <<<<<<<<<<<<<< + * res = SequenceWithQualities( + * reverse_complement(self.seq), */ - __pyx_t_1 = __pyx_v_self->__pyx_base.seq; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 909, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = (__pyx_v_rename != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":910 - * res = SequenceWithQualities( - * reverse_complement(self.seq), - * "revcomp_of_" + self.name, # <<<<<<<<<<<<<< - * self._qualstr[::-1], - * self._qualscale) + /* "HTSeq/_HTSeq.pyx":915 + * if rename: + * res = SequenceWithQualities( + * reverse_complement(self.seq), # <<<<<<<<<<<<<< + * "revcomp_of_" + self.name, + * self._qualstr[::-1], */ - __pyx_t_1 = PyNumber_Add(__pyx_n_s_revcomp_of, __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 910, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_1 = __pyx_v_self->__pyx_base.seq; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":911 - * reverse_complement(self.seq), - * "revcomp_of_" + self.name, - * self._qualstr[::-1], # <<<<<<<<<<<<<< - * self._qualscale) - * if self._qualarr is not None: + /* "HTSeq/_HTSeq.pyx":916 + * res = SequenceWithQualities( + * reverse_complement(self.seq), + * "revcomp_of_" + self.name, # <<<<<<<<<<<<<< + * self._qualstr[::-1], + * self._qualscale) */ - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualstr, __pyx_slice__16); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 911, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = PyNumber_Add(__pyx_n_s_revcomp_of, __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":908 - * cpdef SequenceWithQualities get_reverse_complement(self): + /* "HTSeq/_HTSeq.pyx":917 + * reverse_complement(self.seq), + * "revcomp_of_" + self.name, + * self._qualstr[::-1], # <<<<<<<<<<<<<< + * self._qualscale) + * else: + */ + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualstr, __pyx_slice__10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "HTSeq/_HTSeq.pyx":914 * cdef SequenceWithQualities res - * res = SequenceWithQualities( # <<<<<<<<<<<<<< - * reverse_complement(self.seq), - * "revcomp_of_" + self.name, + * if rename: + * res = SequenceWithQualities( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * "revcomp_of_" + self.name, */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 908, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); - __Pyx_INCREF(__pyx_v_self->_qualscale); - __Pyx_GIVEREF(__pyx_v_self->_qualscale); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->_qualscale); - __pyx_t_2 = 0; - __pyx_t_1 = 0; - __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 908, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_res = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); + __Pyx_INCREF(__pyx_v_self->_qualscale); + __Pyx_GIVEREF(__pyx_v_self->_qualscale); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->_qualscale); + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 914, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_res = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_4); + __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":913 - * self._qualstr[::-1], - * self._qualscale) + /* "HTSeq/_HTSeq.pyx":913 + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): + * cdef SequenceWithQualities res + * if rename: # <<<<<<<<<<<<<< + * res = SequenceWithQualities( + * reverse_complement(self.seq), + */ + goto __pyx_L3; + } + + /* "HTSeq/_HTSeq.pyx":920 + * self._qualscale) + * else: + * res = SequenceWithQualities( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * self.name, + */ + /*else*/ { + + /* "HTSeq/_HTSeq.pyx":921 + * else: + * res = SequenceWithQualities( + * reverse_complement(self.seq), # <<<<<<<<<<<<<< + * self.name, + * self._qualstr[::-1], + */ + __pyx_t_4 = __pyx_v_self->__pyx_base.seq; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "HTSeq/_HTSeq.pyx":923 + * reverse_complement(self.seq), + * self.name, + * self._qualstr[::-1], # <<<<<<<<<<<<<< + * self._qualscale) + * if self._qualarr is not None: + */ + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualstr, __pyx_slice__10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 923, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "HTSeq/_HTSeq.pyx":920 + * self._qualscale) + * else: + * res = SequenceWithQualities( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * self.name, + */ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.name); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); + __Pyx_INCREF(__pyx_v_self->_qualscale); + __Pyx_GIVEREF(__pyx_v_self->_qualscale); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->_qualscale); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 920, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_res = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "HTSeq/_HTSeq.pyx":925 + * self._qualstr[::-1], + * self._qualscale) * if self._qualarr is not None: # <<<<<<<<<<<<<< * res._qualarr = self._qualarr[::-1] * return res */ - __pyx_t_5 = (__pyx_v_self->_qualarr != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_6 = (__pyx_v_self->_qualarr != Py_None); + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { - /* "HTSeq/_HTSeq.pyx":914 - * self._qualscale) + /* "HTSeq/_HTSeq.pyx":926 + * self._qualscale) * if self._qualarr is not None: * res._qualarr = self._qualarr[::-1] # <<<<<<<<<<<<<< * return res * */ - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualarr, __pyx_slice__17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 914, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualarr, __pyx_slice__10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 926, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_res->_qualarr); __Pyx_DECREF(__pyx_v_res->_qualarr); - __pyx_v_res->_qualarr = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_res->_qualarr = __pyx_t_4; + __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":913 - * self._qualstr[::-1], - * self._qualscale) + /* "HTSeq/_HTSeq.pyx":925 + * self._qualstr[::-1], + * self._qualscale) * if self._qualarr is not None: # <<<<<<<<<<<<<< * res._qualarr = self._qualarr[::-1] * return res */ } - /* "HTSeq/_HTSeq.pyx":915 + /* "HTSeq/_HTSeq.pyx":927 * if self._qualarr is not None: * res._qualarr = self._qualarr[::-1] * return res # <<<<<<<<<<<<<< @@ -21890,12 +21609,12 @@ __pyx_r = __pyx_v_res; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":906 + /* "HTSeq/_HTSeq.pyx":911 * return sio.getvalue() * - * cpdef SequenceWithQualities get_reverse_complement(self): # <<<<<<<<<<<<<< + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< * cdef SequenceWithQualities res - * res = SequenceWithQualities( + * if rename: */ /* function exit code */ @@ -21904,6 +21623,7 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.get_reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -21914,25 +21634,74 @@ } /* Python wrapper */ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_rename; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_reverse_complement (wrapper)", 0); - __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self)); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rename,0}; + PyObject* values[1] = {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 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 (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rename); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reverse_complement") < 0)) __PYX_ERR(0, 911, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_rename = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_rename == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 911, __pyx_L3_error) + } else { + __pyx_v_rename = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_reverse_complement", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 911, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.get_reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), __pyx_v_rename); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self) { +static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_v_rename) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement __pyx_t_2; __Pyx_RefNannySetupContext("get_reverse_complement", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.rename = __pyx_v_rename; + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->get_reverse_complement(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -21949,11 +21718,11 @@ return __pyx_r; } -struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch) { - return __pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(__pyx_v_self, __pyx_skip_dispatch); +struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args) { + return __pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(__pyx_v_self, __pyx_skip_dispatch, __pyx_optional_args); } -/* "HTSeq/_HTSeq.pyx":917 +/* "HTSeq/_HTSeq.pyx":929 * return res * * cpdef object add_qual_to_count_array(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -21979,16 +21748,15 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; - int __pyx_t_7; + npy_intp __pyx_t_7; npy_intp __pyx_t_8; npy_intp __pyx_t_9; - npy_intp __pyx_t_10; - Py_ssize_t __pyx_t_11; - int __pyx_t_12; + Py_ssize_t __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; - Py_ssize_t __pyx_t_14; __Pyx_RefNannySetupContext("add_qual_to_count_array", 0); __pyx_pybuffer_count_array.pybuffer.buf = NULL; __pyx_pybuffer_count_array.refcount = 0; @@ -22001,64 +21769,52 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_qual_to_count_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_13add_qual_to_count_array)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_qual_to_count_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_13add_qual_to_count_array)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_count_array_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_count_array_)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_count_array_)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_count_array_)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_count_array_)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 917, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_count_array_)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_count_array_)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_count_array_)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":920 + /* "HTSeq/_HTSeq.pyx":932 * numpy.ndarray count_array_): * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ # <<<<<<<<<<<<<< @@ -22069,36 +21825,36 @@ __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_count_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_count_array_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_count_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 920, __pyx_L1_error) + __PYX_ERR(0, 932, __pyx_L1_error) } else {__pyx_pybuffernd_count_array.diminfo[0].strides = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_count_array.diminfo[0].shape = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_count_array.diminfo[1].strides = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_count_array.diminfo[1].shape = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.shape[1]; } } __Pyx_INCREF(((PyObject *)__pyx_v_count_array_)); __pyx_v_count_array = ((PyArrayObject *)__pyx_v_count_array_); - /* "HTSeq/_HTSeq.pyx":921 + /* "HTSeq/_HTSeq.pyx":933 * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ * if self._qualarr is None: # <<<<<<<<<<<<<< * self._fill_qual_arr() * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr */ - __pyx_t_6 = (__pyx_v_self->_qualarr == Py_None); - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_5 = (__pyx_v_self->_qualarr == Py_None); + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":922 + /* "HTSeq/_HTSeq.pyx":934 * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 922, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 934, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":921 + /* "HTSeq/_HTSeq.pyx":933 * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -22107,28 +21863,28 @@ */ } - /* "HTSeq/_HTSeq.pyx":923 + /* "HTSeq/_HTSeq.pyx":935 * if self._qualarr is None: * self._fill_qual_arr() * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr # <<<<<<<<<<<<<< * * cdef numpy.npy_intp seq_length = numpy.PyArray_DIMS(qual_array)[0] */ - if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 923, __pyx_L1_error) + if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 935, __pyx_L1_error) __pyx_t_1 = __pyx_v_self->_qualarr; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_qual_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_qual_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 923, __pyx_L1_error) + __PYX_ERR(0, 935, __pyx_L1_error) } else {__pyx_pybuffernd_qual_array.diminfo[0].strides = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qual_array.diminfo[0].shape = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.shape[0]; } } __pyx_v_qual_array = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":925 + /* "HTSeq/_HTSeq.pyx":937 * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr * * cdef numpy.npy_intp seq_length = numpy.PyArray_DIMS(qual_array)[0] # <<<<<<<<<<<<<< @@ -22137,7 +21893,7 @@ */ __pyx_v_seq_length = (PyArray_DIMS(((PyArrayObject *)__pyx_v_qual_array))[0]); - /* "HTSeq/_HTSeq.pyx":926 + /* "HTSeq/_HTSeq.pyx":938 * * cdef numpy.npy_intp seq_length = numpy.PyArray_DIMS(qual_array)[0] * cdef numpy.npy_intp qual_size = numpy.PyArray_DIMS(count_array)[1] # <<<<<<<<<<<<<< @@ -22146,17 +21902,17 @@ */ __pyx_v_qual_size = (PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[1]); - /* "HTSeq/_HTSeq.pyx":928 + /* "HTSeq/_HTSeq.pyx":940 * cdef numpy.npy_intp qual_size = numpy.PyArray_DIMS(count_array)[1] * * if seq_length > numpy.PyArray_DIMS(count_array)[0]: # <<<<<<<<<<<<<< * raise ValueError, "'count_array' too small for sequence." * */ - __pyx_t_7 = ((__pyx_v_seq_length > (PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[0])) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = ((__pyx_v_seq_length > (PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[0])) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":929 + /* "HTSeq/_HTSeq.pyx":941 * * if seq_length > numpy.PyArray_DIMS(count_array)[0]: * raise ValueError, "'count_array' too small for sequence." # <<<<<<<<<<<<<< @@ -22164,9 +21920,9 @@ * cdef numpy.npy_intp i */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_count_array_too_small_for_seque, 0, 0); - __PYX_ERR(0, 929, __pyx_L1_error) + __PYX_ERR(0, 941, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":928 + /* "HTSeq/_HTSeq.pyx":940 * cdef numpy.npy_intp qual_size = numpy.PyArray_DIMS(count_array)[1] * * if seq_length > numpy.PyArray_DIMS(count_array)[0]: # <<<<<<<<<<<<<< @@ -22175,48 +21931,48 @@ */ } - /* "HTSeq/_HTSeq.pyx":933 + /* "HTSeq/_HTSeq.pyx":945 * cdef numpy.npy_intp i * cdef numpy.npy_int q * for i in xrange(seq_length): # <<<<<<<<<<<<<< * q = qual_array[i] * if(q >= qual_size): */ - __pyx_t_8 = __pyx_v_seq_length; - __pyx_t_9 = __pyx_t_8; - for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { - __pyx_v_i = __pyx_t_10; + __pyx_t_7 = __pyx_v_seq_length; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; - /* "HTSeq/_HTSeq.pyx":934 + /* "HTSeq/_HTSeq.pyx":946 * cdef numpy.npy_int q * for i in xrange(seq_length): * q = qual_array[i] # <<<<<<<<<<<<<< * if(q >= qual_size): * raise ValueError, "Too large quality value encountered." */ - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = -1; - if (__pyx_t_11 < 0) { - __pyx_t_11 += __pyx_pybuffernd_qual_array.diminfo[0].shape; - if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0; - } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_12 = 0; - if (unlikely(__pyx_t_12 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_12); - __PYX_ERR(0, 934, __pyx_L1_error) + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = -1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_pybuffernd_qual_array.diminfo[0].shape; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_11 = 0; + if (unlikely(__pyx_t_11 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_11); + __PYX_ERR(0, 946, __pyx_L1_error) } - __pyx_v_q = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_qual_array.diminfo[0].strides)); + __pyx_v_q = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_qual_array.diminfo[0].strides)); - /* "HTSeq/_HTSeq.pyx":935 + /* "HTSeq/_HTSeq.pyx":947 * for i in xrange(seq_length): * q = qual_array[i] * if(q >= qual_size): # <<<<<<<<<<<<<< * raise ValueError, "Too large quality value encountered." * count_array[i, q] += 1 */ - __pyx_t_7 = ((__pyx_v_q >= __pyx_v_qual_size) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = ((__pyx_v_q >= __pyx_v_qual_size) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":936 + /* "HTSeq/_HTSeq.pyx":948 * q = qual_array[i] * if(q >= qual_size): * raise ValueError, "Too large quality value encountered." # <<<<<<<<<<<<<< @@ -22224,9 +21980,9 @@ * */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Too_large_quality_value_encounte, 0, 0); - __PYX_ERR(0, 936, __pyx_L1_error) + __PYX_ERR(0, 948, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":935 + /* "HTSeq/_HTSeq.pyx":947 * for i in xrange(seq_length): * q = qual_array[i] * if(q >= qual_size): # <<<<<<<<<<<<<< @@ -22235,32 +21991,32 @@ */ } - /* "HTSeq/_HTSeq.pyx":937 + /* "HTSeq/_HTSeq.pyx":949 * if(q >= qual_size): * raise ValueError, "Too large quality value encountered." * count_array[i, q] += 1 # <<<<<<<<<<<<<< * * return None */ - __pyx_t_13 = __pyx_v_i; - __pyx_t_14 = __pyx_v_q; - __pyx_t_12 = -1; + __pyx_t_12 = __pyx_v_i; + __pyx_t_13 = __pyx_v_q; + __pyx_t_11 = -1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_11 = 0; if (__pyx_t_13 < 0) { - __pyx_t_13 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_13 < 0)) __pyx_t_12 = 0; - } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_12 = 0; - if (__pyx_t_14 < 0) { - __pyx_t_14 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_14 < 0)) __pyx_t_12 = 1; - } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_12 = 1; - if (unlikely(__pyx_t_12 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_12); - __PYX_ERR(0, 937, __pyx_L1_error) + __pyx_t_13 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 1; + } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_11 = 1; + if (unlikely(__pyx_t_11 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_11); + __PYX_ERR(0, 949, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; } - /* "HTSeq/_HTSeq.pyx":939 + /* "HTSeq/_HTSeq.pyx":951 * count_array[i, q] += 1 * * return None # <<<<<<<<<<<<<< @@ -22271,7 +22027,7 @@ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":917 + /* "HTSeq/_HTSeq.pyx":929 * return res * * cpdef object add_qual_to_count_array(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -22285,7 +22041,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -22313,7 +22068,7 @@ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_qual_to_count_array (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_count_array_), __pyx_ptype_5numpy_ndarray, 1, "count_array_", 0))) __PYX_ERR(0, 918, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_count_array_), __pyx_ptype_5numpy_ndarray, 1, "count_array_", 0))) __PYX_ERR(0, 930, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_12add_qual_to_count_array(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), ((PyArrayObject *)__pyx_v_count_array_)); /* function exit code */ @@ -22331,7 +22086,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("add_qual_to_count_array", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_add_qual_to_count_array(__pyx_v_self, __pyx_v_count_array_, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_add_qual_to_count_array(__pyx_v_self, __pyx_v_count_array_, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22348,7 +22103,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":941 +/* "HTSeq/_HTSeq.pyx":953 * return None * * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -22405,71 +22160,87 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_left_end_with_quals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_15trim_left_end_with_quals)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_mm_qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 941, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 941, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 941, __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 + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 941, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_left_end_with_quals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_15trim_left_end_with_quals)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_mm_qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 953, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } } - __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); - __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, 941, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 953, __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 + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 953, __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, 953, __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; + } + __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); + __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, 953, __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_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 953, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 941, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":943 + /* "HTSeq/_HTSeq.pyx":955 * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, * Sequence pattern, int max_mm_qual=5): * cdef int seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -22480,13 +22251,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, 943, __pyx_L1_error) + __PYX_ERR(0, 955, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 943, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 955, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seqlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":944 + /* "HTSeq/_HTSeq.pyx":956 * Sequence pattern, int max_mm_qual=5): * cdef int seqlen = len(self.seq) * cdef int patlen = len(pattern.seq) # <<<<<<<<<<<<<< @@ -22497,13 +22268,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, 944, __pyx_L1_error) + __PYX_ERR(0, 956, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 944, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 956, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_patlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":946 + /* "HTSeq/_HTSeq.pyx":958 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -22513,7 +22284,7 @@ __pyx_t_9 = ((__pyx_v_seqlen < __pyx_v_patlen) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":947 + /* "HTSeq/_HTSeq.pyx":959 * cdef int minlen * if seqlen < patlen: * minlen = seqlen # <<<<<<<<<<<<<< @@ -22522,7 +22293,7 @@ */ __pyx_v_minlen = __pyx_v_seqlen; - /* "HTSeq/_HTSeq.pyx":946 + /* "HTSeq/_HTSeq.pyx":958 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -22532,7 +22303,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":949 + /* "HTSeq/_HTSeq.pyx":961 * minlen = seqlen * else: * minlen = patlen # <<<<<<<<<<<<<< @@ -22544,7 +22315,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":950 + /* "HTSeq/_HTSeq.pyx":962 * else: * minlen = patlen * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -22553,12 +22324,12 @@ */ if (unlikely(__pyx_v_self->__pyx_base.seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 950, __pyx_L1_error) + __PYX_ERR(0, 962, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->__pyx_base.seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 950, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->__pyx_base.seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 962, __pyx_L1_error) __pyx_v_seq_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":951 + /* "HTSeq/_HTSeq.pyx":963 * minlen = patlen * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq # <<<<<<<<<<<<<< @@ -22567,12 +22338,12 @@ */ if (unlikely(__pyx_v_pattern->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 951, __pyx_L1_error) + __PYX_ERR(0, 963, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 951, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 963, __pyx_L1_error) __pyx_v_pat_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":952 + /* "HTSeq/_HTSeq.pyx":964 * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq * cdef int match = 0 # <<<<<<<<<<<<<< @@ -22581,7 +22352,7 @@ */ __pyx_v_match = 0; - /* "HTSeq/_HTSeq.pyx":955 + /* "HTSeq/_HTSeq.pyx":967 * cdef int i, j * cdef int sum_mm_qual * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -22592,18 +22363,18 @@ __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":956 + /* "HTSeq/_HTSeq.pyx":968 * cdef int sum_mm_qual * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr * for i in xrange(1, minlen + 1): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 968, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":955 + /* "HTSeq/_HTSeq.pyx":967 * cdef int i, j * cdef int sum_mm_qual * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -22612,28 +22383,28 @@ */ } - /* "HTSeq/_HTSeq.pyx":957 + /* "HTSeq/_HTSeq.pyx":969 * if self._qualarr is None: * self._fill_qual_arr() * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr # <<<<<<<<<<<<<< * for i in xrange(1, minlen + 1): * num_mismatches = 0 */ - if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 957, __pyx_L1_error) + if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 969, __pyx_L1_error) __pyx_t_1 = __pyx_v_self->_qualarr; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_qual_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_qual_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 957, __pyx_L1_error) + __PYX_ERR(0, 969, __pyx_L1_error) } else {__pyx_pybuffernd_qual_array.diminfo[0].strides = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qual_array.diminfo[0].shape = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.shape[0]; } } __pyx_v_qual_array = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":958 + /* "HTSeq/_HTSeq.pyx":970 * self._fill_qual_arr() * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr * for i in xrange(1, minlen + 1): # <<<<<<<<<<<<<< @@ -22645,7 +22416,7 @@ for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_13; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "HTSeq/_HTSeq.pyx":959 + /* "HTSeq/_HTSeq.pyx":971 * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr * for i in xrange(1, minlen + 1): * num_mismatches = 0 # <<<<<<<<<<<<<< @@ -22654,7 +22425,7 @@ */ __pyx_v_num_mismatches = 0; - /* "HTSeq/_HTSeq.pyx":960 + /* "HTSeq/_HTSeq.pyx":972 * for i in xrange(1, minlen + 1): * num_mismatches = 0 * for j in xrange(i): # <<<<<<<<<<<<<< @@ -22666,7 +22437,7 @@ for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "HTSeq/_HTSeq.pyx":961 + /* "HTSeq/_HTSeq.pyx":973 * num_mismatches = 0 * for j in xrange(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: # <<<<<<<<<<<<<< @@ -22676,7 +22447,7 @@ __pyx_t_11 = (((__pyx_v_seq_cstr[__pyx_v_j]) != (__pyx_v_pat_cstr[((__pyx_v_patlen - __pyx_v_i) + __pyx_v_j)])) != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":962 + /* "HTSeq/_HTSeq.pyx":974 * for j in xrange(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: * sum_mm_qual += qual_array[j] # <<<<<<<<<<<<<< @@ -22691,11 +22462,11 @@ } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_18 = 0; if (unlikely(__pyx_t_18 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_18); - __PYX_ERR(0, 962, __pyx_L1_error) + __PYX_ERR(0, 974, __pyx_L1_error) } __pyx_v_sum_mm_qual = (__pyx_v_sum_mm_qual + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_qual_array.diminfo[0].strides))); - /* "HTSeq/_HTSeq.pyx":963 + /* "HTSeq/_HTSeq.pyx":975 * if seq_cstr[j] != pat_cstr[patlen - i + j]: * sum_mm_qual += qual_array[j] * if sum_mm_qual > max_mm_qual: # <<<<<<<<<<<<<< @@ -22705,7 +22476,7 @@ __pyx_t_11 = ((__pyx_v_sum_mm_qual > __pyx_v_max_mm_qual) != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":964 + /* "HTSeq/_HTSeq.pyx":976 * sum_mm_qual += qual_array[j] * if sum_mm_qual > max_mm_qual: * break # <<<<<<<<<<<<<< @@ -22714,7 +22485,7 @@ */ goto __pyx_L8_break; - /* "HTSeq/_HTSeq.pyx":963 + /* "HTSeq/_HTSeq.pyx":975 * if seq_cstr[j] != pat_cstr[patlen - i + j]: * sum_mm_qual += qual_array[j] * if sum_mm_qual > max_mm_qual: # <<<<<<<<<<<<<< @@ -22723,7 +22494,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":961 + /* "HTSeq/_HTSeq.pyx":973 * num_mismatches = 0 * for j in xrange(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: # <<<<<<<<<<<<<< @@ -22734,7 +22505,7 @@ } /*else*/ { - /* "HTSeq/_HTSeq.pyx":966 + /* "HTSeq/_HTSeq.pyx":978 * break * else: * match = i # <<<<<<<<<<<<<< @@ -22746,7 +22517,7 @@ __pyx_L8_break:; } - /* "HTSeq/_HTSeq.pyx":967 + /* "HTSeq/_HTSeq.pyx":979 * else: * match = i * return self[match: seqlen] # <<<<<<<<<<<<<< @@ -22754,14 +22525,14 @@ * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), __pyx_v_match, __pyx_v_seqlen, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), __pyx_v_match, __pyx_v_seqlen, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 967, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 979, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":941 + /* "HTSeq/_HTSeq.pyx":953 * return None * * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -22830,7 +22601,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_left_end_with_quals") < 0)) __PYX_ERR(0, 941, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_left_end_with_quals") < 0)) __PYX_ERR(0, 953, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -22843,20 +22614,20 @@ } __pyx_v_pattern = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)values[0]); if (values[1]) { - __pyx_v_max_mm_qual = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_max_mm_qual == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 942, __pyx_L3_error) + __pyx_v_max_mm_qual = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_max_mm_qual == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 954, __pyx_L3_error) } else { __pyx_v_max_mm_qual = ((int)5); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trim_left_end_with_quals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 941, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trim_left_end_with_quals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 953, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.trim_left_end_with_quals", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 942, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 954, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_14trim_left_end_with_quals(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), __pyx_v_pattern, __pyx_v_max_mm_qual); /* function exit code */ @@ -22877,7 +22648,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.max_mm_qual = __pyx_v_max_mm_qual; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->trim_left_end_with_quals(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 941, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->trim_left_end_with_quals(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 953, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22894,7 +22665,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":969 +/* "HTSeq/_HTSeq.pyx":981 * return self[match: seqlen] * * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -22950,71 +22721,87 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_right_end_with_quals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_17trim_right_end_with_quals)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_mm_qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 969, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 969, __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 + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 969, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_right_end_with_quals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_17trim_right_end_with_quals)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_mm_qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 981, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } } - __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); - __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, 969, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 981, __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 + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 981, __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, 981, __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; + } + __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); + __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, 981, __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_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 981, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 969, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":971 + /* "HTSeq/_HTSeq.pyx":983 * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, * Sequence pattern, int max_mm_qual=5): * cdef int seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -23025,13 +22812,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, 971, __pyx_L1_error) + __PYX_ERR(0, 983, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 971, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 983, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seqlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":972 + /* "HTSeq/_HTSeq.pyx":984 * Sequence pattern, int max_mm_qual=5): * cdef int seqlen = len(self.seq) * cdef int patlen = len(pattern.seq) # <<<<<<<<<<<<<< @@ -23042,13 +22829,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, 972, __pyx_L1_error) + __PYX_ERR(0, 984, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 972, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 984, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_patlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":974 + /* "HTSeq/_HTSeq.pyx":986 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -23058,7 +22845,7 @@ __pyx_t_9 = ((__pyx_v_seqlen < __pyx_v_patlen) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":975 + /* "HTSeq/_HTSeq.pyx":987 * cdef int minlen * if seqlen < patlen: * minlen = seqlen # <<<<<<<<<<<<<< @@ -23067,7 +22854,7 @@ */ __pyx_v_minlen = __pyx_v_seqlen; - /* "HTSeq/_HTSeq.pyx":974 + /* "HTSeq/_HTSeq.pyx":986 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -23077,7 +22864,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":977 + /* "HTSeq/_HTSeq.pyx":989 * minlen = seqlen * else: * minlen = patlen # <<<<<<<<<<<<<< @@ -23089,7 +22876,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":978 + /* "HTSeq/_HTSeq.pyx":990 * else: * minlen = patlen * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -23098,12 +22885,12 @@ */ if (unlikely(__pyx_v_self->__pyx_base.seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 978, __pyx_L1_error) + __PYX_ERR(0, 990, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->__pyx_base.seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 978, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->__pyx_base.seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 990, __pyx_L1_error) __pyx_v_seq_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":979 + /* "HTSeq/_HTSeq.pyx":991 * minlen = patlen * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq # <<<<<<<<<<<<<< @@ -23112,12 +22899,12 @@ */ if (unlikely(__pyx_v_pattern->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 979, __pyx_L1_error) + __PYX_ERR(0, 991, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 991, __pyx_L1_error) __pyx_v_pat_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":980 + /* "HTSeq/_HTSeq.pyx":992 * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq * cdef int match = 0 # <<<<<<<<<<<<<< @@ -23126,7 +22913,7 @@ */ __pyx_v_match = 0; - /* "HTSeq/_HTSeq.pyx":983 + /* "HTSeq/_HTSeq.pyx":995 * cdef int i, j * cdef int sum_mm_qual * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -23137,18 +22924,18 @@ __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":984 + /* "HTSeq/_HTSeq.pyx":996 * cdef int sum_mm_qual * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr * for i in xrange(1, minlen + 1): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 984, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 996, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":983 + /* "HTSeq/_HTSeq.pyx":995 * cdef int i, j * cdef int sum_mm_qual * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -23157,28 +22944,28 @@ */ } - /* "HTSeq/_HTSeq.pyx":985 + /* "HTSeq/_HTSeq.pyx":997 * if self._qualarr is None: * self._fill_qual_arr() * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr # <<<<<<<<<<<<<< * for i in xrange(1, minlen + 1): * sum_mm_qual = 0 */ - if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 985, __pyx_L1_error) + if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 997, __pyx_L1_error) __pyx_t_1 = __pyx_v_self->_qualarr; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_qual_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_qual_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 985, __pyx_L1_error) + __PYX_ERR(0, 997, __pyx_L1_error) } else {__pyx_pybuffernd_qual_array.diminfo[0].strides = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qual_array.diminfo[0].shape = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.shape[0]; } } __pyx_v_qual_array = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":986 + /* "HTSeq/_HTSeq.pyx":998 * self._fill_qual_arr() * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr * for i in xrange(1, minlen + 1): # <<<<<<<<<<<<<< @@ -23190,7 +22977,7 @@ for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_13; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "HTSeq/_HTSeq.pyx":987 + /* "HTSeq/_HTSeq.pyx":999 * cdef numpy.ndarray[numpy.int_t, ndim = 1] qual_array = self._qualarr * for i in xrange(1, minlen + 1): * sum_mm_qual = 0 # <<<<<<<<<<<<<< @@ -23199,7 +22986,7 @@ */ __pyx_v_sum_mm_qual = 0; - /* "HTSeq/_HTSeq.pyx":988 + /* "HTSeq/_HTSeq.pyx":1000 * for i in xrange(1, minlen + 1): * sum_mm_qual = 0 * for j in xrange(i): # <<<<<<<<<<<<<< @@ -23211,7 +22998,7 @@ for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "HTSeq/_HTSeq.pyx":989 + /* "HTSeq/_HTSeq.pyx":1001 * sum_mm_qual = 0 * for j in xrange(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: # <<<<<<<<<<<<<< @@ -23221,7 +23008,7 @@ __pyx_t_11 = (((__pyx_v_seq_cstr[((__pyx_v_seqlen - __pyx_v_i) + __pyx_v_j)]) != (__pyx_v_pat_cstr[__pyx_v_j])) != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":990 + /* "HTSeq/_HTSeq.pyx":1002 * for j in xrange(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * sum_mm_qual += qual_array[seqlen - i + j] # <<<<<<<<<<<<<< @@ -23236,11 +23023,11 @@ } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_18 = 0; if (unlikely(__pyx_t_18 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_18); - __PYX_ERR(0, 990, __pyx_L1_error) + __PYX_ERR(0, 1002, __pyx_L1_error) } __pyx_v_sum_mm_qual = (__pyx_v_sum_mm_qual + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_qual_array.diminfo[0].strides))); - /* "HTSeq/_HTSeq.pyx":991 + /* "HTSeq/_HTSeq.pyx":1003 * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * sum_mm_qual += qual_array[seqlen - i + j] * if sum_mm_qual > max_mm_qual: # <<<<<<<<<<<<<< @@ -23250,7 +23037,7 @@ __pyx_t_11 = ((__pyx_v_sum_mm_qual > __pyx_v_max_mm_qual) != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":992 + /* "HTSeq/_HTSeq.pyx":1004 * sum_mm_qual += qual_array[seqlen - i + j] * if sum_mm_qual > max_mm_qual: * break # <<<<<<<<<<<<<< @@ -23259,7 +23046,7 @@ */ goto __pyx_L8_break; - /* "HTSeq/_HTSeq.pyx":991 + /* "HTSeq/_HTSeq.pyx":1003 * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * sum_mm_qual += qual_array[seqlen - i + j] * if sum_mm_qual > max_mm_qual: # <<<<<<<<<<<<<< @@ -23268,7 +23055,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":989 + /* "HTSeq/_HTSeq.pyx":1001 * sum_mm_qual = 0 * for j in xrange(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: # <<<<<<<<<<<<<< @@ -23279,7 +23066,7 @@ } /*else*/ { - /* "HTSeq/_HTSeq.pyx":994 + /* "HTSeq/_HTSeq.pyx":1006 * break * else: * match = i # <<<<<<<<<<<<<< @@ -23291,7 +23078,7 @@ __pyx_L8_break:; } - /* "HTSeq/_HTSeq.pyx":995 + /* "HTSeq/_HTSeq.pyx":1007 * else: * match = i * return self[0: seqlen - match] # <<<<<<<<<<<<<< @@ -23299,14 +23086,14 @@ * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), 0, (__pyx_v_seqlen - __pyx_v_match), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 995, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), 0, (__pyx_v_seqlen - __pyx_v_match), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 995, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 1007, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":969 + /* "HTSeq/_HTSeq.pyx":981 * return self[match: seqlen] * * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -23375,7 +23162,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_right_end_with_quals") < 0)) __PYX_ERR(0, 969, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_right_end_with_quals") < 0)) __PYX_ERR(0, 981, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -23388,20 +23175,20 @@ } __pyx_v_pattern = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)values[0]); if (values[1]) { - __pyx_v_max_mm_qual = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_max_mm_qual == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 970, __pyx_L3_error) + __pyx_v_max_mm_qual = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_max_mm_qual == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 982, __pyx_L3_error) } else { __pyx_v_max_mm_qual = ((int)5); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trim_right_end_with_quals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 969, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trim_right_end_with_quals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 981, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.trim_right_end_with_quals", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 970, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 982, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_16trim_right_end_with_quals(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), __pyx_v_pattern, __pyx_v_max_mm_qual); /* function exit code */ @@ -23422,7 +23209,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.max_mm_qual = __pyx_v_max_mm_qual; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->trim_right_end_with_quals(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 969, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->trim_right_end_with_quals(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23441,7 +23228,7 @@ /* "HTSeq/_HTSeq.pxd":30 * - * cdef class SequenceWithQualities( Sequence ): + * cdef class SequenceWithQualities(Sequence): * cdef readonly bytes _qualstr # <<<<<<<<<<<<<< * cdef readonly bytes _qualstr_phred * cdef readonly str _qualscale @@ -23477,7 +23264,7 @@ } /* "HTSeq/_HTSeq.pxd":31 - * cdef class SequenceWithQualities( Sequence ): + * cdef class SequenceWithQualities(Sequence): * cdef readonly bytes _qualstr * cdef readonly bytes _qualstr_phred # <<<<<<<<<<<<<< * cdef readonly str _qualscale @@ -23518,7 +23305,7 @@ * cdef readonly bytes _qualstr_phred * cdef readonly str _qualscale # <<<<<<<<<<<<<< * cdef readonly object _qualarr - * cdef _fill_qual_arr( SequenceWithQualities self ) + * cdef _fill_qual_arr(SequenceWithQualities self) */ /* Python wrapper */ @@ -23554,8 +23341,8 @@ * cdef readonly bytes _qualstr_phred * cdef readonly str _qualscale * cdef readonly object _qualarr # <<<<<<<<<<<<<< - * cdef _fill_qual_arr( SequenceWithQualities self ) - * cpdef object add_qual_to_count_array( SequenceWithQualities self, numpy.ndarray count_array_ ) + * cdef _fill_qual_arr(SequenceWithQualities self) + * cpdef object add_qual_to_count_array(SequenceWithQualities self, numpy.ndarray count_array_) */ /* Python wrapper */ @@ -23587,7 +23374,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1013 +/* "HTSeq/_HTSeq.pyx":1025 * """ * * def __init__(self, read, iv): # <<<<<<<<<<<<<< @@ -23626,11 +23413,11 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iv)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1013, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1025, __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, 1013, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1025, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -23643,7 +23430,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1013, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1025, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.Alignment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -23662,14 +23449,14 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":1014 + /* "HTSeq/_HTSeq.pyx":1026 * * def __init__(self, read, iv): * self._read = read # <<<<<<<<<<<<<< * self.iv = iv * */ - if (!(likely(((__pyx_v_read) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_read, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 1014, __pyx_L1_error) + if (!(likely(((__pyx_v_read) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_read, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 1026, __pyx_L1_error) __pyx_t_1 = __pyx_v_read; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -23678,14 +23465,14 @@ __pyx_v_self->_read = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1015 + /* "HTSeq/_HTSeq.pyx":1027 * def __init__(self, read, iv): * self._read = read * self.iv = iv # <<<<<<<<<<<<<< * * @property */ - if (!(likely(((__pyx_v_iv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_iv, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 1015, __pyx_L1_error) + if (!(likely(((__pyx_v_iv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_iv, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 1027, __pyx_L1_error) __pyx_t_1 = __pyx_v_iv; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -23694,7 +23481,7 @@ __pyx_v_self->iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1013 + /* "HTSeq/_HTSeq.pyx":1025 * """ * * def __init__(self, read, iv): # <<<<<<<<<<<<<< @@ -23714,7 +23501,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1018 +/* "HTSeq/_HTSeq.pyx":1030 * * @property * def read(self): # <<<<<<<<<<<<<< @@ -23740,7 +23527,7 @@ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1019 + /* "HTSeq/_HTSeq.pyx":1031 * @property * def read(self): * return self._read # <<<<<<<<<<<<<< @@ -23752,7 +23539,7 @@ __pyx_r = ((PyObject *)__pyx_v_self->_read); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1018 + /* "HTSeq/_HTSeq.pyx":1030 * * @property * def read(self): # <<<<<<<<<<<<<< @@ -23767,7 +23554,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1021 +/* "HTSeq/_HTSeq.pyx":1033 * return self._read * * def __repr__(self): # <<<<<<<<<<<<<< @@ -23799,20 +23586,20 @@ PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "HTSeq/_HTSeq.pyx":1023 + /* "HTSeq/_HTSeq.pyx":1035 * def __repr__(self): * cdef str s * if self.paired_end: # <<<<<<<<<<<<<< * s = "Paired-end read" * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paired_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paired_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __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, 1023, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1024 + /* "HTSeq/_HTSeq.pyx":1036 * cdef str s * if self.paired_end: * s = "Paired-end read" # <<<<<<<<<<<<<< @@ -23822,7 +23609,7 @@ __Pyx_INCREF(__pyx_kp_s_Paired_end_read); __pyx_v_s = __pyx_kp_s_Paired_end_read; - /* "HTSeq/_HTSeq.pyx":1023 + /* "HTSeq/_HTSeq.pyx":1035 * def __repr__(self): * cdef str s * if self.paired_end: # <<<<<<<<<<<<<< @@ -23832,7 +23619,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1026 + /* "HTSeq/_HTSeq.pyx":1038 * s = "Paired-end read" * else: * s = "Read" # <<<<<<<<<<<<<< @@ -23845,20 +23632,20 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1027 + /* "HTSeq/_HTSeq.pyx":1039 * else: * s = "Read" * if self.aligned: # <<<<<<<<<<<<<< * return "<%s object: %s '%s' aligned to %s>" % ( * self.__class__.__name__, s, self.read.name, str(self.iv)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __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, 1027, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1028 + /* "HTSeq/_HTSeq.pyx":1040 * s = "Read" * if self.aligned: * return "<%s object: %s '%s' aligned to %s>" % ( # <<<<<<<<<<<<<< @@ -23867,26 +23654,26 @@ */ __Pyx_XDECREF(__pyx_r); - /* "HTSeq/_HTSeq.pyx":1029 + /* "HTSeq/_HTSeq.pyx":1041 * if self.aligned: * return "<%s object: %s '%s' aligned to %s>" % ( * self.__class__.__name__, s, self.read.name, str(self.iv)) # <<<<<<<<<<<<<< * else: * return "<%s object: %s '%s', not aligned>" % ( */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self->iv)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self->iv)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1029, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1041, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); @@ -23901,21 +23688,21 @@ __pyx_t_4 = 0; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1028 + /* "HTSeq/_HTSeq.pyx":1040 * s = "Read" * if self.aligned: * return "<%s object: %s '%s' aligned to %s>" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, s, self.read.name, str(self.iv)) * else: */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_object_s_s_aligned_to_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_object_s_s_aligned_to_s, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1027 + /* "HTSeq/_HTSeq.pyx":1039 * else: * s = "Read" * if self.aligned: # <<<<<<<<<<<<<< @@ -23924,7 +23711,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1031 + /* "HTSeq/_HTSeq.pyx":1043 * self.__class__.__name__, s, self.read.name, str(self.iv)) * else: * return "<%s object: %s '%s', not aligned>" % ( # <<<<<<<<<<<<<< @@ -23934,24 +23721,24 @@ /*else*/ { __Pyx_XDECREF(__pyx_r); - /* "HTSeq/_HTSeq.pyx":1032 + /* "HTSeq/_HTSeq.pyx":1044 * else: * return "<%s object: %s '%s', not aligned>" % ( * self.__class__.__name__, s, self.read.name) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1032, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1044, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); @@ -23963,14 +23750,14 @@ __pyx_t_5 = 0; __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1031 + /* "HTSeq/_HTSeq.pyx":1043 * self.__class__.__name__, s, self.read.name, str(self.iv)) * else: * return "<%s object: %s '%s', not aligned>" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, s, self.read.name) * */ - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_object_s_s_not_aligned, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1031, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_object_s_s_not_aligned, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1043, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; @@ -23978,7 +23765,7 @@ goto __pyx_L0; } - /* "HTSeq/_HTSeq.pyx":1021 + /* "HTSeq/_HTSeq.pyx":1033 * return self._read * * def __repr__(self): # <<<<<<<<<<<<<< @@ -24001,7 +23788,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1035 +/* "HTSeq/_HTSeq.pyx":1047 * * @property * def paired_end(self): # <<<<<<<<<<<<<< @@ -24027,7 +23814,7 @@ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1036 + /* "HTSeq/_HTSeq.pyx":1048 * @property * def paired_end(self): * return False # <<<<<<<<<<<<<< @@ -24039,7 +23826,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1035 + /* "HTSeq/_HTSeq.pyx":1047 * * @property * def paired_end(self): # <<<<<<<<<<<<<< @@ -24054,7 +23841,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1039 +/* "HTSeq/_HTSeq.pyx":1051 * * @property * def aligned(self): # <<<<<<<<<<<<<< @@ -24082,7 +23869,7 @@ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1043 + /* "HTSeq/_HTSeq.pyx":1055 * this record decribes a read for which no alignment was found. * """ * return self.iv is not None # <<<<<<<<<<<<<< @@ -24091,13 +23878,13 @@ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = (((PyObject *)__pyx_v_self->iv) != Py_None); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1043, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1055, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1039 + /* "HTSeq/_HTSeq.pyx":1051 * * @property * def aligned(self): # <<<<<<<<<<<<<< @@ -24118,7 +23905,7 @@ /* "HTSeq/_HTSeq.pxd":43 * - * cdef class Alignment( object ): + * cdef class Alignment(object): * cdef public SequenceWithQualities _read # <<<<<<<<<<<<<< * cdef public GenomicInterval iv * @@ -24222,11 +24009,11 @@ } /* "HTSeq/_HTSeq.pxd":44 - * cdef class Alignment( object ): + * cdef class Alignment(object): * cdef public SequenceWithQualities _read * cdef public GenomicInterval iv # <<<<<<<<<<<<<< * - * cdef class AlignmentWithSequenceReversal( Alignment ): + * cdef class AlignmentWithSequenceReversal(Alignment): */ /* Python wrapper */ @@ -24328,8 +24115,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self.iv) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -24346,9 +24133,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_9Alignment_4__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_Alignment *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -24359,14 +24146,14 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._read, self.iv) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->_read)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_read)); @@ -24377,19 +24164,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._read, self.iv) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self.iv) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -24400,25 +24187,25 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -24427,7 +24214,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self.iv) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -24437,7 +24224,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._read is not None or self.iv is not None # <<<<<<<<<<<<<< @@ -24460,7 +24247,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self.iv is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -24470,7 +24257,7 @@ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._read is not None or self.iv is not None * if use_setstate: * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, None), state # <<<<<<<<<<<<<< @@ -24478,9 +24265,9 @@ * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_Alignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Alignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -24491,7 +24278,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -24506,7 +24293,7 @@ __pyx_t_6 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self.iv is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -24515,7 +24302,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, None), state * else: * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) # <<<<<<<<<<<<<< @@ -24524,9 +24311,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_Alignment); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Alignment); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -24537,7 +24324,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); @@ -24552,8 +24339,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self.iv) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -24571,7 +24358,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -24597,17 +24384,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Alignment__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_Alignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_Alignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -24627,7 +24414,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1056 +/* "HTSeq/_HTSeq.pyx":1068 * """ * * def __init__(self, SequenceWithQualities read_as_aligned, GenomicInterval iv): # <<<<<<<<<<<<<< @@ -24666,11 +24453,11 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iv)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1056, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1068, __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, 1056, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1068, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -24683,14 +24470,14 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1056, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1068, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.AlignmentWithSequenceReversal.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read_as_aligned), __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities, 1, "read_as_aligned", 0))) __PYX_ERR(0, 1056, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iv), __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval, 1, "iv", 0))) __PYX_ERR(0, 1056, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read_as_aligned), __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities, 1, "read_as_aligned", 0))) __PYX_ERR(0, 1068, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iv), __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval, 1, "iv", 0))) __PYX_ERR(0, 1068, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_29AlignmentWithSequenceReversal___init__(((struct __pyx_obj_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal *)__pyx_v_self), __pyx_v_read_as_aligned, __pyx_v_iv); /* function exit code */ @@ -24707,7 +24494,7 @@ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":1057 + /* "HTSeq/_HTSeq.pyx":1069 * * def __init__(self, SequenceWithQualities read_as_aligned, GenomicInterval iv): * self.read_as_aligned = read_as_aligned # <<<<<<<<<<<<<< @@ -24720,7 +24507,7 @@ __Pyx_DECREF(((PyObject *)__pyx_v_self->read_as_aligned)); __pyx_v_self->read_as_aligned = __pyx_v_read_as_aligned; - /* "HTSeq/_HTSeq.pyx":1058 + /* "HTSeq/_HTSeq.pyx":1070 * def __init__(self, SequenceWithQualities read_as_aligned, GenomicInterval iv): * self.read_as_aligned = read_as_aligned * self._read_as_sequenced = None # <<<<<<<<<<<<<< @@ -24733,7 +24520,7 @@ __Pyx_DECREF(((PyObject *)__pyx_v_self->_read_as_sequenced)); __pyx_v_self->_read_as_sequenced = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)Py_None); - /* "HTSeq/_HTSeq.pyx":1059 + /* "HTSeq/_HTSeq.pyx":1071 * self.read_as_aligned = read_as_aligned * self._read_as_sequenced = None * self.iv = iv # <<<<<<<<<<<<<< @@ -24746,7 +24533,7 @@ __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base.iv)); __pyx_v_self->__pyx_base.iv = __pyx_v_iv; - /* "HTSeq/_HTSeq.pyx":1056 + /* "HTSeq/_HTSeq.pyx":1068 * """ * * def __init__(self, SequenceWithQualities read_as_aligned, GenomicInterval iv): # <<<<<<<<<<<<<< @@ -24760,7 +24547,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1062 +/* "HTSeq/_HTSeq.pyx":1074 * * property read: * def __get__(self): # <<<<<<<<<<<<<< @@ -24790,7 +24577,7 @@ int __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1063 + /* "HTSeq/_HTSeq.pyx":1075 * property read: * def __get__(self): * if self._read_as_sequenced is None: # <<<<<<<<<<<<<< @@ -24801,16 +24588,16 @@ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1064 + /* "HTSeq/_HTSeq.pyx":1076 * def __get__(self): * if self._read_as_sequenced is None: * if (not self.aligned) or self.iv.strand != "-": # <<<<<<<<<<<<<< * self._read_as_sequenced = self.read_as_aligned * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = ((!__pyx_t_1) != 0); if (!__pyx_t_4) { @@ -24818,15 +24605,15 @@ __pyx_t_2 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s__9, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1064, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s__9, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1076, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1065 + /* "HTSeq/_HTSeq.pyx":1077 * if self._read_as_sequenced is None: * if (not self.aligned) or self.iv.strand != "-": * self._read_as_sequenced = self.read_as_aligned # <<<<<<<<<<<<<< @@ -24841,7 +24628,7 @@ __pyx_v_self->_read_as_sequenced = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1064 + /* "HTSeq/_HTSeq.pyx":1076 * def __get__(self): * if self._read_as_sequenced is None: * if (not self.aligned) or self.iv.strand != "-": # <<<<<<<<<<<<<< @@ -24851,7 +24638,7 @@ goto __pyx_L4; } - /* "HTSeq/_HTSeq.pyx":1067 + /* "HTSeq/_HTSeq.pyx":1079 * self._read_as_sequenced = self.read_as_aligned * else: * self._read_as_sequenced = self.read_as_aligned.get_reverse_complement() # <<<<<<<<<<<<<< @@ -24859,7 +24646,7 @@ * return self._read_as_sequenced */ /*else*/ { - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->read_as_aligned->__pyx_base.__pyx_vtab)->get_reverse_complement(__pyx_v_self->read_as_aligned, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->read_as_aligned->__pyx_base.__pyx_vtab)->get_reverse_complement(__pyx_v_self->read_as_aligned, 0, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1079, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_read_as_sequenced); @@ -24867,7 +24654,7 @@ __pyx_v_self->_read_as_sequenced = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1068 + /* "HTSeq/_HTSeq.pyx":1080 * else: * self._read_as_sequenced = self.read_as_aligned.get_reverse_complement() * self._read_as_sequenced.name = self.read_as_aligned.name # <<<<<<<<<<<<<< @@ -24884,7 +24671,7 @@ } __pyx_L4:; - /* "HTSeq/_HTSeq.pyx":1063 + /* "HTSeq/_HTSeq.pyx":1075 * property read: * def __get__(self): * if self._read_as_sequenced is None: # <<<<<<<<<<<<<< @@ -24893,7 +24680,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1069 + /* "HTSeq/_HTSeq.pyx":1081 * self._read_as_sequenced = self.read_as_aligned.get_reverse_complement() * self._read_as_sequenced.name = self.read_as_aligned.name * return self._read_as_sequenced # <<<<<<<<<<<<<< @@ -24905,7 +24692,7 @@ __pyx_r = ((PyObject *)__pyx_v_self->_read_as_sequenced); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1062 + /* "HTSeq/_HTSeq.pyx":1074 * * property read: * def __get__(self): # <<<<<<<<<<<<<< @@ -24926,7 +24713,7 @@ /* "HTSeq/_HTSeq.pxd":47 * - * cdef class AlignmentWithSequenceReversal( Alignment ): + * cdef class AlignmentWithSequenceReversal(Alignment): * cdef public SequenceWithQualities read_as_aligned # <<<<<<<<<<<<<< * cdef public SequenceWithQualities _read_as_sequenced * @@ -25030,11 +24817,11 @@ } /* "HTSeq/_HTSeq.pxd":48 - * cdef class AlignmentWithSequenceReversal( Alignment ): + * cdef class AlignmentWithSequenceReversal(Alignment): * cdef public SequenceWithQualities read_as_aligned * cdef public SequenceWithQualities _read_as_sequenced # <<<<<<<<<<<<<< * - * cdef class SAM_Alignment( AlignmentWithSequenceReversal ): + * cdef class SAM_Alignment(AlignmentWithSequenceReversal): */ /* Python wrapper */ @@ -25136,8 +24923,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -25154,9 +24941,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_29AlignmentWithSequenceReversal_2__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -25167,14 +24954,14 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._read)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._read)); @@ -25191,19 +24978,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -25214,25 +25001,25 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -25241,7 +25028,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -25251,7 +25038,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None # <<<<<<<<<<<<<< @@ -25288,7 +25075,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -25298,7 +25085,7 @@ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None * if use_setstate: * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, None), state # <<<<<<<<<<<<<< @@ -25306,9 +25093,9 @@ * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_AlignmentWithSequ); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_AlignmentWithSequ); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -25319,7 +25106,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -25334,7 +25121,7 @@ __pyx_t_6 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -25343,7 +25130,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, None), state * else: * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) # <<<<<<<<<<<<<< @@ -25352,9 +25139,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_AlignmentWithSequ); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_AlignmentWithSequ); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -25365,7 +25152,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); @@ -25380,8 +25167,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -25399,7 +25186,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -25425,17 +25212,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_AlignmentWithSequenceReversal__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_AlignmentWithSequenceReversal__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_AlignmentWithSequenceReversal__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -25455,7 +25242,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1088 +/* "HTSeq/_HTSeq.pyx":1100 * cdef public str substitutions * * def __init__(self, bowtie_line): # <<<<<<<<<<<<<< @@ -25489,7 +25276,7 @@ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1088, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1100, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -25500,7 +25287,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1088, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1100, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.BowtieAlignment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25538,38 +25325,50 @@ Py_ssize_t __pyx_t_13; __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":1092 + /* "HTSeq/_HTSeq.pyx":1104 * cdef int positionint * (readId, strand, chrom, position, read, qual, * self.reserved, self.substitutions) = bowtie_line.split('\t') # <<<<<<<<<<<<<< * positionint = int(position) * AlignmentWithSequenceReversal.__init__(self, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_bowtie_line, __pyx_n_s_split); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_bowtie_line, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1104, __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))) { - PyObject* sequence = __pyx_t_2; - Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); - if (unlikely(size != 8)) { - if (size > 8) __Pyx_RaiseTooManyValuesError(8); - else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1091, __pyx_L1_error) - } - #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); + __pyx_t_3 = NULL; + 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_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_s__14) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_s__14); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1104, __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))) { + PyObject* sequence = __pyx_t_1; + Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); + if (unlikely(size != 8)) { + if (size > 8) __Pyx_RaiseTooManyValuesError(8); + else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); + __PYX_ERR(0, 1103, __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_3 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_6 = PyTuple_GET_ITEM(sequence, 4); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 5); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 6); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 7); } else { - __pyx_t_1 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_5 = PyList_GET_ITEM(sequence, 3); @@ -25578,7 +25377,7 @@ __pyx_t_8 = PyList_GET_ITEM(sequence, 6); __pyx_t_9 = PyList_GET_ITEM(sequence, 7); } - __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); @@ -25589,28 +25388,28 @@ #else { Py_ssize_t i; - PyObject** temps[8] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; + PyObject** temps[8] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; for (i=0; i < 8; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1091, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - PyObject** temps[8] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; - __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1091, __pyx_L1_error) + PyObject** temps[8] = {&__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 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1103, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; for (index=0; index < 8; index++) { PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 8) < 0) __PYX_ERR(0, 1091, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 8) < 0) __PYX_ERR(0, 1103, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L4_unpacking_done; @@ -25618,27 +25417,27 @@ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1091, __pyx_L1_error) + __PYX_ERR(0, 1103, __pyx_L1_error) __pyx_L4_unpacking_done:; } - /* "HTSeq/_HTSeq.pyx":1091 + /* "HTSeq/_HTSeq.pyx":1103 * cdef str readId, strand, chrom, position, read, qual * cdef int positionint * (readId, strand, chrom, position, read, qual, # <<<<<<<<<<<<<< * self.reserved, self.substitutions) = bowtie_line.split('\t') * positionint = int(position) */ - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 1091, __pyx_L1_error) - __pyx_v_readId = ((PyObject*)__pyx_t_1); - __pyx_t_1 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 1103, __pyx_L1_error) + __pyx_v_readId = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; __pyx_v_strand = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; __pyx_v_chrom = ((PyObject*)__pyx_t_4); @@ -25650,7 +25449,7 @@ __pyx_v_qual = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1092 + /* "HTSeq/_HTSeq.pyx":1104 * cdef int positionint * (readId, strand, chrom, position, read, qual, * self.reserved, self.substitutions) = bowtie_line.split('\t') # <<<<<<<<<<<<<< @@ -25668,37 +25467,37 @@ __pyx_v_self->substitutions = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; - /* "HTSeq/_HTSeq.pyx":1093 + /* "HTSeq/_HTSeq.pyx":1105 * (readId, strand, chrom, position, read, qual, * self.reserved, self.substitutions) = bowtie_line.split('\t') * positionint = int(position) # <<<<<<<<<<<<<< * AlignmentWithSequenceReversal.__init__(self, * SequenceWithQualities( */ - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1093, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1093, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1105, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1105, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_positionint = __pyx_t_12; - /* "HTSeq/_HTSeq.pyx":1094 + /* "HTSeq/_HTSeq.pyx":1106 * self.reserved, self.substitutions) = bowtie_line.split('\t') * positionint = int(position) * AlignmentWithSequenceReversal.__init__(self, # <<<<<<<<<<<<<< * SequenceWithQualities( * read, readId, qual), */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal), __pyx_n_s_init); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal), __pyx_n_s_init); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "HTSeq/_HTSeq.pyx":1095 + /* "HTSeq/_HTSeq.pyx":1107 * positionint = int(position) * AlignmentWithSequenceReversal.__init__(self, * SequenceWithQualities( # <<<<<<<<<<<<<< * read, readId, qual), * GenomicInterval(chrom, positionint, positionint + len(read), strand)) */ - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1095, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_read); __Pyx_GIVEREF(__pyx_v_read); @@ -25709,23 +25508,23 @@ __Pyx_INCREF(__pyx_v_qual); __Pyx_GIVEREF(__pyx_v_qual); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_qual); - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1095, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "HTSeq/_HTSeq.pyx":1097 + /* "HTSeq/_HTSeq.pyx":1109 * SequenceWithQualities( * read, readId, qual), * GenomicInterval(chrom, positionint, positionint + len(read), strand)) # <<<<<<<<<<<<<< * * */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_positionint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_positionint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_13 = PyObject_Length(__pyx_v_read); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1097, __pyx_L1_error) - __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_positionint + __pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_13 = PyObject_Length(__pyx_v_read); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_positionint + __pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); @@ -25739,7 +25538,7 @@ PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_strand); __pyx_t_8 = 0; __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1097, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1109, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -25757,9 +25556,9 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_t_7, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else @@ -25767,15 +25566,15 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_t_7, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1094, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1106, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -25789,14 +25588,14 @@ PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_12, __pyx_t_6); __pyx_t_7 = 0; __pyx_t_6 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1094, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1106, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1088 + /* "HTSeq/_HTSeq.pyx":1100 * cdef public str substitutions * * def __init__(self, bowtie_line): # <<<<<<<<<<<<<< @@ -25831,7 +25630,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1085 +/* "HTSeq/_HTSeq.pyx":1097 * """ * * cdef public str reserved # <<<<<<<<<<<<<< @@ -25886,7 +25685,7 @@ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1085, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1097, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -25936,7 +25735,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1086 +/* "HTSeq/_HTSeq.pyx":1098 * * cdef public str reserved * cdef public str substitutions # <<<<<<<<<<<<<< @@ -25991,7 +25790,7 @@ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1086, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1098, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -26043,8 +25842,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -26061,9 +25860,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_15BowtieAlignment_2__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_BowtieAlignment *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -26074,14 +25873,14 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._read)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._read)); @@ -26104,19 +25903,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -26127,25 +25926,25 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -26154,7 +25953,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -26164,7 +25963,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None or self.reserved is not None or self.substitutions is not None # <<<<<<<<<<<<<< @@ -26215,7 +26014,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None or self.reserved is not None or self.substitutions is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -26225,7 +26024,7 @@ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None or self.reserved is not None or self.substitutions is not None * if use_setstate: * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, None), state # <<<<<<<<<<<<<< @@ -26233,9 +26032,9 @@ * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BowtieAlignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BowtieAlignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -26246,7 +26045,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -26261,7 +26060,7 @@ __pyx_t_6 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None or self.reserved is not None or self.substitutions is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -26270,7 +26069,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, None), state * else: * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) # <<<<<<<<<<<<<< @@ -26279,9 +26078,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BowtieAlignment); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_BowtieAlignment); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -26292,7 +26091,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); @@ -26307,8 +26106,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -26326,7 +26125,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -26352,17 +26151,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BowtieAlignment__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_BowtieAlignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_BowtieAlignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -26382,7 +26181,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1118 +/* "HTSeq/_HTSeq.pyx":1130 * cdef public int query_from, query_to * * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, # <<<<<<<<<<<<<< @@ -26442,43 +26241,43 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 1); __PYX_ERR(0, 1118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 1); __PYX_ERR(0, 1130, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rfrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 2); __PYX_ERR(0, 1118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 2); __PYX_ERR(0, 1130, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rto)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 3); __PYX_ERR(0, 1118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 3); __PYX_ERR(0, 1130, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qfrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 4); __PYX_ERR(0, 1118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 4); __PYX_ERR(0, 1130, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qto)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 5); __PYX_ERR(0, 1118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 5); __PYX_ERR(0, 1130, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 6); __PYX_ERR(0, 1118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 6); __PYX_ERR(0, 1130, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 7: if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strand)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 7); __PYX_ERR(0, 1118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 7); __PYX_ERR(0, 1130, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 8: @@ -26488,7 +26287,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1118, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1130, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -26507,18 +26306,18 @@ } } __pyx_v_type_ = ((PyObject*)values[0]); - __pyx_v_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1118, __pyx_L3_error) - __pyx_v_rfrom = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_rfrom == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1118, __pyx_L3_error) - __pyx_v_rto = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_rto == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1118, __pyx_L3_error) - __pyx_v_qfrom = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_qfrom == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1118, __pyx_L3_error) - __pyx_v_qto = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_qto == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1130, __pyx_L3_error) + __pyx_v_rfrom = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_rfrom == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1130, __pyx_L3_error) + __pyx_v_rto = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_rto == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1130, __pyx_L3_error) + __pyx_v_qfrom = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_qfrom == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1130, __pyx_L3_error) + __pyx_v_qto = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_qto == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error) __pyx_v_chrom = ((PyObject*)values[6]); __pyx_v_strand = ((PyObject*)values[7]); if (values[8]) { - __pyx_v_check = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_check == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1119, __pyx_L3_error) + __pyx_v_check = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_check == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1131, __pyx_L3_error) } else { - /* "HTSeq/_HTSeq.pyx":1119 + /* "HTSeq/_HTSeq.pyx":1131 * * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, * int qto, str chrom, str strand, bint check=True): # <<<<<<<<<<<<<< @@ -26530,18 +26329,18 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1118, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1130, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.CigarOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type_), (&PyString_Type), 1, "type_", 1))) __PYX_ERR(0, 1118, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyString_Type), 1, "chrom", 1))) __PYX_ERR(0, 1119, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyString_Type), 1, "strand", 1))) __PYX_ERR(0, 1119, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type_), (&PyString_Type), 1, "type_", 1))) __PYX_ERR(0, 1130, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyString_Type), 1, "chrom", 1))) __PYX_ERR(0, 1131, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyString_Type), 1, "strand", 1))) __PYX_ERR(0, 1131, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_14CigarOperation___init__(((struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *)__pyx_v_self), __pyx_v_type_, __pyx_v_size, __pyx_v_rfrom, __pyx_v_rto, __pyx_v_qfrom, __pyx_v_qto, __pyx_v_chrom, __pyx_v_strand, __pyx_v_check); - /* "HTSeq/_HTSeq.pyx":1118 + /* "HTSeq/_HTSeq.pyx":1130 * cdef public int query_from, query_to * * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, # <<<<<<<<<<<<<< @@ -26569,7 +26368,7 @@ int __pyx_t_6; __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":1120 + /* "HTSeq/_HTSeq.pyx":1132 * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, * int qto, str chrom, str strand, bint check=True): * self.type = type_ # <<<<<<<<<<<<<< @@ -26582,7 +26381,7 @@ __Pyx_DECREF(__pyx_v_self->type); __pyx_v_self->type = __pyx_v_type_; - /* "HTSeq/_HTSeq.pyx":1121 + /* "HTSeq/_HTSeq.pyx":1133 * int qto, str chrom, str strand, bint check=True): * self.type = type_ * self.size = size # <<<<<<<<<<<<<< @@ -26591,18 +26390,18 @@ */ __pyx_v_self->size = __pyx_v_size; - /* "HTSeq/_HTSeq.pyx":1122 + /* "HTSeq/_HTSeq.pyx":1134 * self.type = type_ * self.size = size * self.ref_iv = GenomicInterval(chrom, rfrom, rto, strand) # <<<<<<<<<<<<<< * self.query_from = qfrom * self.query_to = qto */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rfrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rfrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1134, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); @@ -26616,7 +26415,7 @@ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_strand); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1122, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_3, NULL); 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; __Pyx_GIVEREF(__pyx_t_2); @@ -26625,7 +26424,7 @@ __pyx_v_self->ref_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1123 + /* "HTSeq/_HTSeq.pyx":1135 * self.size = size * self.ref_iv = GenomicInterval(chrom, rfrom, rto, strand) * self.query_from = qfrom # <<<<<<<<<<<<<< @@ -26634,7 +26433,7 @@ */ __pyx_v_self->query_from = __pyx_v_qfrom; - /* "HTSeq/_HTSeq.pyx":1124 + /* "HTSeq/_HTSeq.pyx":1136 * self.ref_iv = GenomicInterval(chrom, rfrom, rto, strand) * self.query_from = qfrom * self.query_to = qto # <<<<<<<<<<<<<< @@ -26643,7 +26442,7 @@ */ __pyx_v_self->query_to = __pyx_v_qto; - /* "HTSeq/_HTSeq.pyx":1125 + /* "HTSeq/_HTSeq.pyx":1137 * self.query_from = qfrom * self.query_to = qto * if check and not self.check(): # <<<<<<<<<<<<<< @@ -26656,7 +26455,7 @@ __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -26668,22 +26467,19 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1125, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1125, __pyx_L1_error) - } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1137, __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 < 0)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = ((!__pyx_t_5) != 0); __pyx_t_4 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_4)) { - /* "HTSeq/_HTSeq.pyx":1126 + /* "HTSeq/_HTSeq.pyx":1138 * self.query_to = qto * if check and not self.check(): * raise ValueError, "Inconsistent CIGAR operation." # <<<<<<<<<<<<<< @@ -26691,9 +26487,9 @@ * def __repr__(self): */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Inconsistent_CIGAR_operation, 0, 0); - __PYX_ERR(0, 1126, __pyx_L1_error) + __PYX_ERR(0, 1138, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1125 + /* "HTSeq/_HTSeq.pyx":1137 * self.query_from = qfrom * self.query_to = qto * if check and not self.check(): # <<<<<<<<<<<<<< @@ -26702,7 +26498,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1118 + /* "HTSeq/_HTSeq.pyx":1130 * cdef public int query_from, query_to * * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, # <<<<<<<<<<<<<< @@ -26724,7 +26520,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1128 +/* "HTSeq/_HTSeq.pyx":1140 * raise ValueError, "Inconsistent CIGAR operation." * * def __repr__(self): # <<<<<<<<<<<<<< @@ -26757,7 +26553,7 @@ PyObject *__pyx_t_7 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "HTSeq/_HTSeq.pyx":1129 + /* "HTSeq/_HTSeq.pyx":1141 * * def __repr__(self): * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( # <<<<<<<<<<<<<< @@ -26766,56 +26562,56 @@ */ __Pyx_XDECREF(__pyx_r); - /* "HTSeq/_HTSeq.pyx":1130 + /* "HTSeq/_HTSeq.pyx":1142 * def __repr__(self): * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( * self.__class__.__name__, self.size, cigar_operation_names[ # <<<<<<<<<<<<<< * self.type], * str(self.ref_iv), self.query_from, self.query_to) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1142, __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_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_cigar_operation_names); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "HTSeq/_HTSeq.pyx":1131 + /* "HTSeq/_HTSeq.pyx":1143 * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( * self.__class__.__name__, self.size, cigar_operation_names[ * self.type], # <<<<<<<<<<<<<< * str(self.ref_iv), self.query_from, self.query_to) * */ - __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_v_self->type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_v_self->type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1132 + /* "HTSeq/_HTSeq.pyx":1144 * self.__class__.__name__, self.size, cigar_operation_names[ * self.type], * str(self.ref_iv), self.query_from, self.query_to) # <<<<<<<<<<<<<< * * def check(CigarOperation self): */ - __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self->ref_iv)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), ((PyObject *)__pyx_v_self->ref_iv)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1144, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "HTSeq/_HTSeq.pyx":1130 + /* "HTSeq/_HTSeq.pyx":1142 * def __repr__(self): * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( * self.__class__.__name__, self.size, cigar_operation_names[ # <<<<<<<<<<<<<< * self.type], * str(self.ref_iv), self.query_from, self.query_to) */ - __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1130, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1142, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); @@ -26836,21 +26632,21 @@ __pyx_t_5 = 0; __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1129 + /* "HTSeq/_HTSeq.pyx":1141 * * def __repr__(self): * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, self.size, cigar_operation_names[ * self.type], */ - __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_d_base_s_s_on_ref_iv_s_query, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1129, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_s_d_base_s_s_on_ref_iv_s_query, __pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1141, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1128 + /* "HTSeq/_HTSeq.pyx":1140 * raise ValueError, "Inconsistent CIGAR operation." * * def __repr__(self): # <<<<<<<<<<<<<< @@ -26875,7 +26671,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1134 +/* "HTSeq/_HTSeq.pyx":1146 * str(self.ref_iv), self.query_from, self.query_to) * * def check(CigarOperation self): # <<<<<<<<<<<<<< @@ -26908,7 +26704,7 @@ int __pyx_t_5; __Pyx_RefNannySetupContext("check", 0); - /* "HTSeq/_HTSeq.pyx":1135 + /* "HTSeq/_HTSeq.pyx":1147 * * def check(CigarOperation self): * cdef int qlen = self.query_to - self.query_from # <<<<<<<<<<<<<< @@ -26917,47 +26713,47 @@ */ __pyx_v_qlen = (__pyx_v_self->query_to - __pyx_v_self->query_from); - /* "HTSeq/_HTSeq.pyx":1136 + /* "HTSeq/_HTSeq.pyx":1148 * def check(CigarOperation self): * cdef int qlen = self.query_to - self.query_from * cdef int rlen = self.ref_iv.length # <<<<<<<<<<<<<< * if self.type == 'M' or self.type == '=' or self.type == 'X': * if not (qlen == self.size and rlen == self.size): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ref_iv), __pyx_n_s_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ref_iv), __pyx_n_s_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __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, 1136, __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, 1148, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rlen = __pyx_t_2; - /* "HTSeq/_HTSeq.pyx":1137 + /* "HTSeq/_HTSeq.pyx":1149 * cdef int qlen = self.query_to - self.query_from * cdef int rlen = self.ref_iv.length * if self.type == 'M' or self.type == '=' or self.type == 'X': # <<<<<<<<<<<<<< * if not (qlen == self.size and rlen == self.size): * return False */ - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_M, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_M, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1149, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_kp_s__20, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1149, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); if (!__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_X, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1137, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_X, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1149, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1138 + /* "HTSeq/_HTSeq.pyx":1150 * cdef int rlen = self.ref_iv.length * if self.type == 'M' or self.type == '=' or self.type == 'X': * if not (qlen == self.size and rlen == self.size): # <<<<<<<<<<<<<< @@ -26976,7 +26772,7 @@ __pyx_t_5 = ((!__pyx_t_3) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1139 + /* "HTSeq/_HTSeq.pyx":1151 * if self.type == 'M' or self.type == '=' or self.type == 'X': * if not (qlen == self.size and rlen == self.size): * return False # <<<<<<<<<<<<<< @@ -26988,7 +26784,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1138 + /* "HTSeq/_HTSeq.pyx":1150 * cdef int rlen = self.ref_iv.length * if self.type == 'M' or self.type == '=' or self.type == 'X': * if not (qlen == self.size and rlen == self.size): # <<<<<<<<<<<<<< @@ -26997,7 +26793,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1137 + /* "HTSeq/_HTSeq.pyx":1149 * cdef int qlen = self.query_to - self.query_from * cdef int rlen = self.ref_iv.length * if self.type == 'M' or self.type == '=' or self.type == 'X': # <<<<<<<<<<<<<< @@ -27007,27 +26803,27 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1140 + /* "HTSeq/_HTSeq.pyx":1152 * if not (qlen == self.size and rlen == self.size): * return False * elif self.type == 'I' or self.type == 'S': # <<<<<<<<<<<<<< * if not (qlen == self.size and rlen == 0): * return False */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_I, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1140, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_I, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1152, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L10_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1140, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1152, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_5 = __pyx_t_3; __pyx_L10_bool_binop_done:; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1141 + /* "HTSeq/_HTSeq.pyx":1153 * return False * elif self.type == 'I' or self.type == 'S': * if not (qlen == self.size and rlen == 0): # <<<<<<<<<<<<<< @@ -27046,7 +26842,7 @@ __pyx_t_3 = ((!__pyx_t_5) != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1142 + /* "HTSeq/_HTSeq.pyx":1154 * elif self.type == 'I' or self.type == 'S': * if not (qlen == self.size and rlen == 0): * return False # <<<<<<<<<<<<<< @@ -27058,7 +26854,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1141 + /* "HTSeq/_HTSeq.pyx":1153 * return False * elif self.type == 'I' or self.type == 'S': * if not (qlen == self.size and rlen == 0): # <<<<<<<<<<<<<< @@ -27067,7 +26863,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1140 + /* "HTSeq/_HTSeq.pyx":1152 * if not (qlen == self.size and rlen == self.size): * return False * elif self.type == 'I' or self.type == 'S': # <<<<<<<<<<<<<< @@ -27077,27 +26873,27 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1143 + /* "HTSeq/_HTSeq.pyx":1155 * if not (qlen == self.size and rlen == 0): * return False * elif self.type == 'D' or self.type == 'N': # <<<<<<<<<<<<<< * if not (qlen == 0 and rlen == self.size): * return False */ - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_D, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1143, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_D, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); if (!__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L15_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_N, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1143, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_N, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L15_bool_binop_done:; if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1144 + /* "HTSeq/_HTSeq.pyx":1156 * return False * elif self.type == 'D' or self.type == 'N': * if not (qlen == 0 and rlen == self.size): # <<<<<<<<<<<<<< @@ -27116,7 +26912,7 @@ __pyx_t_5 = ((!__pyx_t_3) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1145 + /* "HTSeq/_HTSeq.pyx":1157 * elif self.type == 'D' or self.type == 'N': * if not (qlen == 0 and rlen == self.size): * return False # <<<<<<<<<<<<<< @@ -27128,7 +26924,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1144 + /* "HTSeq/_HTSeq.pyx":1156 * return False * elif self.type == 'D' or self.type == 'N': * if not (qlen == 0 and rlen == self.size): # <<<<<<<<<<<<<< @@ -27137,7 +26933,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1143 + /* "HTSeq/_HTSeq.pyx":1155 * if not (qlen == self.size and rlen == 0): * return False * elif self.type == 'D' or self.type == 'N': # <<<<<<<<<<<<<< @@ -27147,27 +26943,27 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1146 + /* "HTSeq/_HTSeq.pyx":1158 * if not (qlen == 0 and rlen == self.size): * return False * elif self.type == 'H' or self.type == 'P': # <<<<<<<<<<<<<< * if not (qlen == 0 and rlen == 0): * return False */ - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_H, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_H, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1158, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L20_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_P, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1146, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_v_self->type, __pyx_n_s_P, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1158, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_5 = __pyx_t_3; __pyx_L20_bool_binop_done:; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1147 + /* "HTSeq/_HTSeq.pyx":1159 * return False * elif self.type == 'H' or self.type == 'P': * if not (qlen == 0 and rlen == 0): # <<<<<<<<<<<<<< @@ -27186,7 +26982,7 @@ __pyx_t_3 = ((!__pyx_t_5) != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1148 + /* "HTSeq/_HTSeq.pyx":1160 * elif self.type == 'H' or self.type == 'P': * if not (qlen == 0 and rlen == 0): * return False # <<<<<<<<<<<<<< @@ -27198,7 +26994,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1147 + /* "HTSeq/_HTSeq.pyx":1159 * return False * elif self.type == 'H' or self.type == 'P': * if not (qlen == 0 and rlen == 0): # <<<<<<<<<<<<<< @@ -27207,7 +27003,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1146 + /* "HTSeq/_HTSeq.pyx":1158 * if not (qlen == 0 and rlen == self.size): * return False * elif self.type == 'H' or self.type == 'P': # <<<<<<<<<<<<<< @@ -27217,7 +27013,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1150 + /* "HTSeq/_HTSeq.pyx":1162 * return False * else: * return False # <<<<<<<<<<<<<< @@ -27232,7 +27028,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1151 + /* "HTSeq/_HTSeq.pyx":1163 * else: * return False * return True # <<<<<<<<<<<<<< @@ -27244,7 +27040,7 @@ __pyx_r = Py_True; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1134 + /* "HTSeq/_HTSeq.pyx":1146 * str(self.ref_iv), self.query_from, self.query_to) * * def check(CigarOperation self): # <<<<<<<<<<<<<< @@ -27263,7 +27059,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1113 +/* "HTSeq/_HTSeq.pyx":1125 * cdef class CigarOperation(object): * * cdef public str type # <<<<<<<<<<<<<< @@ -27318,7 +27114,7 @@ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1113, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_value)->tp_name), 0))) __PYX_ERR(0, 1125, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -27368,7 +27164,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1114 +/* "HTSeq/_HTSeq.pyx":1126 * * cdef public str type * cdef public int size # <<<<<<<<<<<<<< @@ -27395,7 +27191,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1114, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27430,7 +27226,7 @@ __Pyx_RefNannyDeclarations int __pyx_t_1; __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, 1114, __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, 1126, __pyx_L1_error) __pyx_v_self->size = __pyx_t_1; /* function exit code */ @@ -27444,7 +27240,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1115 +/* "HTSeq/_HTSeq.pyx":1127 * cdef public str type * cdef public int size * cdef public GenomicInterval ref_iv # <<<<<<<<<<<<<< @@ -27499,7 +27295,7 @@ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 1115, __pyx_L1_error) + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 1127, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -27549,7 +27345,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1116 +/* "HTSeq/_HTSeq.pyx":1128 * cdef public int size * cdef public GenomicInterval ref_iv * cdef public int query_from, query_to # <<<<<<<<<<<<<< @@ -27576,7 +27372,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27611,7 +27407,7 @@ __Pyx_RefNannyDeclarations int __pyx_t_1; __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, 1116, __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, 1128, __pyx_L1_error) __pyx_v_self->query_from = __pyx_t_1; /* function exit code */ @@ -27644,7 +27440,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1116, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1128, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27679,7 +27475,7 @@ __Pyx_RefNannyDeclarations int __pyx_t_1; __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, 1116, __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, 1128, __pyx_L1_error) __pyx_v_self->query_to = __pyx_t_1; /* function exit code */ @@ -27695,8 +27491,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -27713,9 +27509,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_14CigarOperation_6__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -27727,20 +27523,20 @@ int __pyx_t_7; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -27760,19 +27556,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v__dict = __pyx_t_4; __pyx_t_4 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -27783,25 +27579,25 @@ __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -27810,7 +27606,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -27820,7 +27616,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.ref_iv is not None or self.type is not None # <<<<<<<<<<<<<< @@ -27843,7 +27639,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self.ref_iv is not None or self.type is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -27853,7 +27649,7 @@ __pyx_t_6 = (__pyx_v_use_setstate != 0); if (__pyx_t_6) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self.ref_iv is not None or self.type is not None * if use_setstate: * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, None), state # <<<<<<<<<<<<<< @@ -27861,9 +27657,9 @@ * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CigarOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_CigarOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -27874,7 +27670,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); @@ -27889,7 +27685,7 @@ __pyx_t_2 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self.ref_iv is not None or self.type is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -27898,7 +27694,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, None), state * else: * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) # <<<<<<<<<<<<<< @@ -27907,9 +27703,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CigarOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_CigarOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -27920,7 +27716,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -27935,8 +27731,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -27955,7 +27751,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -27981,17 +27777,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_CigarOperation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_CigarOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_CigarOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -28011,7 +27807,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1155 +/* "HTSeq/_HTSeq.pyx":1167 * _re_cigar_codes = re.compile('([MIDNSHP=X])') * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -28034,15 +27830,15 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - Py_ssize_t __pyx_t_7; - PyObject *(*__pyx_t_8)(PyObject *); + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; struct __pyx_opt_args_5HTSeq_6_HTSeq_build_cigar_list __pyx_t_15; @@ -28059,16 +27855,16 @@ } } - /* "HTSeq/_HTSeq.pyx":1159 + /* "HTSeq/_HTSeq.pyx":1171 * cdef int size * cdef str code * split_cigar = _re_cigar_codes.split(cigar_string) # <<<<<<<<<<<<<< * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re_cigar_codes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1159, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re_cigar_codes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1171, __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, 1159, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -28081,44 +27877,16 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_cigar_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cigar_string}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cigar_string}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1159, __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 = NULL; - __Pyx_INCREF(__pyx_v_cigar_string); - __Pyx_GIVEREF(__pyx_v_cigar_string); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_cigar_string); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1159, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_cigar_string) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_cigar_string); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1171, __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, 1159, __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, 1171, __pyx_L1_error) __pyx_v_split_cigar = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1160 + /* "HTSeq/_HTSeq.pyx":1172 * cdef str code * split_cigar = _re_cigar_codes.split(cigar_string) * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: # <<<<<<<<<<<<<< @@ -28127,41 +27895,41 @@ */ if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1160, __pyx_L1_error) + __PYX_ERR(0, 1172, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_split_cigar, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_split_cigar, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__3, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1160, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_1, __pyx_kp_s__3, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1172, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!__pyx_t_6) { + if (!__pyx_t_5) { } else { - __pyx_t_5 = __pyx_t_6; + __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1160, __pyx_L1_error) + __PYX_ERR(0, 1172, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_split_cigar); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1160, __pyx_L1_error) - __pyx_t_6 = ((__Pyx_mod_Py_ssize_t(__pyx_t_7, 2) != 1) != 0); - __pyx_t_5 = __pyx_t_6; + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_split_cigar); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_5 = ((__Pyx_mod_Py_ssize_t(__pyx_t_6, 2) != 1) != 0); + __pyx_t_4 = __pyx_t_5; __pyx_L4_bool_binop_done:; - if (unlikely(__pyx_t_5)) { + if (unlikely(__pyx_t_4)) { - /* "HTSeq/_HTSeq.pyx":1161 + /* "HTSeq/_HTSeq.pyx":1173 * split_cigar = _re_cigar_codes.split(cigar_string) * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string # <<<<<<<<<<<<<< * cl = [] * for i in xrange(len(split_cigar) // 2): */ - __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Illegal_CIGAR_string_s, __pyx_v_cigar_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1161, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Illegal_CIGAR_string_s, __pyx_v_cigar_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1161, __pyx_L1_error) + __PYX_ERR(0, 1173, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1160 + /* "HTSeq/_HTSeq.pyx":1172 * cdef str code * split_cigar = _re_cigar_codes.split(cigar_string) * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: # <<<<<<<<<<<<<< @@ -28170,19 +27938,19 @@ */ } - /* "HTSeq/_HTSeq.pyx":1162 + /* "HTSeq/_HTSeq.pyx":1174 * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * cl = [] # <<<<<<<<<<<<<< * for i in xrange(len(split_cigar) // 2): * try: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cl = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1163 + /* "HTSeq/_HTSeq.pyx":1175 * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * cl = [] * for i in xrange(len(split_cigar) // 2): # <<<<<<<<<<<<<< @@ -28191,49 +27959,49 @@ */ if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1163, __pyx_L1_error) + __PYX_ERR(0, 1175, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_split_cigar); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1163, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(__pyx_t_7, 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_split_cigar); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(__pyx_t_6, 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_xrange, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __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; + __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1175, __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, 1163, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1175, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(!__pyx_t_8)) { + if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_6 >= 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, 1163, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1175, __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, 1163, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_6 >= 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, 1163, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1175, __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, 1163, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_3 = __pyx_t_8(__pyx_t_1); + __pyx_t_3 = __pyx_t_7(__pyx_t_1); 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, 1163, __pyx_L1_error) + else __PYX_ERR(0, 1175, __pyx_L1_error) } break; } @@ -28242,7 +28010,7 @@ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1164 + /* "HTSeq/_HTSeq.pyx":1176 * cl = [] * for i in xrange(len(split_cigar) // 2): * try: # <<<<<<<<<<<<<< @@ -28252,13 +28020,13 @@ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { - /* "HTSeq/_HTSeq.pyx":1165 + /* "HTSeq/_HTSeq.pyx":1177 * for i in xrange(len(split_cigar) // 2): * try: * size = int(split_cigar[2 * i]) # <<<<<<<<<<<<<< @@ -28267,21 +28035,21 @@ */ if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1165, __pyx_L8_error) + __PYX_ERR(0, 1177, __pyx_L8_error) } - __pyx_t_3 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L8_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_split_cigar, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1165, __pyx_L8_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_split_cigar, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1177, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1165, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1165, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1177, __pyx_L8_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_size = __pyx_t_12; + __pyx_v_size = __pyx_t_11; - /* "HTSeq/_HTSeq.pyx":1164 + /* "HTSeq/_HTSeq.pyx":1176 * cl = [] * for i in xrange(len(split_cigar) // 2): * try: # <<<<<<<<<<<<<< @@ -28289,62 +28057,61 @@ * except ValueError: */ } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1166 + /* "HTSeq/_HTSeq.pyx":1178 * try: * size = int(split_cigar[2 * i]) * except ValueError: # <<<<<<<<<<<<<< * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * code = split_cigar[2 * i + 1] */ - __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); - if (__pyx_t_12) { + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); + if (__pyx_t_11) { __Pyx_AddTraceback("HTSeq._HTSeq.parse_cigar", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 1166, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 1178, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_12); - /* "HTSeq/_HTSeq.pyx":1167 + /* "HTSeq/_HTSeq.pyx":1179 * size = int(split_cigar[2 * i]) * except ValueError: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string # <<<<<<<<<<<<<< * code = split_cigar[2 * i + 1] * cl.append((code, size)) */ - __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_Illegal_CIGAR_string_s, __pyx_v_cigar_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1167, __pyx_L10_except_error) + __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_Illegal_CIGAR_string_s, __pyx_v_cigar_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1179, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_13, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 1167, __pyx_L10_except_error) + __PYX_ERR(0, 1179, __pyx_L10_except_error) } goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "HTSeq/_HTSeq.pyx":1164 + /* "HTSeq/_HTSeq.pyx":1176 * cl = [] * for i in xrange(len(split_cigar) // 2): * try: # <<<<<<<<<<<<<< * size = int(split_cigar[2 * i]) * except ValueError: */ + __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L15_try_end:; } - /* "HTSeq/_HTSeq.pyx":1168 + /* "HTSeq/_HTSeq.pyx":1180 * except ValueError: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * code = split_cigar[2 * i + 1] # <<<<<<<<<<<<<< @@ -28353,41 +28120,41 @@ */ if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1168, __pyx_L1_error) + __PYX_ERR(0, 1180, __pyx_L1_error) } - __pyx_t_2 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error) + __pyx_t_12 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_12, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1180, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1168, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_split_cigar, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1180, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_split_cigar, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1168, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1168, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_code, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; + if (!(likely(PyString_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_12)->tp_name), 0))) __PYX_ERR(0, 1180, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_code, ((PyObject*)__pyx_t_12)); + __pyx_t_12 = 0; - /* "HTSeq/_HTSeq.pyx":1169 + /* "HTSeq/_HTSeq.pyx":1181 * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * code = split_cigar[2 * i + 1] * cl.append((code, size)) # <<<<<<<<<<<<<< * return build_cigar_list(cl, ref_left, chrom, strand) * */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1169, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1181, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1181, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1169, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_code); __Pyx_GIVEREF(__pyx_v_code); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_code); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_cl, __pyx_t_4); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1169, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_code); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_12); + __pyx_t_12 = 0; + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_cl, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1181, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1163 + /* "HTSeq/_HTSeq.pyx":1175 * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * cl = [] * for i in xrange(len(split_cigar) // 2): # <<<<<<<<<<<<<< @@ -28397,7 +28164,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1170 + /* "HTSeq/_HTSeq.pyx":1182 * code = split_cigar[2 * i + 1] * cl.append((code, size)) * return build_cigar_list(cl, ref_left, chrom, strand) # <<<<<<<<<<<<<< @@ -28409,13 +28176,13 @@ __pyx_t_15.ref_left = __pyx_v_ref_left; __pyx_t_15.chrom = __pyx_v_chrom; __pyx_t_15.strand = __pyx_v_strand; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(__pyx_v_cl, 0, &__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(__pyx_v_cl, 0, &__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1155 + /* "HTSeq/_HTSeq.pyx":1167 * _re_cigar_codes = re.compile('([MIDNSHP=X])') * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -28428,7 +28195,7 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("HTSeq._HTSeq.parse_cigar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; @@ -28497,7 +28264,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_cigar") < 0)) __PYX_ERR(0, 1155, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_cigar") < 0)) __PYX_ERR(0, 1167, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -28514,7 +28281,7 @@ } __pyx_v_cigar_string = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_ref_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ref_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1155, __pyx_L3_error) + __pyx_v_ref_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ref_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L3_error) } else { __pyx_v_ref_left = ((int)0); } @@ -28523,15 +28290,15 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parse_cigar", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1155, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse_cigar", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1167, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.parse_cigar", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigar_string), (&PyString_Type), 1, "cigar_string", 1))) __PYX_ERR(0, 1155, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyString_Type), 1, "chrom", 1))) __PYX_ERR(0, 1155, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyString_Type), 1, "strand", 1))) __PYX_ERR(0, 1155, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigar_string), (&PyString_Type), 1, "cigar_string", 1))) __PYX_ERR(0, 1167, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyString_Type), 1, "chrom", 1))) __PYX_ERR(0, 1167, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyString_Type), 1, "strand", 1))) __PYX_ERR(0, 1167, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_10parse_cigar(__pyx_self, __pyx_v_cigar_string, __pyx_v_ref_left, __pyx_v_chrom, __pyx_v_strand); /* function exit code */ @@ -28554,7 +28321,7 @@ __pyx_t_2.ref_left = __pyx_v_ref_left; __pyx_t_2.chrom = __pyx_v_chrom; __pyx_t_2.strand = __pyx_v_strand; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_parse_cigar(__pyx_v_cigar_string, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_parse_cigar(__pyx_v_cigar_string, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28571,7 +28338,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1172 +/* "HTSeq/_HTSeq.pyx":1184 * return build_cigar_list(cl, ref_left, chrom, strand) * * cpdef list build_cigar_list(list cigar_pairs, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -28618,7 +28385,7 @@ } } - /* "HTSeq/_HTSeq.pyx":1176 + /* "HTSeq/_HTSeq.pyx":1188 * cdef int rpos, qpos, size * cdef str code * rpos = ref_left # <<<<<<<<<<<<<< @@ -28627,7 +28394,7 @@ */ __pyx_v_rpos = __pyx_v_ref_left; - /* "HTSeq/_HTSeq.pyx":1177 + /* "HTSeq/_HTSeq.pyx":1189 * cdef str code * rpos = ref_left * qpos = 0 # <<<<<<<<<<<<<< @@ -28636,19 +28403,19 @@ */ __pyx_v_qpos = 0; - /* "HTSeq/_HTSeq.pyx":1178 + /* "HTSeq/_HTSeq.pyx":1190 * rpos = ref_left * qpos = 0 * res = [] # <<<<<<<<<<<<<< * for code, size in cigar_pairs: * if code == 'M' or code == '=' or code == 'X': */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1190, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_res = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1179 + /* "HTSeq/_HTSeq.pyx":1191 * qpos = 0 * res = [] * for code, size in cigar_pairs: # <<<<<<<<<<<<<< @@ -28657,15 +28424,15 @@ */ if (unlikely(__pyx_v_cigar_pairs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1179, __pyx_L1_error) + __PYX_ERR(0, 1191, __pyx_L1_error) } __pyx_t_1 = __pyx_v_cigar_pairs; __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, 1179, __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, 1191, __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, 1179, __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, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -28674,7 +28441,7 @@ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1179, __pyx_L1_error) + __PYX_ERR(0, 1191, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -28687,15 +28454,15 @@ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1179, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1191, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -28703,7 +28470,7 @@ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1179, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1191, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -28711,69 +28478,69 @@ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1179, __pyx_L1_error) + __PYX_ERR(0, 1191, __pyx_L1_error) __pyx_L6_unpacking_done:; } - if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1179, __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, 1179, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1191, __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, 1191, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_code, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_size = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":1180 + /* "HTSeq/_HTSeq.pyx":1192 * res = [] * for code, size in cigar_pairs: * if code == 'M' or code == '=' or code == 'X': # <<<<<<<<<<<<<< * res.append(CigarOperation( * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) */ - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_M, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_M, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1192, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (!__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L8_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_kp_s__20, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1192, __pyx_L1_error) __pyx_t_10 = (__pyx_t_11 != 0); if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L8_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_X, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_X, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1192, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); __pyx_t_9 = __pyx_t_11; __pyx_L8_bool_binop_done:; if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":1182 + /* "HTSeq/_HTSeq.pyx":1194 * if code == 'M' or code == '=' or code == 'X': * res.append(CigarOperation( * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) # <<<<<<<<<<<<<< * rpos += size * qpos += size */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - /* "HTSeq/_HTSeq.pyx":1181 + /* "HTSeq/_HTSeq.pyx":1193 * for code, size in cigar_pairs: * if code == 'M' or code == '=' or code == 'X': * res.append(CigarOperation( # <<<<<<<<<<<<<< * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) * rpos += size */ - __pyx_t_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_code); __Pyx_GIVEREF(__pyx_v_code); @@ -28799,13 +28566,13 @@ __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "HTSeq/_HTSeq.pyx":1183 + /* "HTSeq/_HTSeq.pyx":1195 * res.append(CigarOperation( * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) * rpos += size # <<<<<<<<<<<<<< @@ -28814,7 +28581,7 @@ */ __pyx_v_rpos = (__pyx_v_rpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1184 + /* "HTSeq/_HTSeq.pyx":1196 * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) * rpos += size * qpos += size # <<<<<<<<<<<<<< @@ -28823,7 +28590,7 @@ */ __pyx_v_qpos = (__pyx_v_qpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1180 + /* "HTSeq/_HTSeq.pyx":1192 * res = [] * for code, size in cigar_pairs: * if code == 'M' or code == '=' or code == 'X': # <<<<<<<<<<<<<< @@ -28833,43 +28600,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1185 + /* "HTSeq/_HTSeq.pyx":1197 * rpos += size * qpos += size * elif code == 'I': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_I, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_I, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1197, __pyx_L1_error) __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1187 + /* "HTSeq/_HTSeq.pyx":1199 * elif code == 'I': * res.append(CigarOperation( * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) # <<<<<<<<<<<<<< * qpos += size * elif code == 'D': */ - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1187, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1186 + /* "HTSeq/_HTSeq.pyx":1198 * qpos += size * elif code == 'I': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size */ - __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_I); __Pyx_GIVEREF(__pyx_n_s_I); @@ -28895,13 +28662,13 @@ __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1188 + /* "HTSeq/_HTSeq.pyx":1200 * res.append(CigarOperation( * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size # <<<<<<<<<<<<<< @@ -28910,7 +28677,7 @@ */ __pyx_v_qpos = (__pyx_v_qpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1185 + /* "HTSeq/_HTSeq.pyx":1197 * rpos += size * qpos += size * elif code == 'I': # <<<<<<<<<<<<<< @@ -28920,43 +28687,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1189 + /* "HTSeq/_HTSeq.pyx":1201 * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size * elif code == 'D': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) */ - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_D, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_D, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1201, __pyx_L1_error) __pyx_t_9 = (__pyx_t_11 != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":1191 + /* "HTSeq/_HTSeq.pyx":1203 * elif code == 'D': * res.append(CigarOperation( * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) # <<<<<<<<<<<<<< * rpos += size * elif code == 'N': */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1191, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - /* "HTSeq/_HTSeq.pyx":1190 + /* "HTSeq/_HTSeq.pyx":1202 * qpos += size * elif code == 'D': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size */ - __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_n_s_D); __Pyx_GIVEREF(__pyx_n_s_D); @@ -28982,13 +28749,13 @@ __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1192 + /* "HTSeq/_HTSeq.pyx":1204 * res.append(CigarOperation( * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size # <<<<<<<<<<<<<< @@ -28997,7 +28764,7 @@ */ __pyx_v_rpos = (__pyx_v_rpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1189 + /* "HTSeq/_HTSeq.pyx":1201 * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size * elif code == 'D': # <<<<<<<<<<<<<< @@ -29007,43 +28774,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1193 + /* "HTSeq/_HTSeq.pyx":1205 * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size * elif code == 'N': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_N, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_N, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1205, __pyx_L1_error) __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1195 + /* "HTSeq/_HTSeq.pyx":1207 * elif code == 'N': * res.append(CigarOperation( * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) # <<<<<<<<<<<<<< * rpos += size * elif code == 'S': */ - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1195, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1207, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "HTSeq/_HTSeq.pyx":1194 + /* "HTSeq/_HTSeq.pyx":1206 * rpos += size * elif code == 'N': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size */ - __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_s_N); __Pyx_GIVEREF(__pyx_n_s_N); @@ -29069,13 +28836,13 @@ __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1196 + /* "HTSeq/_HTSeq.pyx":1208 * res.append(CigarOperation( * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size # <<<<<<<<<<<<<< @@ -29084,7 +28851,7 @@ */ __pyx_v_rpos = (__pyx_v_rpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1193 + /* "HTSeq/_HTSeq.pyx":1205 * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size * elif code == 'N': # <<<<<<<<<<<<<< @@ -29094,43 +28861,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1197 + /* "HTSeq/_HTSeq.pyx":1209 * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size * elif code == 'S': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) */ - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_S, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1209, __pyx_L1_error) __pyx_t_9 = (__pyx_t_11 != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":1199 + /* "HTSeq/_HTSeq.pyx":1211 * elif code == 'S': * res.append(CigarOperation( * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) # <<<<<<<<<<<<<< * qpos += size * elif code == 'H': */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1211, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - /* "HTSeq/_HTSeq.pyx":1198 + /* "HTSeq/_HTSeq.pyx":1210 * rpos += size * elif code == 'S': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size */ - __pyx_t_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_n_s_S); __Pyx_GIVEREF(__pyx_n_s_S); @@ -29156,13 +28923,13 @@ __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "HTSeq/_HTSeq.pyx":1200 + /* "HTSeq/_HTSeq.pyx":1212 * res.append(CigarOperation( * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size # <<<<<<<<<<<<<< @@ -29171,7 +28938,7 @@ */ __pyx_v_qpos = (__pyx_v_qpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1197 + /* "HTSeq/_HTSeq.pyx":1209 * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size * elif code == 'S': # <<<<<<<<<<<<<< @@ -29181,43 +28948,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1201 + /* "HTSeq/_HTSeq.pyx":1213 * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size * elif code == 'H': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) */ - __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_H, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_H, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1213, __pyx_L1_error) __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1203 + /* "HTSeq/_HTSeq.pyx":1215 * elif code == 'H': * res.append(CigarOperation( * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) # <<<<<<<<<<<<<< * elif code == 'P': * res.append(CigarOperation( */ - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1202 + /* "HTSeq/_HTSeq.pyx":1214 * qpos += size * elif code == 'H': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) * elif code == 'P': */ - __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_s_H); __Pyx_GIVEREF(__pyx_n_s_H); @@ -29243,13 +29010,13 @@ __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1214, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1202, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1214, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1201 + /* "HTSeq/_HTSeq.pyx":1213 * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size * elif code == 'H': # <<<<<<<<<<<<<< @@ -29259,43 +29026,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1204 + /* "HTSeq/_HTSeq.pyx":1216 * res.append(CigarOperation( * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) * elif code == 'P': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'P', size, rpos, rpos, qpos, qpos, chrom, strand)) */ - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_P, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1204, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_v_code, __pyx_n_s_P, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1216, __pyx_L1_error) __pyx_t_9 = (__pyx_t_11 != 0); if (likely(__pyx_t_9)) { - /* "HTSeq/_HTSeq.pyx":1206 + /* "HTSeq/_HTSeq.pyx":1218 * elif code == 'P': * res.append(CigarOperation( * 'P', size, rpos, rpos, qpos, qpos, chrom, strand)) # <<<<<<<<<<<<<< * else: * raise ValueError, "Unknown CIGAR code '%s' encountered." % code */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1206, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - /* "HTSeq/_HTSeq.pyx":1205 + /* "HTSeq/_HTSeq.pyx":1217 * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) * elif code == 'P': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'P', size, rpos, rpos, qpos, qpos, chrom, strand)) * else: */ - __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_n_s_P); __Pyx_GIVEREF(__pyx_n_s_P); @@ -29321,13 +29088,13 @@ __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1205, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1217, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1204 + /* "HTSeq/_HTSeq.pyx":1216 * res.append(CigarOperation( * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) * elif code == 'P': # <<<<<<<<<<<<<< @@ -29337,7 +29104,7 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1208 + /* "HTSeq/_HTSeq.pyx":1220 * 'P', size, rpos, rpos, qpos, qpos, chrom, strand)) * else: * raise ValueError, "Unknown CIGAR code '%s' encountered." % code # <<<<<<<<<<<<<< @@ -29345,15 +29112,15 @@ * */ /*else*/ { - __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_CIGAR_code_s_encountered, __pyx_v_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1208, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_CIGAR_code_s_encountered, __pyx_v_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_13, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 1208, __pyx_L1_error) + __PYX_ERR(0, 1220, __pyx_L1_error) } __pyx_L7:; - /* "HTSeq/_HTSeq.pyx":1179 + /* "HTSeq/_HTSeq.pyx":1191 * qpos = 0 * res = [] * for code, size in cigar_pairs: # <<<<<<<<<<<<<< @@ -29363,7 +29130,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1209 + /* "HTSeq/_HTSeq.pyx":1221 * else: * raise ValueError, "Unknown CIGAR code '%s' encountered." % code * return res # <<<<<<<<<<<<<< @@ -29375,7 +29142,7 @@ __pyx_r = __pyx_v_res; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1172 + /* "HTSeq/_HTSeq.pyx":1184 * return build_cigar_list(cl, ref_left, chrom, strand) * * cpdef list build_cigar_list(list cigar_pairs, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -29457,7 +29224,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_cigar_list") < 0)) __PYX_ERR(0, 1172, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_cigar_list") < 0)) __PYX_ERR(0, 1184, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -29474,7 +29241,7 @@ } __pyx_v_cigar_pairs = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_ref_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ref_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1172, __pyx_L3_error) + __pyx_v_ref_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ref_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1184, __pyx_L3_error) } else { __pyx_v_ref_left = ((int)0); } @@ -29483,15 +29250,15 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("build_cigar_list", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1172, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("build_cigar_list", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1184, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.build_cigar_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigar_pairs), (&PyList_Type), 1, "cigar_pairs", 1))) __PYX_ERR(0, 1172, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyString_Type), 1, "chrom", 1))) __PYX_ERR(0, 1172, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyString_Type), 1, "strand", 1))) __PYX_ERR(0, 1172, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigar_pairs), (&PyList_Type), 1, "cigar_pairs", 1))) __PYX_ERR(0, 1184, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyString_Type), 1, "chrom", 1))) __PYX_ERR(0, 1184, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyString_Type), 1, "strand", 1))) __PYX_ERR(0, 1184, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_12build_cigar_list(__pyx_self, __pyx_v_cigar_pairs, __pyx_v_ref_left, __pyx_v_chrom, __pyx_v_strand); /* function exit code */ @@ -29514,7 +29281,7 @@ __pyx_t_2.ref_left = __pyx_v_ref_left; __pyx_t_2.chrom = __pyx_v_chrom; __pyx_t_2.strand = __pyx_v_strand; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(__pyx_v_cigar_pairs, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1172, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(__pyx_v_cigar_pairs, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29531,7 +29298,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1211 +/* "HTSeq/_HTSeq.pyx":1223 * return res * * cdef _parse_SAM_optional_field_value(str field): # <<<<<<<<<<<<<< @@ -29549,55 +29316,55 @@ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - int __pyx_t_8; - PyObject *__pyx_t_9 = NULL; + PyObject *__pyx_t_8 = NULL; + int __pyx_t_9; __Pyx_RefNannySetupContext("_parse_SAM_optional_field_value", 0); - /* "HTSeq/_HTSeq.pyx":1212 + /* "HTSeq/_HTSeq.pyx":1224 * * cdef _parse_SAM_optional_field_value(str field): * if len(field) < 5 or field[2] != ':' or field[4] != ':': # <<<<<<<<<<<<<< * raise ValueError, "Malformatted SAM optional field '%'" % field * if field[3] == 'A': */ - __pyx_t_2 = PyObject_Length(__pyx_v_field); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_2 = PyObject_Length(__pyx_v_field); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1224, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 < 5) != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__21, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__16, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__21, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_kp_s__16, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "HTSeq/_HTSeq.pyx":1213 + /* "HTSeq/_HTSeq.pyx":1225 * cdef _parse_SAM_optional_field_value(str field): * if len(field) < 5 or field[2] != ':' or field[4] != ':': * raise ValueError, "Malformatted SAM optional field '%'" % field # <<<<<<<<<<<<<< * if field[3] == 'A': * return field[5] */ - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Malformatted_SAM_optional_field, __pyx_v_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Malformatted_SAM_optional_field, __pyx_v_field); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1225, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_4, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(0, 1213, __pyx_L1_error) + __PYX_ERR(0, 1225, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1212 + /* "HTSeq/_HTSeq.pyx":1224 * * cdef _parse_SAM_optional_field_value(str field): * if len(field) < 5 or field[2] != ':' or field[4] != ':': # <<<<<<<<<<<<<< @@ -29606,20 +29373,20 @@ */ } - /* "HTSeq/_HTSeq.pyx":1214 + /* "HTSeq/_HTSeq.pyx":1226 * if len(field) < 5 or field[2] != ':' or field[4] != ':': * raise ValueError, "Malformatted SAM optional field '%'" % field * if field[3] == 'A': # <<<<<<<<<<<<<< * return field[5] * elif field[3] == 'i': */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_A, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_A, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1226, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1215 + /* "HTSeq/_HTSeq.pyx":1227 * raise ValueError, "Malformatted SAM optional field '%'" % field * if field[3] == 'A': * return field[5] # <<<<<<<<<<<<<< @@ -29627,13 +29394,13 @@ * return int(field[5:]) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1227, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1214 + /* "HTSeq/_HTSeq.pyx":1226 * if len(field) < 5 or field[2] != ':' or field[4] != ':': * raise ValueError, "Malformatted SAM optional field '%'" % field * if field[3] == 'A': # <<<<<<<<<<<<<< @@ -29642,20 +29409,20 @@ */ } - /* "HTSeq/_HTSeq.pyx":1216 + /* "HTSeq/_HTSeq.pyx":1228 * if field[3] == 'A': * return field[5] * elif field[3] == 'i': # <<<<<<<<<<<<<< * return int(field[5:]) * elif field[3] == 'f': */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_i, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1228, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1217 + /* "HTSeq/_HTSeq.pyx":1229 * return field[5] * elif field[3] == 'i': * return int(field[5:]) # <<<<<<<<<<<<<< @@ -29665,18 +29432,18 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1217, __pyx_L1_error) + __PYX_ERR(0, 1229, __pyx_L1_error) } - __pyx_t_4 = PySequence_GetSlice(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1217, __pyx_L1_error) + __pyx_t_4 = PySequence_GetSlice(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1217, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1216 + /* "HTSeq/_HTSeq.pyx":1228 * if field[3] == 'A': * return field[5] * elif field[3] == 'i': # <<<<<<<<<<<<<< @@ -29685,20 +29452,20 @@ */ } - /* "HTSeq/_HTSeq.pyx":1218 + /* "HTSeq/_HTSeq.pyx":1230 * elif field[3] == 'i': * return int(field[5:]) * elif field[3] == 'f': # <<<<<<<<<<<<<< * return float(field[5:]) * elif field[3] == 'Z': */ - __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error) + __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_f, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1218, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_5, __pyx_n_s_f, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1219 + /* "HTSeq/_HTSeq.pyx":1231 * return int(field[5:]) * elif field[3] == 'f': * return float(field[5:]) # <<<<<<<<<<<<<< @@ -29708,18 +29475,18 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1219, __pyx_L1_error) + __PYX_ERR(0, 1231, __pyx_L1_error) } - __pyx_t_5 = PySequence_GetSlice(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1219, __pyx_L1_error) + __pyx_t_5 = PySequence_GetSlice(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1219, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyNumber_Float(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1231, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1218 + /* "HTSeq/_HTSeq.pyx":1230 * elif field[3] == 'i': * return int(field[5:]) * elif field[3] == 'f': # <<<<<<<<<<<<<< @@ -29728,20 +29495,20 @@ */ } - /* "HTSeq/_HTSeq.pyx":1220 + /* "HTSeq/_HTSeq.pyx":1232 * elif field[3] == 'f': * return float(field[5:]) * elif field[3] == 'Z': # <<<<<<<<<<<<<< * return field[5:] * elif field[3] == 'H': */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_Z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_Z, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1232, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1221 + /* "HTSeq/_HTSeq.pyx":1233 * return float(field[5:]) * elif field[3] == 'Z': * return field[5:] # <<<<<<<<<<<<<< @@ -29751,15 +29518,15 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1221, __pyx_L1_error) + __PYX_ERR(0, 1233, __pyx_L1_error) } - __pyx_t_4 = PySequence_GetSlice(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_t_4 = PySequence_GetSlice(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1220 + /* "HTSeq/_HTSeq.pyx":1232 * elif field[3] == 'f': * return float(field[5:]) * elif field[3] == 'Z': # <<<<<<<<<<<<<< @@ -29768,20 +29535,20 @@ */ } - /* "HTSeq/_HTSeq.pyx":1222 + /* "HTSeq/_HTSeq.pyx":1234 * elif field[3] == 'Z': * return field[5:] * elif field[3] == 'H': # <<<<<<<<<<<<<< * return int(field[5:], 16) * elif field[3] == 'B': */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1222, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1234, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_H, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1222, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_H, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1234, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1223 + /* "HTSeq/_HTSeq.pyx":1235 * return field[5:] * elif field[3] == 'H': * return int(field[5:], 16) # <<<<<<<<<<<<<< @@ -29791,11 +29558,11 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1223, __pyx_L1_error) + __PYX_ERR(0, 1235, __pyx_L1_error) } - __pyx_t_4 = PySequence_GetSlice(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_4 = PySequence_GetSlice(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); @@ -29803,14 +29570,14 @@ __Pyx_GIVEREF(__pyx_int_16); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_16); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1222 + /* "HTSeq/_HTSeq.pyx":1234 * elif field[3] == 'Z': * return field[5:] * elif field[3] == 'H': # <<<<<<<<<<<<<< @@ -29819,33 +29586,33 @@ */ } - /* "HTSeq/_HTSeq.pyx":1224 + /* "HTSeq/_HTSeq.pyx":1236 * elif field[3] == 'H': * return int(field[5:], 16) * elif field[3] == 'B': # <<<<<<<<<<<<<< * if field[5] == 'f': * return numpy.array(field[7:].split(','), float) */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1236, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_B, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1224, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_B, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1236, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (likely(__pyx_t_1)) { - /* "HTSeq/_HTSeq.pyx":1225 + /* "HTSeq/_HTSeq.pyx":1237 * return int(field[5:], 16) * elif field[3] == 'B': * if field[5] == 'f': # <<<<<<<<<<<<<< * return numpy.array(field[7:].split(','), float) * else: */ - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_f, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_n_s_f, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1226 + /* "HTSeq/_HTSeq.pyx":1238 * elif field[3] == 'B': * if field[5] == 'f': * return numpy.array(field[7:].split(','), float) # <<<<<<<<<<<<<< @@ -29853,75 +29620,87 @@ * return numpy.array(field[7:].split(','), int) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1226, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1226, __pyx_L1_error) + __PYX_ERR(0, 1238, __pyx_L1_error) } - __pyx_t_5 = PySequence_GetSlice(__pyx_v_field, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1226, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_t_7 = PySequence_GetSlice(__pyx_v_field, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1226, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_7, __pyx_kp_s__17) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s__17); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); - __pyx_t_8 = 1; + __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, ((PyObject *)(&PyFloat_Type))}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1226, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, ((PyObject *)(&PyFloat_Type))}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_5, ((PyObject *)(&PyFloat_Type))}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1226, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_5, ((PyObject *)(&PyFloat_Type))}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else #endif { - __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1226, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - if (__pyx_t_7) { - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL; + __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1238, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_t_5); __Pyx_INCREF(((PyObject *)(&PyFloat_Type))); __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type))); - PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, ((PyObject *)(&PyFloat_Type))); + PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, ((PyObject *)(&PyFloat_Type))); __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1226, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1238, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1225 + /* "HTSeq/_HTSeq.pyx":1237 * return int(field[5:], 16) * elif field[3] == 'B': * if field[5] == 'f': # <<<<<<<<<<<<<< @@ -29930,7 +29709,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1228 + /* "HTSeq/_HTSeq.pyx":1240 * return numpy.array(field[7:].split(','), float) * else: * return numpy.array(field[7:].split(','), int) # <<<<<<<<<<<<<< @@ -29939,76 +29718,88 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1228, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1228, __pyx_L1_error) + __PYX_ERR(0, 1240, __pyx_L1_error) } - __pyx_t_6 = PySequence_GetSlice(__pyx_v_field, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_split); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L1_error) + __pyx_t_5 = PySequence_GetSlice(__pyx_v_field, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_split); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; - __pyx_t_8 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_9, function); - __pyx_t_8 = 1; + __Pyx_DECREF_SET(__pyx_t_8, function); + } + } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_5, __pyx_kp_s__17) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_kp_s__17); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; + __pyx_t_9 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_8)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_7, function); + __pyx_t_9 = 1; } } #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_9)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, ((PyObject *)(&PyInt_Type))}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (PyFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, ((PyObject *)(&PyInt_Type))}; + __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, ((PyObject *)(&PyInt_Type))}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { + PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, ((PyObject *)(&PyInt_Type))}; + __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1228, __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; + __pyx_t_5 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (__pyx_t_8) { + __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL; } __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_9, __pyx_t_6); __Pyx_INCREF(((PyObject *)(&PyInt_Type))); __Pyx_GIVEREF(((PyObject *)(&PyInt_Type))); - PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, ((PyObject *)(&PyInt_Type))); + PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_9, ((PyObject *)(&PyInt_Type))); __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1228, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; } - /* "HTSeq/_HTSeq.pyx":1224 + /* "HTSeq/_HTSeq.pyx":1236 * elif field[3] == 'H': * return int(field[5:], 16) * elif field[3] == 'B': # <<<<<<<<<<<<<< @@ -30017,7 +29808,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1230 + /* "HTSeq/_HTSeq.pyx":1242 * return numpy.array(field[7:].split(','), int) * else: * raise ValueError, "SAM optional field with illegal type letter '%s'" % field[2] # <<<<<<<<<<<<<< @@ -30025,17 +29816,17 @@ * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] */ /*else*/ { - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1230, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_field, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1242, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_SAM_optional_field_with_illegal, __pyx_t_4); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1230, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_7 = __Pyx_PyString_FormatSafe(__pyx_kp_s_SAM_optional_field_with_illegal, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1242, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_9, 0, 0); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __PYX_ERR(0, 1230, __pyx_L1_error) + __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_7, 0, 0); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __PYX_ERR(0, 1242, __pyx_L1_error) } - /* "HTSeq/_HTSeq.pyx":1211 + /* "HTSeq/_HTSeq.pyx":1223 * return res * * cdef _parse_SAM_optional_field_value(str field): # <<<<<<<<<<<<<< @@ -30049,7 +29840,7 @@ __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("HTSeq._HTSeq._parse_SAM_optional_field_value", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -30058,7 +29849,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1246 +/* "HTSeq/_HTSeq.pyx":1258 * """ * * def to_pysam_AlignedSegment(self, sf): # <<<<<<<<<<<<<< @@ -30094,12 +29885,13 @@ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; + PyObject *__pyx_t_10 = NULL; int __pyx_t_11; - Py_ssize_t __pyx_t_12; + int __pyx_t_12; + Py_ssize_t __pyx_t_13; __Pyx_RefNannySetupContext("to_pysam_AlignedSegment", 0); - /* "HTSeq/_HTSeq.pyx":1247 + /* "HTSeq/_HTSeq.pyx":1259 * * def to_pysam_AlignedSegment(self, sf): * try: # <<<<<<<<<<<<<< @@ -30115,19 +29907,19 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "HTSeq/_HTSeq.pyx":1248 + /* "HTSeq/_HTSeq.pyx":1260 * def to_pysam_AlignedSegment(self, sf): * try: * import pysam # <<<<<<<<<<<<<< * except ImportError: * sys.stderr.write( */ - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pysam, 0, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1248, __pyx_L3_error) + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pysam, 0, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1260, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_pysam = __pyx_t_4; __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1247 + /* "HTSeq/_HTSeq.pyx":1259 * * def to_pysam_AlignedSegment(self, sf): * try: # <<<<<<<<<<<<<< @@ -30142,7 +29934,7 @@ __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1249 + /* "HTSeq/_HTSeq.pyx":1261 * try: * import pysam * except ImportError: # <<<<<<<<<<<<<< @@ -30152,32 +29944,44 @@ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_5) { __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.to_pysam_AlignedSegment", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1249, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1261, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "HTSeq/_HTSeq.pyx":1250 + /* "HTSeq/_HTSeq.pyx":1262 * import pysam * except ImportError: * sys.stderr.write( # <<<<<<<<<<<<<< * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") * raise */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1250, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_stderr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1250, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1262, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1250, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1262, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1250, __pyx_L5_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1262, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_kp_s_Please_Install_PySam_to_use_this) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_s_Please_Install_PySam_to_use_this); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1262, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "HTSeq/_HTSeq.pyx":1252 + /* "HTSeq/_HTSeq.pyx":1264 * sys.stderr.write( * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") * raise # <<<<<<<<<<<<<< @@ -30189,12 +29993,12 @@ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_6, __pyx_t_7); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; - __PYX_ERR(0, 1252, __pyx_L5_except_error) + __PYX_ERR(0, 1264, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "HTSeq/_HTSeq.pyx":1247 + /* "HTSeq/_HTSeq.pyx":1259 * * def to_pysam_AlignedSegment(self, sf): * try: # <<<<<<<<<<<<<< @@ -30209,14 +30013,14 @@ __pyx_L8_try_end:; } - /* "HTSeq/_HTSeq.pyx":1254 + /* "HTSeq/_HTSeq.pyx":1266 * raise * * a = pysam.AlignedSegment() # <<<<<<<<<<<<<< * a.query_sequence = self.read.seq if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().seq * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pysam, __pyx_n_s_AlignedSegment); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1254, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pysam, __pyx_n_s_AlignedSegment); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -30228,169 +30032,160 @@ __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1254, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1254, __pyx_L1_error) - } + __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a = __pyx_t_7; __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1255 + /* "HTSeq/_HTSeq.pyx":1267 * * a = pysam.AlignedSegment() * a.query_sequence = self.read.seq if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().seq # <<<<<<<<<<<<<< * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual * a.query_name = self.read.name */ - __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1255, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!__pyx_t_11) { + if (!__pyx_t_12) { } else { - __pyx_t_10 = __pyx_t_11; + __pyx_t_11 = __pyx_t_12; goto __pyx_L11_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_6, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_10 = __pyx_t_11; + __pyx_t_11 = __pyx_t_12; __pyx_L11_bool_binop_done:; - if (__pyx_t_10) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1255, __pyx_L1_error) + if (__pyx_t_11) { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_seq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_seq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __pyx_t_4; __pyx_t_4 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1255, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_9, function); + __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1267, __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_seq); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1255, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_seq); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1267, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __pyx_t_9; - __pyx_t_9 = 0; + __pyx_t_7 = __pyx_t_8; + __pyx_t_8 = 0; } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_sequence, __pyx_t_7) < 0) __PYX_ERR(0, 1255, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_sequence, __pyx_t_7) < 0) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1256 + /* "HTSeq/_HTSeq.pyx":1268 * a = pysam.AlignedSegment() * a.query_sequence = self.read.seq if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().seq * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual # <<<<<<<<<<<<<< * a.query_name = self.read.name * a.flag = self.flag */ - __pyx_t_9 = PyObject_RichCompare(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1256, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1256, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (!__pyx_t_11) { + __pyx_t_8 = PyObject_RichCompare(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1268, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_12) { } else { - __pyx_t_10 = __pyx_t_11; + __pyx_t_11 = __pyx_t_12; goto __pyx_L13_bool_binop_done; } - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1256, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_11 = (__Pyx_PyString_Equals(__pyx_t_9, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1256, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_10 = __pyx_t_11; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = (__Pyx_PyString_Equals(__pyx_t_8, __pyx_kp_s__8, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1268, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = __pyx_t_12; __pyx_L13_bool_binop_done:; - if (__pyx_t_10) { - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1256, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_qual); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error) + if (__pyx_t_11) { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_qual); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = __pyx_t_4; __pyx_t_4 = 0; } else { - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1256, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_9)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_9) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L1_error) - } + __pyx_t_4 = (__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_4)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_qual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_qual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __pyx_t_6; __pyx_t_6 = 0; } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_qualities, __pyx_t_7) < 0) __PYX_ERR(0, 1256, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_qualities, __pyx_t_7) < 0) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1257 + /* "HTSeq/_HTSeq.pyx":1269 * a.query_sequence = self.read.seq if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().seq * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual * a.query_name = self.read.name # <<<<<<<<<<<<<< * a.flag = self.flag * a.tags = self.optional_fields */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1257, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1257, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_name, __pyx_t_6) < 0) __PYX_ERR(0, 1257, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_name, __pyx_t_6) < 0) __PYX_ERR(0, 1269, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1258 + /* "HTSeq/_HTSeq.pyx":1270 * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual * a.query_name = self.read.name * a.flag = self.flag # <<<<<<<<<<<<<< * a.tags = self.optional_fields * if self.aligned: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1258, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1259 + /* "HTSeq/_HTSeq.pyx":1271 * a.query_name = self.read.name * a.flag = self.flag * a.tags = self.optional_fields # <<<<<<<<<<<<<< @@ -30399,33 +30194,33 @@ */ __pyx_t_6 = __pyx_v_self->optional_fields; __Pyx_INCREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tags, __pyx_t_6) < 0) __PYX_ERR(0, 1259, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tags, __pyx_t_6) < 0) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1260 + /* "HTSeq/_HTSeq.pyx":1272 * a.flag = self.flag * a.tags = self.optional_fields * if self.aligned: # <<<<<<<<<<<<<< * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1272, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_10) { + if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1261 + /* "HTSeq/_HTSeq.pyx":1273 * a.tags = self.optional_fields * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.reference_start = self.iv.start */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "HTSeq/_HTSeq.pyx":1262 + /* "HTSeq/_HTSeq.pyx":1274 * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] # <<<<<<<<<<<<<< @@ -30434,49 +30229,49 @@ */ if (unlikely(__pyx_v_self->cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1262, __pyx_L1_error) + __PYX_ERR(0, 1274, __pyx_L1_error) } - __pyx_t_7 = __pyx_v_self->cigar; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0; + __pyx_t_7 = __pyx_v_self->cigar; __Pyx_INCREF(__pyx_t_7); __pyx_t_13 = 0; for (;;) { - if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_7)) break; + if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1262, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1274, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1274, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1261 + /* "HTSeq/_HTSeq.pyx":1273 * a.tags = self.optional_fields * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.reference_start = self.iv.start */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_code_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1261, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cigar_operation_code_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_type_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1261, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_type_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1261, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1273, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9); - __pyx_t_8 = 0; + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8); __pyx_t_9 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_8 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1262 + /* "HTSeq/_HTSeq.pyx":1274 * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] # <<<<<<<<<<<<<< @@ -30486,36 +30281,36 @@ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1261 + /* "HTSeq/_HTSeq.pyx":1273 * a.tags = self.optional_fields * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.reference_start = self.iv.start */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_cigartuples, __pyx_t_6) < 0) __PYX_ERR(0, 1261, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_cigartuples, __pyx_t_6) < 0) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1263 + /* "HTSeq/_HTSeq.pyx":1275 * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] * a.reference_start = self.iv.start # <<<<<<<<<<<<<< * a.reference_id = sf.gettid(self.iv.chrom) * a.template_length = self.inferred_insert_size */ - __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->__pyx_base.__pyx_base.iv->start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->__pyx_base.__pyx_base.iv->start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_start, __pyx_t_6) < 0) __PYX_ERR(0, 1263, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_start, __pyx_t_6) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1264 + /* "HTSeq/_HTSeq.pyx":1276 * for c in self.cigar] * a.reference_start = self.iv.start * a.reference_id = sf.gettid(self.iv.chrom) # <<<<<<<<<<<<<< * a.template_length = self.inferred_insert_size * a.mapping_quality = self.aQual */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1264, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -30527,67 +30322,39 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1264, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_id, __pyx_t_6) < 0) __PYX_ERR(0, 1264, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_id, __pyx_t_6) < 0) __PYX_ERR(0, 1276, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1265 + /* "HTSeq/_HTSeq.pyx":1277 * a.reference_start = self.iv.start * a.reference_id = sf.gettid(self.iv.chrom) * a.template_length = self.inferred_insert_size # <<<<<<<<<<<<<< * a.mapping_quality = self.aQual * else: */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_template_length, __pyx_t_6) < 0) __PYX_ERR(0, 1265, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_template_length, __pyx_t_6) < 0) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1266 + /* "HTSeq/_HTSeq.pyx":1278 * a.reference_id = sf.gettid(self.iv.chrom) * a.template_length = self.inferred_insert_size * a.mapping_quality = self.aQual # <<<<<<<<<<<<<< * else: * a.reference_start = -1 */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mapping_quality, __pyx_t_6) < 0) __PYX_ERR(0, 1266, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mapping_quality, __pyx_t_6) < 0) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1260 + /* "HTSeq/_HTSeq.pyx":1272 * a.flag = self.flag * a.tags = self.optional_fields * if self.aligned: # <<<<<<<<<<<<<< @@ -30597,7 +30364,7 @@ goto __pyx_L15; } - /* "HTSeq/_HTSeq.pyx":1268 + /* "HTSeq/_HTSeq.pyx":1280 * a.mapping_quality = self.aQual * else: * a.reference_start = -1 # <<<<<<<<<<<<<< @@ -30605,100 +30372,72 @@ * if self.mate_aligned: */ /*else*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_start, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1268, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_start, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1280, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1269 + /* "HTSeq/_HTSeq.pyx":1281 * else: * a.reference_start = -1 * a.reference_id = -1 # <<<<<<<<<<<<<< * if self.mate_aligned: * a.next_reference_id = sf.gettid(self.mate_start.chrom) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_id, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1269, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_id, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1281, __pyx_L1_error) } __pyx_L15:; - /* "HTSeq/_HTSeq.pyx":1270 + /* "HTSeq/_HTSeq.pyx":1282 * a.reference_start = -1 * a.reference_id = -1 * if self.mate_aligned: # <<<<<<<<<<<<<< * a.next_reference_id = sf.gettid(self.mate_start.chrom) * a.next_reference_start = self.mate_start.start */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mate_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mate_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1282, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1270, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1282, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_10) { + if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1271 + /* "HTSeq/_HTSeq.pyx":1283 * a.reference_id = -1 * if self.mate_aligned: * a.next_reference_id = sf.gettid(self.mate_start.chrom) # <<<<<<<<<<<<<< * a.next_reference_start = self.mate_start.start * else: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1271, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_9)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_9) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->mate_start->__pyx_base.chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1271, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_self->mate_start->__pyx_base.chrom}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1271, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_self->mate_start->__pyx_base.chrom}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1271, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1271, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_INCREF(__pyx_v_self->mate_start->__pyx_base.chrom); - __Pyx_GIVEREF(__pyx_v_self->mate_start->__pyx_base.chrom); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self->mate_start->__pyx_base.chrom); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1271, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->mate_start->__pyx_base.chrom) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->mate_start->__pyx_base.chrom); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1283, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_id, __pyx_t_6) < 0) __PYX_ERR(0, 1271, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_id, __pyx_t_6) < 0) __PYX_ERR(0, 1283, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1272 + /* "HTSeq/_HTSeq.pyx":1284 * if self.mate_aligned: * a.next_reference_id = sf.gettid(self.mate_start.chrom) * a.next_reference_start = self.mate_start.start # <<<<<<<<<<<<<< * else: * a.next_reference_id = -1 */ - __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->mate_start->__pyx_base.start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->mate_start->__pyx_base.start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_start, __pyx_t_6) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_start, __pyx_t_6) < 0) __PYX_ERR(0, 1284, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1270 + /* "HTSeq/_HTSeq.pyx":1282 * a.reference_start = -1 * a.reference_id = -1 * if self.mate_aligned: # <<<<<<<<<<<<<< @@ -30708,7 +30447,7 @@ goto __pyx_L18; } - /* "HTSeq/_HTSeq.pyx":1274 + /* "HTSeq/_HTSeq.pyx":1286 * a.next_reference_start = self.mate_start.start * else: * a.next_reference_id = -1 # <<<<<<<<<<<<<< @@ -30716,20 +30455,20 @@ * return a */ /*else*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_id, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1274, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_id, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1286, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1275 + /* "HTSeq/_HTSeq.pyx":1287 * else: * a.next_reference_id = -1 * a.next_reference_start = -1 # <<<<<<<<<<<<<< * return a * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_start, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_start, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1287, __pyx_L1_error) } __pyx_L18:; - /* "HTSeq/_HTSeq.pyx":1276 + /* "HTSeq/_HTSeq.pyx":1288 * a.next_reference_id = -1 * a.next_reference_start = -1 * return a # <<<<<<<<<<<<<< @@ -30741,7 +30480,7 @@ __pyx_r = __pyx_v_a; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1246 + /* "HTSeq/_HTSeq.pyx":1258 * """ * * def to_pysam_AlignedSegment(self, sf): # <<<<<<<<<<<<<< @@ -30756,6 +30495,7 @@ __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.to_pysam_AlignedSegment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -30767,7 +30507,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1278 +/* "HTSeq/_HTSeq.pyx":1290 * return a * * def to_pysam_AlignedRead(self, sf): # <<<<<<<<<<<<<< @@ -30803,11 +30543,12 @@ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; - Py_ssize_t __pyx_t_11; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; __Pyx_RefNannySetupContext("to_pysam_AlignedRead", 0); - /* "HTSeq/_HTSeq.pyx":1279 + /* "HTSeq/_HTSeq.pyx":1291 * * def to_pysam_AlignedRead(self, sf): * try: # <<<<<<<<<<<<<< @@ -30823,19 +30564,19 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "HTSeq/_HTSeq.pyx":1280 + /* "HTSeq/_HTSeq.pyx":1292 * def to_pysam_AlignedRead(self, sf): * try: * import pysam # <<<<<<<<<<<<<< * except ImportError: * sys.stderr.write( */ - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pysam, 0, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1280, __pyx_L3_error) + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pysam, 0, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1292, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_pysam = __pyx_t_4; __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1279 + /* "HTSeq/_HTSeq.pyx":1291 * * def to_pysam_AlignedRead(self, sf): * try: # <<<<<<<<<<<<<< @@ -30850,7 +30591,7 @@ __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1281 + /* "HTSeq/_HTSeq.pyx":1293 * try: * import pysam * except ImportError: # <<<<<<<<<<<<<< @@ -30860,32 +30601,44 @@ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_5) { __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.to_pysam_AlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1281, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1293, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "HTSeq/_HTSeq.pyx":1282 + /* "HTSeq/_HTSeq.pyx":1294 * import pysam * except ImportError: * sys.stderr.write( # <<<<<<<<<<<<<< * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") * raise */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1282, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_stderr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1282, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1294, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1282, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1294, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1282, __pyx_L5_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1294, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_kp_s_Please_Install_PySam_to_use_this) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_s_Please_Install_PySam_to_use_this); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1294, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "HTSeq/_HTSeq.pyx":1284 + /* "HTSeq/_HTSeq.pyx":1296 * sys.stderr.write( * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") * raise # <<<<<<<<<<<<<< @@ -30897,12 +30650,12 @@ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_6, __pyx_t_7); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; - __PYX_ERR(0, 1284, __pyx_L5_except_error) + __PYX_ERR(0, 1296, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "HTSeq/_HTSeq.pyx":1279 + /* "HTSeq/_HTSeq.pyx":1291 * * def to_pysam_AlignedRead(self, sf): * try: # <<<<<<<<<<<<<< @@ -30917,14 +30670,14 @@ __pyx_L8_try_end:; } - /* "HTSeq/_HTSeq.pyx":1286 + /* "HTSeq/_HTSeq.pyx":1298 * raise * * a = pysam.AlignedRead() # <<<<<<<<<<<<<< * a.seq = self.read.seq * a.qual = self.read.qualstr */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pysam, __pyx_n_s_AlignedRead); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1286, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pysam, __pyx_n_s_AlignedRead); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -30936,75 +30689,72 @@ __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1286, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1286, __pyx_L1_error) - } + __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a = __pyx_t_7; __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1287 + /* "HTSeq/_HTSeq.pyx":1299 * * a = pysam.AlignedRead() * a.seq = self.read.seq # <<<<<<<<<<<<<< * a.qual = self.read.qualstr * a.qname = self.read.name */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_seq); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_seq); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_seq, __pyx_t_6) < 0) __PYX_ERR(0, 1287, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_seq, __pyx_t_6) < 0) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1288 + /* "HTSeq/_HTSeq.pyx":1300 * a = pysam.AlignedRead() * a.seq = self.read.seq * a.qual = self.read.qualstr # <<<<<<<<<<<<<< * a.qname = self.read.name * a.flag = self.flag */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_qualstr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1288, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_qualstr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_qual, __pyx_t_7) < 0) __PYX_ERR(0, 1288, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_qual, __pyx_t_7) < 0) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1289 + /* "HTSeq/_HTSeq.pyx":1301 * a.seq = self.read.seq * a.qual = self.read.qualstr * a.qname = self.read.name # <<<<<<<<<<<<<< * a.flag = self.flag * a.tags = self.optional_fields */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1289, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1289, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_qname, __pyx_t_6) < 0) __PYX_ERR(0, 1289, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_qname, __pyx_t_6) < 0) __PYX_ERR(0, 1301, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1290 + /* "HTSeq/_HTSeq.pyx":1302 * a.qual = self.read.qualstr * a.qname = self.read.name * a.flag = self.flag # <<<<<<<<<<<<<< * a.tags = self.optional_fields * if self.aligned: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1290, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1290, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1291 + /* "HTSeq/_HTSeq.pyx":1303 * a.qname = self.read.name * a.flag = self.flag * a.tags = self.optional_fields # <<<<<<<<<<<<<< @@ -31013,33 +30763,33 @@ */ __pyx_t_6 = __pyx_v_self->optional_fields; __Pyx_INCREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tags, __pyx_t_6) < 0) __PYX_ERR(0, 1291, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tags, __pyx_t_6) < 0) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1292 + /* "HTSeq/_HTSeq.pyx":1304 * a.flag = self.flag * a.tags = self.optional_fields * if self.aligned: # <<<<<<<<<<<<<< * a.cigar = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_10) { + if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1293 + /* "HTSeq/_HTSeq.pyx":1305 * a.tags = self.optional_fields * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.pos = self.iv.start */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - /* "HTSeq/_HTSeq.pyx":1294 + /* "HTSeq/_HTSeq.pyx":1306 * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] # <<<<<<<<<<<<<< @@ -31048,49 +30798,49 @@ */ if (unlikely(__pyx_v_self->cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1294, __pyx_L1_error) + __PYX_ERR(0, 1306, __pyx_L1_error) } - __pyx_t_7 = __pyx_v_self->cigar; __Pyx_INCREF(__pyx_t_7); __pyx_t_11 = 0; + __pyx_t_7 = __pyx_v_self->cigar; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0; for (;;) { - if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_7)) break; + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1306, __pyx_L1_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1294, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1293 + /* "HTSeq/_HTSeq.pyx":1305 * a.tags = self.optional_fields * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.pos = self.iv.start */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_code_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cigar_operation_code_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_type_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1293, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_type_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1293, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1305, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9); - __pyx_t_8 = 0; + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8); __pyx_t_9 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_8 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1294 + /* "HTSeq/_HTSeq.pyx":1306 * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] # <<<<<<<<<<<<<< @@ -31100,36 +30850,36 @@ } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1293 + /* "HTSeq/_HTSeq.pyx":1305 * a.tags = self.optional_fields * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.pos = self.iv.start */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_cigar, __pyx_t_6) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_cigar, __pyx_t_6) < 0) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1295 + /* "HTSeq/_HTSeq.pyx":1307 * a.cigar = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] * a.pos = self.iv.start # <<<<<<<<<<<<<< * a.tid = sf.gettid(self.iv.chrom) * a.isize = self.inferred_insert_size */ - __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->__pyx_base.__pyx_base.iv->start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1295, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->__pyx_base.__pyx_base.iv->start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_pos, __pyx_t_6) < 0) __PYX_ERR(0, 1295, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_pos, __pyx_t_6) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1296 + /* "HTSeq/_HTSeq.pyx":1308 * for c in self.cigar] * a.pos = self.iv.start * a.tid = sf.gettid(self.iv.chrom) # <<<<<<<<<<<<<< * a.isize = self.inferred_insert_size * a.mapq = self.aQual */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1296, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -31141,67 +30891,39 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1308, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tid, __pyx_t_6) < 0) __PYX_ERR(0, 1296, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tid, __pyx_t_6) < 0) __PYX_ERR(0, 1308, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1297 + /* "HTSeq/_HTSeq.pyx":1309 * a.pos = self.iv.start * a.tid = sf.gettid(self.iv.chrom) * a.isize = self.inferred_insert_size # <<<<<<<<<<<<<< * a.mapq = self.aQual * else: */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_isize, __pyx_t_6) < 0) __PYX_ERR(0, 1297, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_isize, __pyx_t_6) < 0) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1298 + /* "HTSeq/_HTSeq.pyx":1310 * a.tid = sf.gettid(self.iv.chrom) * a.isize = self.inferred_insert_size * a.mapq = self.aQual # <<<<<<<<<<<<<< * else: * a.pos = -1 */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mapq, __pyx_t_6) < 0) __PYX_ERR(0, 1298, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mapq, __pyx_t_6) < 0) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1292 + /* "HTSeq/_HTSeq.pyx":1304 * a.flag = self.flag * a.tags = self.optional_fields * if self.aligned: # <<<<<<<<<<<<<< @@ -31211,7 +30933,7 @@ goto __pyx_L11; } - /* "HTSeq/_HTSeq.pyx":1300 + /* "HTSeq/_HTSeq.pyx":1312 * a.mapq = self.aQual * else: * a.pos = -1 # <<<<<<<<<<<<<< @@ -31219,100 +30941,72 @@ * if self.mate_aligned: */ /*else*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_pos, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1300, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_pos, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1312, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1301 + /* "HTSeq/_HTSeq.pyx":1313 * else: * a.pos = -1 * a.tid = -1 # <<<<<<<<<<<<<< * if self.mate_aligned: * a.mrnm = sf.gettid(self.mate_start.chrom) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tid, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1301, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tid, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1313, __pyx_L1_error) } __pyx_L11:; - /* "HTSeq/_HTSeq.pyx":1302 + /* "HTSeq/_HTSeq.pyx":1314 * a.pos = -1 * a.tid = -1 * if self.mate_aligned: # <<<<<<<<<<<<<< * a.mrnm = sf.gettid(self.mate_start.chrom) * a.mpos = self.mate_start.start */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mate_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mate_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1302, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1314, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_10) { + if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1303 + /* "HTSeq/_HTSeq.pyx":1315 * a.tid = -1 * if self.mate_aligned: * a.mrnm = sf.gettid(self.mate_start.chrom) # <<<<<<<<<<<<<< * a.mpos = self.mate_start.start * else: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1303, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_9)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_9) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->mate_start->__pyx_base.chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_self->mate_start->__pyx_base.chrom}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_self->mate_start->__pyx_base.chrom}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1303, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_INCREF(__pyx_v_self->mate_start->__pyx_base.chrom); - __Pyx_GIVEREF(__pyx_v_self->mate_start->__pyx_base.chrom); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self->mate_start->__pyx_base.chrom); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->mate_start->__pyx_base.chrom) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->mate_start->__pyx_base.chrom); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1315, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mrnm, __pyx_t_6) < 0) __PYX_ERR(0, 1303, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mrnm, __pyx_t_6) < 0) __PYX_ERR(0, 1315, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1304 + /* "HTSeq/_HTSeq.pyx":1316 * if self.mate_aligned: * a.mrnm = sf.gettid(self.mate_start.chrom) * a.mpos = self.mate_start.start # <<<<<<<<<<<<<< * else: * a.mrnm = -1 */ - __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->mate_start->__pyx_base.start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->mate_start->__pyx_base.start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mpos, __pyx_t_6) < 0) __PYX_ERR(0, 1304, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mpos, __pyx_t_6) < 0) __PYX_ERR(0, 1316, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1302 + /* "HTSeq/_HTSeq.pyx":1314 * a.pos = -1 * a.tid = -1 * if self.mate_aligned: # <<<<<<<<<<<<<< @@ -31322,7 +31016,7 @@ goto __pyx_L14; } - /* "HTSeq/_HTSeq.pyx":1306 + /* "HTSeq/_HTSeq.pyx":1318 * a.mpos = self.mate_start.start * else: * a.mrnm = -1 # <<<<<<<<<<<<<< @@ -31330,20 +31024,20 @@ * return a */ /*else*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mrnm, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mrnm, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1318, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1307 + /* "HTSeq/_HTSeq.pyx":1319 * else: * a.mrnm = -1 * a.mpos = -1 # <<<<<<<<<<<<<< * return a * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mpos, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mpos, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1319, __pyx_L1_error) } __pyx_L14:; - /* "HTSeq/_HTSeq.pyx":1308 + /* "HTSeq/_HTSeq.pyx":1320 * a.mrnm = -1 * a.mpos = -1 * return a # <<<<<<<<<<<<<< @@ -31355,7 +31049,7 @@ __pyx_r = __pyx_v_a; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1278 + /* "HTSeq/_HTSeq.pyx":1290 * return a * * def to_pysam_AlignedRead(self, sf): # <<<<<<<<<<<<<< @@ -31370,6 +31064,7 @@ __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.to_pysam_AlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -31381,7 +31076,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1311 +/* "HTSeq/_HTSeq.pyx":1323 * * @classmethod * def from_pysam_AlignedRead(cls, read, samfile): # <<<<<<<<<<<<<< @@ -31420,11 +31115,11 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedRead", 1, 2, 2, 1); __PYX_ERR(0, 1311, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedRead", 1, 2, 2, 1); __PYX_ERR(0, 1323, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_pysam_AlignedRead") < 0)) __PYX_ERR(0, 1311, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_pysam_AlignedRead") < 0)) __PYX_ERR(0, 1323, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -31437,7 +31132,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedRead", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1311, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedRead", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1323, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -31466,9 +31161,9 @@ int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); @@ -31477,16 +31172,16 @@ int __pyx_t_15; __Pyx_RefNannySetupContext("from_pysam_AlignedRead", 0); - /* "HTSeq/_HTSeq.pyx":1312 + /* "HTSeq/_HTSeq.pyx":1324 * @classmethod * def from_pysam_AlignedRead(cls, read, samfile): * strand = "-" if read.is_reverse else "+" # <<<<<<<<<<<<<< * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1312, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1324, __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, 1312, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1324, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_kp_s__9); @@ -31498,30 +31193,30 @@ __pyx_v_strand = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1313 + /* "HTSeq/_HTSeq.pyx":1325 * def from_pysam_AlignedRead(cls, read, samfile): * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: # <<<<<<<<<<<<<< * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.pos, read.aend, strand) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1314 + /* "HTSeq/_HTSeq.pyx":1326 * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) # <<<<<<<<<<<<<< * iv = GenomicInterval(chrom, read.pos, read.aend, strand) * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1314, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1326, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -31533,77 +31228,47 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1314, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1314, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_chrom = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1315 + /* "HTSeq/_HTSeq.pyx":1327 * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.pos, read.aend, strand) # <<<<<<<<<<<<<< * else: * iv = None */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_aend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_aend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_INCREF(__pyx_v_strand); __Pyx_GIVEREF(__pyx_v_strand); - PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_strand); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_strand); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1313 + /* "HTSeq/_HTSeq.pyx":1325 * def from_pysam_AlignedRead(cls, read, samfile): * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: # <<<<<<<<<<<<<< @@ -31613,7 +31278,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1317 + /* "HTSeq/_HTSeq.pyx":1329 * iv = GenomicInterval(chrom, read.pos, read.aend, strand) * else: * iv = None # <<<<<<<<<<<<<< @@ -31626,50 +31291,50 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1318 + /* "HTSeq/_HTSeq.pyx":1330 * else: * iv = None * if read.qual != "*": # <<<<<<<<<<<<<< * seq = SequenceWithQualities(read.seq, read.qname, read.qual) * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__27, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__18, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1319 + /* "HTSeq/_HTSeq.pyx":1331 * iv = None * if read.qual != "*": * seq = SequenceWithQualities(read.seq, read.qname, read.qual) # <<<<<<<<<<<<<< * else: * seq = SequenceWithQualities( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_seq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1319, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1319, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_1); __pyx_t_2 = 0; - __pyx_t_7 = 0; + __pyx_t_5 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1319, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1331, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1318 + /* "HTSeq/_HTSeq.pyx":1330 * else: * iv = None * if read.qual != "*": # <<<<<<<<<<<<<< @@ -31679,7 +31344,7 @@ goto __pyx_L4; } - /* "HTSeq/_HTSeq.pyx":1321 + /* "HTSeq/_HTSeq.pyx":1333 * seq = SequenceWithQualities(read.seq, read.qname, read.qual) * else: * seq = SequenceWithQualities( # <<<<<<<<<<<<<< @@ -31688,177 +31353,177 @@ */ /*else*/ { - /* "HTSeq/_HTSeq.pyx":1322 + /* "HTSeq/_HTSeq.pyx":1334 * else: * seq = SequenceWithQualities( * read.seq, read.qname, read.qual, "noquals") # <<<<<<<<<<<<<< * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1322, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - /* "HTSeq/_HTSeq.pyx":1321 + /* "HTSeq/_HTSeq.pyx":1333 * seq = SequenceWithQualities(read.seq, read.qname, read.qual) * else: * seq = SequenceWithQualities( # <<<<<<<<<<<<<< * read.seq, read.qname, read.qual, "noquals") * a = SAM_Alignment(seq, iv) */ - __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_t_5); __Pyx_INCREF(__pyx_n_s_noquals); __Pyx_GIVEREF(__pyx_n_s_noquals); PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_noquals); __pyx_t_1 = 0; + __pyx_t_6 = 0; __pyx_t_5 = 0; - __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1321, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_7); - __pyx_t_7 = 0; + __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_5); + __pyx_t_5 = 0; } __pyx_L4:; - /* "HTSeq/_HTSeq.pyx":1323 + /* "HTSeq/_HTSeq.pyx":1335 * seq = SequenceWithQualities( * read.seq, read.qname, read.qual, "noquals") * a = SAM_Alignment(seq, iv) # <<<<<<<<<<<<<< * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1323, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_seq)); __Pyx_GIVEREF(((PyObject *)__pyx_v_seq)); - PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_seq)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_seq)); __Pyx_INCREF(((PyObject *)__pyx_v_iv)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_iv)); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_a = ((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1325 + /* "HTSeq/_HTSeq.pyx":1337 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.isize * a.aQual = read.mapq */ - __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1325, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1325, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1337, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1324 + /* "HTSeq/_HTSeq.pyx":1336 * read.seq, read.qname, read.qual, "noquals") * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.isize */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1324, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1325 + /* "HTSeq/_HTSeq.pyx":1337 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.isize * a.aQual = read.mapq */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_cigar); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - 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; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_cigar); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { + __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0; + __pyx_t_8 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1337, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { - if (likely(!__pyx_t_9)) { + if (likely(!__pyx_t_8)) { if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_7 >= 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, 1325, __pyx_L1_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1337, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_7 >= 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, 1325, __pyx_L1_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1337, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); #endif } } else { - __pyx_t_5 = __pyx_t_9(__pyx_t_1); - if (unlikely(!__pyx_t_5)) { + __pyx_t_6 = __pyx_t_8(__pyx_t_1); + if (unlikely(!__pyx_t_6)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1325, __pyx_L1_error) + else __PYX_ERR(0, 1337, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_6); } - if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { - PyObject* sequence = __pyx_t_5; + if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { + PyObject* sequence = __pyx_t_6; 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, 1325, __pyx_L1_error) + __PYX_ERR(0, 1337, __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_9 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); + __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; - index = 0; __pyx_t_6 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); + index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1325, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1337, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L8_unpacking_done; @@ -31866,55 +31531,55 @@ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1325, __pyx_L1_error) + __PYX_ERR(0, 1337, __pyx_L1_error) __pyx_L8_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_6); - __pyx_t_6 = 0; + __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_9); + __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_10); __pyx_t_10 = 0; - /* "HTSeq/_HTSeq.pyx":1324 + /* "HTSeq/_HTSeq.pyx":1336 * read.seq, read.qname, read.qual, "noquals") * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.isize */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1324, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_code); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1324, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_code); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1324, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __Pyx_INCREF(__pyx_v_length); __Pyx_GIVEREF(__pyx_v_length); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_length); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_length); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1324, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1336, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1325 + /* "HTSeq/_HTSeq.pyx":1337 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.isize * a.aQual = read.mapq */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __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, 1325, __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, 1337, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_v_chrom)) { __Pyx_RaiseUnboundLocalError("chrom"); __PYX_ERR(0, 1325, __pyx_L1_error) } - if (!(likely(PyString_CheckExact(__pyx_v_chrom))||((__pyx_v_chrom) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_chrom)->tp_name), 0))) __PYX_ERR(0, 1325, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_v_strand))||((__pyx_v_strand) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_strand)->tp_name), 0))) __PYX_ERR(0, 1325, __pyx_L1_error) + if (unlikely(!__pyx_v_chrom)) { __Pyx_RaiseUnboundLocalError("chrom"); __PYX_ERR(0, 1337, __pyx_L1_error) } + if (!(likely(PyString_CheckExact(__pyx_v_chrom))||((__pyx_v_chrom) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_chrom)->tp_name), 0))) __PYX_ERR(0, 1337, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_strand))||((__pyx_v_strand) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_strand)->tp_name), 0))) __PYX_ERR(0, 1337, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1324 + /* "HTSeq/_HTSeq.pyx":1336 * read.seq, read.qname, read.qual, "noquals") * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -31925,27 +31590,27 @@ __pyx_t_14.ref_left = __pyx_t_13; __pyx_t_14.chrom = ((PyObject*)__pyx_v_chrom); __pyx_t_14.strand = ((PyObject*)__pyx_v_strand); - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(((PyObject*)__pyx_t_7), 0, &__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1324, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(((PyObject*)__pyx_t_5), 0, &__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1336, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } else { - /* "HTSeq/_HTSeq.pyx":1325 + /* "HTSeq/_HTSeq.pyx":1337 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.isize * a.aQual = read.mapq */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1325, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_t_1; __pyx_t_1 = 0; } - /* "HTSeq/_HTSeq.pyx":1324 + /* "HTSeq/_HTSeq.pyx":1336 * read.seq, read.qname, read.qual, "noquals") * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -31958,110 +31623,110 @@ __pyx_v_a->cigar = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1326 + /* "HTSeq/_HTSeq.pyx":1338 * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.isize # <<<<<<<<<<<<<< * a.aQual = read.mapq * a.flag = read.flag */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_isize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_isize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1338, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->inferred_insert_size = __pyx_t_13; - /* "HTSeq/_HTSeq.pyx":1327 + /* "HTSeq/_HTSeq.pyx":1339 * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.isize * a.aQual = read.mapq # <<<<<<<<<<<<<< * a.flag = read.flag * a.proper_pair = read.is_proper_pair */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mapq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mapq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1339, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->aQual = __pyx_t_13; - /* "HTSeq/_HTSeq.pyx":1328 + /* "HTSeq/_HTSeq.pyx":1340 * a.inferred_insert_size = read.isize * a.aQual = read.mapq * a.flag = read.flag # <<<<<<<<<<<<<< * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1328, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_a), __pyx_n_s_flag, __pyx_t_2) < 0) __PYX_ERR(0, 1328, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_a), __pyx_n_s_flag, __pyx_t_2) < 0) __PYX_ERR(0, 1340, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1329 + /* "HTSeq/_HTSeq.pyx":1341 * a.aQual = read.mapq * a.flag = read.flag * a.proper_pair = read.is_proper_pair # <<<<<<<<<<<<<< * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1329, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1341, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->proper_pair = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1330 + /* "HTSeq/_HTSeq.pyx":1342 * a.flag = read.flag * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary # <<<<<<<<<<<<<< * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1330, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1342, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->not_primary_alignment = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1331 + /* "HTSeq/_HTSeq.pyx":1343 * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail # <<<<<<<<<<<<<< * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_qcfail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1331, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_qcfail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1331, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1343, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->failed_platform_qc = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1332 + /* "HTSeq/_HTSeq.pyx":1344 * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate # <<<<<<<<<<<<<< * a.supplementary = read.is_supplementary * a.original_sam_line = "" */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_duplicate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_duplicate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1332, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1344, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->pcr_or_optical_duplicate = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1333 + /* "HTSeq/_HTSeq.pyx":1345 * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary # <<<<<<<<<<<<<< * a.original_sam_line = "" * a.optional_fields = read.tags */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1345, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1345, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->supplementary = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1334 + /* "HTSeq/_HTSeq.pyx":1346 * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary * a.original_sam_line = "" # <<<<<<<<<<<<<< @@ -32074,45 +31739,45 @@ __Pyx_DECREF(__pyx_v_a->original_sam_line); __pyx_v_a->original_sam_line = __pyx_kp_s__3; - /* "HTSeq/_HTSeq.pyx":1335 + /* "HTSeq/_HTSeq.pyx":1347 * a.supplementary = read.is_supplementary * a.original_sam_line = "" * a.optional_fields = read.tags # <<<<<<<<<<<<<< * if read.is_paired: * # These two should be but are not always consistent */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1335, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - 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, 1335, __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, 1347, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->optional_fields); __Pyx_DECREF(__pyx_v_a->optional_fields); __pyx_v_a->optional_fields = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1336 + /* "HTSeq/_HTSeq.pyx":1348 * a.original_sam_line = "" * a.optional_fields = read.tags * if read.is_paired: # <<<<<<<<<<<<<< * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1348, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1336, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1348, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1338 + /* "HTSeq/_HTSeq.pyx":1350 * if read.is_paired: * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): # <<<<<<<<<<<<<< * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __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, 1338, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = ((!__pyx_t_3) != 0); if (__pyx_t_15) { @@ -32120,26 +31785,27 @@ __pyx_t_4 = __pyx_t_15; goto __pyx_L11_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1350, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1338, __pyx_L1_error) + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1350, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __pyx_t_15; __pyx_L11_bool_binop_done:; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1339 + /* "HTSeq/_HTSeq.pyx":1351 * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" # <<<<<<<<<<<<<< * a.mate_start = GenomicPosition( * samfile.getrname(read.mrnm), read.mpos, strand) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1339, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1339, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1351, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { __Pyx_INCREF(__pyx_kp_s__9); @@ -32151,94 +31817,64 @@ __Pyx_DECREF_SET(__pyx_v_strand, __pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1341 + /* "HTSeq/_HTSeq.pyx":1353 * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition( * samfile.getrname(read.mrnm), read.mpos, strand) # <<<<<<<<<<<<<< * else: * a.mate_start = None */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1341, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = NULL; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1341, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1341, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mpos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1341, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mpos); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1353, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1340 + /* "HTSeq/_HTSeq.pyx":1352 * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition( # <<<<<<<<<<<<<< * samfile.getrname(read.mrnm), read.mpos, strand) * else: */ - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1340, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_INCREF(__pyx_v_strand); __Pyx_GIVEREF(__pyx_v_strand); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_strand); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_strand); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1340, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->mate_start); __Pyx_DECREF(((PyObject *)__pyx_v_a->mate_start)); __pyx_v_a->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1338 + /* "HTSeq/_HTSeq.pyx":1350 * if read.is_paired: * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): # <<<<<<<<<<<<<< @@ -32248,7 +31884,7 @@ goto __pyx_L10; } - /* "HTSeq/_HTSeq.pyx":1343 + /* "HTSeq/_HTSeq.pyx":1355 * samfile.getrname(read.mrnm), read.mpos, strand) * else: * a.mate_start = None # <<<<<<<<<<<<<< @@ -32264,36 +31900,36 @@ } __pyx_L10:; - /* "HTSeq/_HTSeq.pyx":1344 + /* "HTSeq/_HTSeq.pyx":1356 * else: * a.mate_start = None * if read.is_read1: # <<<<<<<<<<<<<< * a.pe_which = intern("first") * elif read.is_read2: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1344, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1344, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1356, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1345 + /* "HTSeq/_HTSeq.pyx":1357 * a.mate_start = None * if read.is_read1: * a.pe_which = intern("first") # <<<<<<<<<<<<<< * elif read.is_read2: * a.pe_which = intern("second") */ - __pyx_t_2 = __Pyx_Intern(__pyx_n_s_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1345, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_s_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1357, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1345, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1357, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); __pyx_v_a->pe_which = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1344 + /* "HTSeq/_HTSeq.pyx":1356 * else: * a.mate_start = None * if read.is_read1: # <<<<<<<<<<<<<< @@ -32303,36 +31939,36 @@ goto __pyx_L13; } - /* "HTSeq/_HTSeq.pyx":1346 + /* "HTSeq/_HTSeq.pyx":1358 * if read.is_read1: * a.pe_which = intern("first") * elif read.is_read2: # <<<<<<<<<<<<<< * a.pe_which = intern("second") * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1346, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1358, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1347 + /* "HTSeq/_HTSeq.pyx":1359 * a.pe_which = intern("first") * elif read.is_read2: * a.pe_which = intern("second") # <<<<<<<<<<<<<< * else: * a.pe_which = intern("unknown") */ - __pyx_t_2 = __Pyx_Intern(__pyx_n_s_second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1347, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_s_second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1347, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1359, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); __pyx_v_a->pe_which = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1346 + /* "HTSeq/_HTSeq.pyx":1358 * if read.is_read1: * a.pe_which = intern("first") * elif read.is_read2: # <<<<<<<<<<<<<< @@ -32342,7 +31978,7 @@ goto __pyx_L13; } - /* "HTSeq/_HTSeq.pyx":1349 + /* "HTSeq/_HTSeq.pyx":1361 * a.pe_which = intern("second") * else: * a.pe_which = intern("unknown") # <<<<<<<<<<<<<< @@ -32350,9 +31986,9 @@ * a.pe_which = intern("not_paired_end") */ /*else*/ { - __pyx_t_2 = __Pyx_Intern(__pyx_n_s_unknown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1349, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_s_unknown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1349, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1361, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); @@ -32361,7 +31997,7 @@ } __pyx_L13:; - /* "HTSeq/_HTSeq.pyx":1336 + /* "HTSeq/_HTSeq.pyx":1348 * a.original_sam_line = "" * a.optional_fields = read.tags * if read.is_paired: # <<<<<<<<<<<<<< @@ -32371,7 +32007,7 @@ goto __pyx_L9; } - /* "HTSeq/_HTSeq.pyx":1351 + /* "HTSeq/_HTSeq.pyx":1363 * a.pe_which = intern("unknown") * else: * a.pe_which = intern("not_paired_end") # <<<<<<<<<<<<<< @@ -32379,9 +32015,9 @@ * */ /*else*/ { - __pyx_t_2 = __Pyx_Intern(__pyx_n_s_not_paired_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1351, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_s_not_paired_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1351, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); @@ -32390,7 +32026,7 @@ } __pyx_L9:; - /* "HTSeq/_HTSeq.pyx":1352 + /* "HTSeq/_HTSeq.pyx":1364 * else: * a.pe_which = intern("not_paired_end") * return a # <<<<<<<<<<<<<< @@ -32402,7 +32038,7 @@ __pyx_r = ((PyObject *)__pyx_v_a); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1311 + /* "HTSeq/_HTSeq.pyx":1323 * * @classmethod * def from_pysam_AlignedRead(cls, read, samfile): # <<<<<<<<<<<<<< @@ -32416,7 +32052,7 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -32434,7 +32070,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1355 +/* "HTSeq/_HTSeq.pyx":1367 * * @classmethod * def from_pysam_AlignedSegment(cls, read, samfile): # <<<<<<<<<<<<<< @@ -32473,11 +32109,11 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedSegment", 1, 2, 2, 1); __PYX_ERR(0, 1355, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedSegment", 1, 2, 2, 1); __PYX_ERR(0, 1367, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_pysam_AlignedSegment") < 0)) __PYX_ERR(0, 1355, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_pysam_AlignedSegment") < 0)) __PYX_ERR(0, 1367, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -32490,7 +32126,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedSegment", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1355, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedSegment", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1367, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedSegment", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -32519,9 +32155,9 @@ int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); @@ -32530,16 +32166,16 @@ int __pyx_t_15; __Pyx_RefNannySetupContext("from_pysam_AlignedSegment", 0); - /* "HTSeq/_HTSeq.pyx":1356 + /* "HTSeq/_HTSeq.pyx":1368 * @classmethod * def from_pysam_AlignedSegment(cls, read, samfile): * strand = "-" if read.is_reverse else "+" # <<<<<<<<<<<<<< * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __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, 1356, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_kp_s__9); @@ -32551,30 +32187,30 @@ __pyx_v_strand = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1357 + /* "HTSeq/_HTSeq.pyx":1369 * def from_pysam_AlignedSegment(cls, read, samfile): * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: # <<<<<<<<<<<<<< * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.reference_start, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1357, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1357, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1369, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1358 + /* "HTSeq/_HTSeq.pyx":1370 * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) # <<<<<<<<<<<<<< * iv = GenomicInterval(chrom, read.reference_start, * read.reference_end, strand) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1358, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1370, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -32586,93 +32222,63 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1358, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1358, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1370, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_chrom = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1359 + /* "HTSeq/_HTSeq.pyx":1371 * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.reference_start, # <<<<<<<<<<<<<< * read.reference_end, strand) * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":1360 + /* "HTSeq/_HTSeq.pyx":1372 * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.reference_start, * read.reference_end, strand) # <<<<<<<<<<<<<< * else: * iv = None */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1359 + /* "HTSeq/_HTSeq.pyx":1371 * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.reference_start, # <<<<<<<<<<<<<< * read.reference_end, strand) * else: */ - __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_INCREF(__pyx_v_strand); __Pyx_GIVEREF(__pyx_v_strand); - PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_strand); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_strand); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1357 + /* "HTSeq/_HTSeq.pyx":1369 * def from_pysam_AlignedSegment(cls, read, samfile): * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: # <<<<<<<<<<<<<< @@ -32682,7 +32288,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1362 + /* "HTSeq/_HTSeq.pyx":1374 * read.reference_end, strand) * else: * iv = None # <<<<<<<<<<<<<< @@ -32695,31 +32301,31 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1364 + /* "HTSeq/_HTSeq.pyx":1376 * iv = None * seq = SequenceWithQualities( * read.query_sequence, read.query_name, '', "noquals") # <<<<<<<<<<<<<< * if read.query_qualities != None: * seq.qual = numpy.array(read.query_qualities) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_name); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1363 + /* "HTSeq/_HTSeq.pyx":1375 * else: * iv = None * seq = SequenceWithQualities( # <<<<<<<<<<<<<< * read.query_sequence, read.query_name, '', "noquals") * if read.query_qualities != None: */ - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_7); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5); __Pyx_INCREF(__pyx_kp_s__3); __Pyx_GIVEREF(__pyx_kp_s__3); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_s__3); @@ -32727,92 +32333,62 @@ __Pyx_GIVEREF(__pyx_n_s_noquals); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_noquals); __pyx_t_2 = 0; - __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1363, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_7); - __pyx_t_7 = 0; + __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_5); + __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1365 + /* "HTSeq/_HTSeq.pyx":1377 * seq = SequenceWithQualities( * read.query_sequence, read.query_name, '', "noquals") * if read.query_qualities != None: # <<<<<<<<<<<<<< * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_qualities); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1365, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_7, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1365, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_qualities); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = PyObject_RichCompare(__pyx_t_5, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1377, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1366 + /* "HTSeq/_HTSeq.pyx":1378 * read.query_sequence, read.query_name, '', "noquals") * if read.query_qualities != None: * seq.qual = numpy.array(read.query_qualities) # <<<<<<<<<<<<<< * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( */ - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1366, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_qualities); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1366, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_qualities); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_5)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1366, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_seq), __pyx_n_s_qual, __pyx_t_1) < 0) __PYX_ERR(0, 1366, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_seq), __pyx_n_s_qual, __pyx_t_1) < 0) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1365 + /* "HTSeq/_HTSeq.pyx":1377 * seq = SequenceWithQualities( * read.query_sequence, read.query_name, '', "noquals") * if read.query_qualities != None: # <<<<<<<<<<<<<< @@ -32821,14 +32397,14 @@ */ } - /* "HTSeq/_HTSeq.pyx":1367 + /* "HTSeq/_HTSeq.pyx":1379 * if read.query_qualities != None: * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) # <<<<<<<<<<<<<< * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_seq)); __Pyx_GIVEREF(((PyObject *)__pyx_v_seq)); @@ -32836,119 +32412,119 @@ __Pyx_INCREF(((PyObject *)__pyx_v_iv)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_a = ((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1369 + /* "HTSeq/_HTSeq.pyx":1381 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality */ - __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1369, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1368 + /* "HTSeq/_HTSeq.pyx":1380 * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.template_length */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":1369 + /* "HTSeq/_HTSeq.pyx":1381 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_cigartuples); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { - __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_cigartuples); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { + __pyx_t_6 = __pyx_t_5; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; + __pyx_t_8 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1381, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; for (;;) { - if (likely(!__pyx_t_9)) { - if (likely(PyList_CheckExact(__pyx_t_7))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break; + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1381, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break; + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1381, __pyx_L1_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); #endif } } else { - __pyx_t_6 = __pyx_t_9(__pyx_t_7); - if (unlikely(!__pyx_t_6)) { + __pyx_t_5 = __pyx_t_8(__pyx_t_6); + if (unlikely(!__pyx_t_5)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1369, __pyx_L1_error) + else __PYX_ERR(0, 1381, __pyx_L1_error) } break; } - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_5); } - if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { - PyObject* sequence = __pyx_t_6; + if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { + PyObject* sequence = __pyx_t_5; 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, 1369, __pyx_L1_error) + __PYX_ERR(0, 1381, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); #endif - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; - index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed; - __Pyx_GOTREF(__pyx_t_5); + index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L7_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L7_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1369, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1381, __pyx_L1_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L8_unpacking_done; @@ -32956,55 +32532,55 @@ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1369, __pyx_L1_error) + __PYX_ERR(0, 1381, __pyx_L1_error) __pyx_L8_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_code, __pyx_t_9); + __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_v_length, __pyx_t_10); __pyx_t_10 = 0; - /* "HTSeq/_HTSeq.pyx":1368 + /* "HTSeq/_HTSeq.pyx":1380 * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.template_length */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1368, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_code); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1368, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_v_code); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1368, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_10); __Pyx_INCREF(__pyx_v_length); __Pyx_GIVEREF(__pyx_v_length); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_length); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_length); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1368, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 1380, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1369 + /* "HTSeq/_HTSeq.pyx":1381 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1369, __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, 1369, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_v_chrom)) { __Pyx_RaiseUnboundLocalError("chrom"); __PYX_ERR(0, 1369, __pyx_L1_error) } - if (!(likely(PyString_CheckExact(__pyx_v_chrom))||((__pyx_v_chrom) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_chrom)->tp_name), 0))) __PYX_ERR(0, 1369, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_v_strand))||((__pyx_v_strand) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_strand)->tp_name), 0))) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_v_chrom)) { __Pyx_RaiseUnboundLocalError("chrom"); __PYX_ERR(0, 1381, __pyx_L1_error) } + if (!(likely(PyString_CheckExact(__pyx_v_chrom))||((__pyx_v_chrom) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_chrom)->tp_name), 0))) __PYX_ERR(0, 1381, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_strand))||((__pyx_v_strand) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_strand)->tp_name), 0))) __PYX_ERR(0, 1381, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1368 + /* "HTSeq/_HTSeq.pyx":1380 * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -33015,27 +32591,27 @@ __pyx_t_14.ref_left = __pyx_t_13; __pyx_t_14.chrom = ((PyObject*)__pyx_v_chrom); __pyx_t_14.strand = ((PyObject*)__pyx_v_strand); - __pyx_t_7 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(((PyObject*)__pyx_t_1), 0, &__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1368, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_6 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(((PyObject*)__pyx_t_1), 0, &__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1380, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_2 = __pyx_t_7; - __pyx_t_7 = 0; + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; } else { - /* "HTSeq/_HTSeq.pyx":1369 + /* "HTSeq/_HTSeq.pyx":1381 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1369, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_2 = __pyx_t_7; - __pyx_t_7 = 0; + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1381, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; } - /* "HTSeq/_HTSeq.pyx":1368 + /* "HTSeq/_HTSeq.pyx":1380 * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -33048,110 +32624,110 @@ __pyx_v_a->cigar = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1370 + /* "HTSeq/_HTSeq.pyx":1382 * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.template_length # <<<<<<<<<<<<<< * a.aQual = read.mapping_quality * a.flag = read.flag */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_template_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_template_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1382, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->inferred_insert_size = __pyx_t_13; - /* "HTSeq/_HTSeq.pyx":1371 + /* "HTSeq/_HTSeq.pyx":1383 * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality # <<<<<<<<<<<<<< * a.flag = read.flag * a.proper_pair = read.is_proper_pair */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mapping_quality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mapping_quality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->aQual = __pyx_t_13; - /* "HTSeq/_HTSeq.pyx":1372 + /* "HTSeq/_HTSeq.pyx":1384 * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality * a.flag = read.flag # <<<<<<<<<<<<<< * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_a), __pyx_n_s_flag, __pyx_t_2) < 0) __PYX_ERR(0, 1372, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_a), __pyx_n_s_flag, __pyx_t_2) < 0) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1373 + /* "HTSeq/_HTSeq.pyx":1385 * a.aQual = read.mapping_quality * a.flag = read.flag * a.proper_pair = read.is_proper_pair # <<<<<<<<<<<<<< * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1385, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->proper_pair = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1374 + /* "HTSeq/_HTSeq.pyx":1386 * a.flag = read.flag * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary # <<<<<<<<<<<<<< * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1374, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1374, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1386, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->not_primary_alignment = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1375 + /* "HTSeq/_HTSeq.pyx":1387 * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail # <<<<<<<<<<<<<< * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_qcfail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_qcfail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1375, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->failed_platform_qc = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1376 + /* "HTSeq/_HTSeq.pyx":1388 * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate # <<<<<<<<<<<<<< * a.supplementary = read.is_supplementary * a.original_sam_line = "" */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_duplicate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_duplicate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->pcr_or_optical_duplicate = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1377 + /* "HTSeq/_HTSeq.pyx":1389 * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary # <<<<<<<<<<<<<< * a.original_sam_line = "" * a.optional_fields = read.tags */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1389, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->supplementary = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1378 + /* "HTSeq/_HTSeq.pyx":1390 * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary * a.original_sam_line = "" # <<<<<<<<<<<<<< @@ -33164,45 +32740,45 @@ __Pyx_DECREF(__pyx_v_a->original_sam_line); __pyx_v_a->original_sam_line = __pyx_kp_s__3; - /* "HTSeq/_HTSeq.pyx":1379 + /* "HTSeq/_HTSeq.pyx":1391 * a.supplementary = read.is_supplementary * a.original_sam_line = "" * a.optional_fields = read.tags # <<<<<<<<<<<<<< * if read.is_paired: * # These two should be but are not always consistent */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - 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, 1379, __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, 1391, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->optional_fields); __Pyx_DECREF(__pyx_v_a->optional_fields); __pyx_v_a->optional_fields = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1380 + /* "HTSeq/_HTSeq.pyx":1392 * a.original_sam_line = "" * a.optional_fields = read.tags * if read.is_paired: # <<<<<<<<<<<<<< * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1382 + /* "HTSeq/_HTSeq.pyx":1394 * if read.is_paired: * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): # <<<<<<<<<<<<<< * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition(samfile.getrname( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __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, 1382, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1394, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = ((!__pyx_t_3) != 0); if (__pyx_t_15) { @@ -33210,133 +32786,104 @@ __pyx_t_4 = __pyx_t_15; goto __pyx_L11_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_2, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1382, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1394, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1382, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1394, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_15; __pyx_L11_bool_binop_done:; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1383 + /* "HTSeq/_HTSeq.pyx":1395 * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" # <<<<<<<<<<<<<< * a.mate_start = GenomicPosition(samfile.getrname( * read.mrnm), read.next_reference_start, strand) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1383, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1383, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1395, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { __Pyx_INCREF(__pyx_kp_s__9); - __pyx_t_7 = __pyx_kp_s__9; + __pyx_t_6 = __pyx_kp_s__9; } else { __Pyx_INCREF(__pyx_kp_s__8); - __pyx_t_7 = __pyx_kp_s__8; + __pyx_t_6 = __pyx_kp_s__8; } - __Pyx_DECREF_SET(__pyx_v_strand, __pyx_t_7); - __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_strand, __pyx_t_6); + __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1384 + /* "HTSeq/_HTSeq.pyx":1396 * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition(samfile.getrname( # <<<<<<<<<<<<<< * read.mrnm), read.next_reference_start, strand) * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1385 + /* "HTSeq/_HTSeq.pyx":1397 * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition(samfile.getrname( * read.mrnm), read.next_reference_start, strand) # <<<<<<<<<<<<<< * else: * a.mate_start = None */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = NULL; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1384, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_1}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1384, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_1}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1384, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1384, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1384, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_6 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_next_reference_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_next_reference_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1397, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1384 + /* "HTSeq/_HTSeq.pyx":1396 * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition(samfile.getrname( # <<<<<<<<<<<<<< * read.mrnm), read.next_reference_start, strand) * else: */ - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1384, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1396, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2); __Pyx_INCREF(__pyx_v_strand); __Pyx_GIVEREF(__pyx_v_strand); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_strand); - __pyx_t_7 = 0; + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_strand); + __pyx_t_6 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->mate_start); __Pyx_DECREF(((PyObject *)__pyx_v_a->mate_start)); __pyx_v_a->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1382 + /* "HTSeq/_HTSeq.pyx":1394 * if read.is_paired: * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): # <<<<<<<<<<<<<< @@ -33346,7 +32893,7 @@ goto __pyx_L10; } - /* "HTSeq/_HTSeq.pyx":1387 + /* "HTSeq/_HTSeq.pyx":1399 * read.mrnm), read.next_reference_start, strand) * else: * a.mate_start = None # <<<<<<<<<<<<<< @@ -33362,36 +32909,36 @@ } __pyx_L10:; - /* "HTSeq/_HTSeq.pyx":1388 + /* "HTSeq/_HTSeq.pyx":1400 * else: * a.mate_start = None * if read.is_read1: # <<<<<<<<<<<<<< * a.pe_which = intern("first") * elif read.is_read2: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1388, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1388, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1400, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1389 + /* "HTSeq/_HTSeq.pyx":1401 * a.mate_start = None * if read.is_read1: * a.pe_which = intern("first") # <<<<<<<<<<<<<< * elif read.is_read2: * a.pe_which = intern("second") */ - __pyx_t_2 = __Pyx_Intern(__pyx_n_s_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_s_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1389, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1401, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); __pyx_v_a->pe_which = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1388 + /* "HTSeq/_HTSeq.pyx":1400 * else: * a.mate_start = None * if read.is_read1: # <<<<<<<<<<<<<< @@ -33401,36 +32948,36 @@ goto __pyx_L13; } - /* "HTSeq/_HTSeq.pyx":1390 + /* "HTSeq/_HTSeq.pyx":1402 * if read.is_read1: * a.pe_which = intern("first") * elif read.is_read2: # <<<<<<<<<<<<<< * a.pe_which = intern("second") * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1390, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1402, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1390, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1402, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1391 + /* "HTSeq/_HTSeq.pyx":1403 * a.pe_which = intern("first") * elif read.is_read2: * a.pe_which = intern("second") # <<<<<<<<<<<<<< * else: * a.pe_which = intern("unknown") */ - __pyx_t_2 = __Pyx_Intern(__pyx_n_s_second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_s_second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1391, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1403, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); __pyx_v_a->pe_which = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1390 + /* "HTSeq/_HTSeq.pyx":1402 * if read.is_read1: * a.pe_which = intern("first") * elif read.is_read2: # <<<<<<<<<<<<<< @@ -33440,7 +32987,7 @@ goto __pyx_L13; } - /* "HTSeq/_HTSeq.pyx":1393 + /* "HTSeq/_HTSeq.pyx":1405 * a.pe_which = intern("second") * else: * a.pe_which = intern("unknown") # <<<<<<<<<<<<<< @@ -33448,9 +32995,9 @@ * a.pe_which = intern("not_paired_end") */ /*else*/ { - __pyx_t_2 = __Pyx_Intern(__pyx_n_s_unknown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_s_unknown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1393, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1405, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); @@ -33459,7 +33006,7 @@ } __pyx_L13:; - /* "HTSeq/_HTSeq.pyx":1380 + /* "HTSeq/_HTSeq.pyx":1392 * a.original_sam_line = "" * a.optional_fields = read.tags * if read.is_paired: # <<<<<<<<<<<<<< @@ -33469,7 +33016,7 @@ goto __pyx_L9; } - /* "HTSeq/_HTSeq.pyx":1395 + /* "HTSeq/_HTSeq.pyx":1407 * a.pe_which = intern("unknown") * else: * a.pe_which = intern("not_paired_end") # <<<<<<<<<<<<<< @@ -33477,9 +33024,9 @@ * */ /*else*/ { - __pyx_t_2 = __Pyx_Intern(__pyx_n_s_not_paired_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1395, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_s_not_paired_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1395, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); @@ -33488,7 +33035,7 @@ } __pyx_L9:; - /* "HTSeq/_HTSeq.pyx":1396 + /* "HTSeq/_HTSeq.pyx":1408 * else: * a.pe_which = intern("not_paired_end") * return a # <<<<<<<<<<<<<< @@ -33500,7 +33047,7 @@ __pyx_r = ((PyObject *)__pyx_v_a); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1355 + /* "HTSeq/_HTSeq.pyx":1367 * * @classmethod * def from_pysam_AlignedSegment(cls, read, samfile): # <<<<<<<<<<<<<< @@ -33514,7 +33061,7 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedSegment", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -33532,7 +33079,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1399 +/* "HTSeq/_HTSeq.pyx":1411 * * @classmethod * def from_SAM_line(cls, line): # <<<<<<<<<<<<<< @@ -33580,9 +33127,9 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; @@ -33598,54 +33145,63 @@ struct __pyx_opt_args_5HTSeq_6_HTSeq_parse_cigar __pyx_t_19; __Pyx_RefNannySetupContext("from_SAM_line", 0); - /* "HTSeq/_HTSeq.pyx":1408 + /* "HTSeq/_HTSeq.pyx":1420 * cdef SequenceWithQualities swq * * fields = line.rstrip().split("\t") # <<<<<<<<<<<<<< * if len(fields) < 10: * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + 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_2, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1408, __pyx_L1_error) + __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, 1420, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __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, 1420, __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 && 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_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_s__14) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_s__14); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_fields = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1409 + /* "HTSeq/_HTSeq.pyx":1421 * * fields = line.rstrip().split("\t") * if len(fields) < 10: # <<<<<<<<<<<<<< * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, */ - __pyx_t_4 = PyObject_Length(__pyx_v_fields); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1409, __pyx_L1_error) - __pyx_t_5 = ((__pyx_t_4 < 10) != 0); - if (unlikely(__pyx_t_5)) { + __pyx_t_5 = PyObject_Length(__pyx_v_fields); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1421, __pyx_L1_error) + __pyx_t_6 = ((__pyx_t_5 < 10) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":1410 + /* "HTSeq/_HTSeq.pyx":1422 * fields = line.rstrip().split("\t") * if len(fields) < 10: * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." # <<<<<<<<<<<<<< @@ -33653,9 +33209,9 @@ * seq, qual) = fields[0:11] */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_SAM_line_does_not_contain_at_lea, 0, 0); - __PYX_ERR(0, 1410, __pyx_L1_error) + __PYX_ERR(0, 1422, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1409 + /* "HTSeq/_HTSeq.pyx":1421 * * fields = line.rstrip().split("\t") * if len(fields) < 10: # <<<<<<<<<<<<<< @@ -33664,14 +33220,14 @@ */ } - /* "HTSeq/_HTSeq.pyx":1412 + /* "HTSeq/_HTSeq.pyx":1424 * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, * seq, qual) = fields[0:11] # <<<<<<<<<<<<<< * optional_fields = fields[11:] * */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 0, 11, NULL, NULL, &__pyx_slice__29, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1412, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 0, 11, NULL, NULL, &__pyx_slice__19, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __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; @@ -33679,13 +33235,13 @@ if (unlikely(size != 11)) { if (size > 11) __Pyx_RaiseTooManyValuesError(11); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1411, __pyx_L1_error) + __PYX_ERR(0, 1423, __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_3 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 5); @@ -33695,9 +33251,9 @@ __pyx_t_13 = PyTuple_GET_ITEM(sequence, 9); __pyx_t_14 = PyTuple_GET_ITEM(sequence, 10); } else { - __pyx_t_2 = PyList_GET_ITEM(sequence, 0); - __pyx_t_3 = PyList_GET_ITEM(sequence, 1); - __pyx_t_6 = PyList_GET_ITEM(sequence, 2); + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_7 = PyList_GET_ITEM(sequence, 3); __pyx_t_8 = PyList_GET_ITEM(sequence, 4); __pyx_t_9 = PyList_GET_ITEM(sequence, 5); @@ -33707,9 +33263,9 @@ __pyx_t_13 = PyList_GET_ITEM(sequence, 9); __pyx_t_14 = PyList_GET_ITEM(sequence, 10); } - __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); @@ -33721,9 +33277,9 @@ #else { Py_ssize_t i; - PyObject** temps[11] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12,&__pyx_t_13,&__pyx_t_14}; + PyObject** temps[11] = {&__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}; for (i=0; i < 11; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1411, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -33732,8 +33288,8 @@ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - PyObject** temps[11] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_6,&__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 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1411, __pyx_L1_error) + PyObject** temps[11] = {&__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 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext; @@ -33742,7 +33298,7 @@ __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 11) < 0) __PYX_ERR(0, 1411, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 11) < 0) __PYX_ERR(0, 1423, __pyx_L1_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L5_unpacking_done; @@ -33750,34 +33306,34 @@ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1411, __pyx_L1_error) + __PYX_ERR(0, 1423, __pyx_L1_error) __pyx_L5_unpacking_done:; } - /* "HTSeq/_HTSeq.pyx":1411 + /* "HTSeq/_HTSeq.pyx":1423 * if len(fields) < 10: * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, # <<<<<<<<<<<<<< * seq, qual) = fields[0:11] * optional_fields = fields[11:] */ - if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_11)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_12)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_13)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - if (!(likely(PyString_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1411, __pyx_L1_error) - __pyx_v_qname = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; - __pyx_v_flag = ((PyObject*)__pyx_t_3); + if (!(likely(PyString_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_2)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_4)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_7)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_8))||((__pyx_t_8) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_8)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_10))||((__pyx_t_10) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_10)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_11))||((__pyx_t_11) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_11)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_12)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_13))||((__pyx_t_13) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_13)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_v_qname = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_rname = ((PyObject*)__pyx_t_6); - __pyx_t_6 = 0; + __pyx_v_flag = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __pyx_v_rname = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; __pyx_v_pos = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; __pyx_v_mapq = ((PyObject*)__pyx_t_8); @@ -33795,35 +33351,35 @@ __pyx_v_qual = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1413 + /* "HTSeq/_HTSeq.pyx":1425 * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, * seq, qual) = fields[0:11] * optional_fields = fields[11:] # <<<<<<<<<<<<<< * * if seq.count("=") > 0: */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 11, 0, NULL, NULL, &__pyx_slice__30, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 11, 0, NULL, NULL, &__pyx_slice__20, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __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, 1413, __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, 1425, __pyx_L1_error) __pyx_v_optional_fields = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1415 + /* "HTSeq/_HTSeq.pyx":1427 * optional_fields = fields[11:] * * if seq.count("=") > 0: # <<<<<<<<<<<<<< * raise ValueError, "Sequence in SAM file contains '=', which is not supported." * if seq.count(".") > 0: */ - __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_count, __pyx_v_seq, __pyx_kp_s__20); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_count, __pyx_v_seq, __pyx_kp_s__15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(__pyx_t_5)) { + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":1416 + /* "HTSeq/_HTSeq.pyx":1428 * * if seq.count("=") > 0: * raise ValueError, "Sequence in SAM file contains '=', which is not supported." # <<<<<<<<<<<<<< @@ -33831,9 +33387,9 @@ * raise ValueError, "Sequence in SAM file contains '.', which is not supported." */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Sequence_in_SAM_file_contains_wh, 0, 0); - __PYX_ERR(0, 1416, __pyx_L1_error) + __PYX_ERR(0, 1428, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1415 + /* "HTSeq/_HTSeq.pyx":1427 * optional_fields = fields[11:] * * if seq.count("=") > 0: # <<<<<<<<<<<<<< @@ -33842,22 +33398,22 @@ */ } - /* "HTSeq/_HTSeq.pyx":1417 + /* "HTSeq/_HTSeq.pyx":1429 * if seq.count("=") > 0: * raise ValueError, "Sequence in SAM file contains '=', which is not supported." * if seq.count(".") > 0: # <<<<<<<<<<<<<< * raise ValueError, "Sequence in SAM file contains '.', which is not supported." * flagint = int(flag) */ - __pyx_t_14 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_count, __pyx_v_seq, __pyx_kp_s__2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_t_14 = __Pyx_CallUnboundCMethod1(&__pyx_umethod_PyString_Type_count, __pyx_v_seq, __pyx_kp_s__2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_14, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_14, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1429, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__pyx_t_5)) { + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":1418 + /* "HTSeq/_HTSeq.pyx":1430 * raise ValueError, "Sequence in SAM file contains '=', which is not supported." * if seq.count(".") > 0: * raise ValueError, "Sequence in SAM file contains '.', which is not supported." # <<<<<<<<<<<<<< @@ -33865,9 +33421,9 @@ * */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Sequence_in_SAM_file_contains_wh_2, 0, 0); - __PYX_ERR(0, 1418, __pyx_L1_error) + __PYX_ERR(0, 1430, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1417 + /* "HTSeq/_HTSeq.pyx":1429 * if seq.count("=") > 0: * raise ValueError, "Sequence in SAM file contains '=', which is not supported." * if seq.count(".") > 0: # <<<<<<<<<<<<<< @@ -33876,30 +33432,30 @@ */ } - /* "HTSeq/_HTSeq.pyx":1419 + /* "HTSeq/_HTSeq.pyx":1431 * if seq.count(".") > 0: * raise ValueError, "Sequence in SAM file contains '.', which is not supported." * flagint = int(flag) # <<<<<<<<<<<<<< * * if flagint & 0x0004: # flag "query sequence is unmapped" */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1431, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_flagint = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1421 + /* "HTSeq/_HTSeq.pyx":1433 * flagint = int(flag) * * if flagint & 0x0004: # flag "query sequence is unmapped" # <<<<<<<<<<<<<< * iv = None * cigarlist = None */ - __pyx_t_5 = ((__pyx_v_flagint & 0x0004) != 0); - if (__pyx_t_5) { + __pyx_t_6 = ((__pyx_v_flagint & 0x0004) != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1422 + /* "HTSeq/_HTSeq.pyx":1434 * * if flagint & 0x0004: # flag "query sequence is unmapped" * iv = None # <<<<<<<<<<<<<< @@ -33909,7 +33465,7 @@ __Pyx_INCREF(Py_None); __pyx_v_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)Py_None); - /* "HTSeq/_HTSeq.pyx":1423 + /* "HTSeq/_HTSeq.pyx":1435 * if flagint & 0x0004: # flag "query sequence is unmapped" * iv = None * cigarlist = None # <<<<<<<<<<<<<< @@ -33919,7 +33475,7 @@ __Pyx_INCREF(Py_None); __pyx_v_cigarlist = ((PyObject*)Py_None); - /* "HTSeq/_HTSeq.pyx":1421 + /* "HTSeq/_HTSeq.pyx":1433 * flagint = int(flag) * * if flagint & 0x0004: # flag "query sequence is unmapped" # <<<<<<<<<<<<<< @@ -33929,7 +33485,7 @@ goto __pyx_L8; } - /* "HTSeq/_HTSeq.pyx":1425 + /* "HTSeq/_HTSeq.pyx":1437 * cigarlist = None * else: * if rname == "*": # <<<<<<<<<<<<<< @@ -33937,11 +33493,11 @@ * # SAM is one-based, but HTSeq is zero-based! */ /*else*/ { - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_rname, __pyx_kp_s__27, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1425, __pyx_L1_error) - __pyx_t_18 = (__pyx_t_5 != 0); + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_rname, __pyx_kp_s__18, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_18 = (__pyx_t_6 != 0); if (unlikely(__pyx_t_18)) { - /* "HTSeq/_HTSeq.pyx":1426 + /* "HTSeq/_HTSeq.pyx":1438 * else: * if rname == "*": * raise ValueError, "Malformed SAM line: RNAME == '*' although flag bit &0x0004 cleared" # <<<<<<<<<<<<<< @@ -33949,9 +33505,9 @@ * posint = int(pos) - 1 */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Malformed_SAM_line_RNAME_althoug, 0, 0); - __PYX_ERR(0, 1426, __pyx_L1_error) + __PYX_ERR(0, 1438, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1425 + /* "HTSeq/_HTSeq.pyx":1437 * cigarlist = None * else: * if rname == "*": # <<<<<<<<<<<<<< @@ -33960,23 +33516,23 @@ */ } - /* "HTSeq/_HTSeq.pyx":1428 + /* "HTSeq/_HTSeq.pyx":1440 * raise ValueError, "Malformed SAM line: RNAME == '*' although flag bit &0x0004 cleared" * # SAM is one-based, but HTSeq is zero-based! * posint = int(pos) - 1 # <<<<<<<<<<<<<< * if flagint & 0x0010: # flag "strand of the query" * strand = "-" */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1428, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1440, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_posint = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1429 + /* "HTSeq/_HTSeq.pyx":1441 * # SAM is one-based, but HTSeq is zero-based! * posint = int(pos) - 1 * if flagint & 0x0010: # flag "strand of the query" # <<<<<<<<<<<<<< @@ -33986,7 +33542,7 @@ __pyx_t_18 = ((__pyx_v_flagint & 0x0010) != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1430 + /* "HTSeq/_HTSeq.pyx":1442 * posint = int(pos) - 1 * if flagint & 0x0010: # flag "strand of the query" * strand = "-" # <<<<<<<<<<<<<< @@ -33996,7 +33552,7 @@ __Pyx_INCREF(__pyx_kp_s__9); __pyx_v_strand = __pyx_kp_s__9; - /* "HTSeq/_HTSeq.pyx":1429 + /* "HTSeq/_HTSeq.pyx":1441 * # SAM is one-based, but HTSeq is zero-based! * posint = int(pos) - 1 * if flagint & 0x0010: # flag "strand of the query" # <<<<<<<<<<<<<< @@ -34006,7 +33562,7 @@ goto __pyx_L10; } - /* "HTSeq/_HTSeq.pyx":1432 + /* "HTSeq/_HTSeq.pyx":1444 * strand = "-" * else: * strand = "+" # <<<<<<<<<<<<<< @@ -34019,7 +33575,7 @@ } __pyx_L10:; - /* "HTSeq/_HTSeq.pyx":1433 + /* "HTSeq/_HTSeq.pyx":1445 * else: * strand = "+" * cigarlist = parse_cigar(cigar, posint, rname, strand) # <<<<<<<<<<<<<< @@ -34030,41 +33586,41 @@ __pyx_t_19.ref_left = __pyx_v_posint; __pyx_t_19.chrom = __pyx_v_rname; __pyx_t_19.strand = __pyx_v_strand; - __pyx_t_14 = __pyx_f_5HTSeq_6_HTSeq_parse_cigar(__pyx_v_cigar, 0, &__pyx_t_19); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_14 = __pyx_f_5HTSeq_6_HTSeq_parse_cigar(__pyx_v_cigar, 0, &__pyx_t_19); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1445, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_v_cigarlist = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1435 + /* "HTSeq/_HTSeq.pyx":1447 * cigarlist = parse_cigar(cigar, posint, rname, strand) * iv = GenomicInterval( * rname, posint, cigarlist[-1].ref_iv.end, strand) # <<<<<<<<<<<<<< * * if qual != "*": */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_posint); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_posint); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (unlikely(__pyx_v_cigarlist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1435, __pyx_L1_error) + __PYX_ERR(0, 1447, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_cigarlist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_cigarlist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ref_iv); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ref_iv); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1434 + /* "HTSeq/_HTSeq.pyx":1446 * strand = "+" * cigarlist = parse_cigar(cigar, posint, rname, strand) * iv = GenomicInterval( # <<<<<<<<<<<<<< * rname, posint, cigarlist[-1].ref_iv.end, strand) * */ - __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_rname); __Pyx_GIVEREF(__pyx_v_rname); @@ -34078,7 +33634,7 @@ PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_v_strand); __pyx_t_14 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); @@ -34086,27 +33642,27 @@ } __pyx_L8:; - /* "HTSeq/_HTSeq.pyx":1437 + /* "HTSeq/_HTSeq.pyx":1449 * rname, posint, cigarlist[-1].ref_iv.end, strand) * * if qual != "*": # <<<<<<<<<<<<<< * swq = SequenceWithQualities(seq.upper(), qname, qual) * else: */ - __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_v_qual, __pyx_kp_s__27, Py_NE)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1437, __pyx_L1_error) - __pyx_t_5 = (__pyx_t_18 != 0); - if (__pyx_t_5) { + __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_v_qual, __pyx_kp_s__18, Py_NE)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1449, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_18 != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1438 + /* "HTSeq/_HTSeq.pyx":1450 * * if qual != "*": * swq = SequenceWithQualities(seq.upper(), qname, qual) # <<<<<<<<<<<<<< * else: * swq = SequenceWithQualities(seq.upper(), qname, "", "noquals") */ - __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_upper, __pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_upper, __pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); @@ -34117,13 +33673,13 @@ __Pyx_GIVEREF(__pyx_v_qual); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_v_qual); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_swq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1437 + /* "HTSeq/_HTSeq.pyx":1449 * rname, posint, cigarlist[-1].ref_iv.end, strand) * * if qual != "*": # <<<<<<<<<<<<<< @@ -34133,7 +33689,7 @@ goto __pyx_L11; } - /* "HTSeq/_HTSeq.pyx":1440 + /* "HTSeq/_HTSeq.pyx":1452 * swq = SequenceWithQualities(seq.upper(), qname, qual) * else: * swq = SequenceWithQualities(seq.upper(), qname, "", "noquals") # <<<<<<<<<<<<<< @@ -34141,9 +33697,9 @@ * alnmt = SAM_Alignment(swq, iv) */ /*else*/ { - __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_upper, __pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_1 = __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyString_Type_upper, __pyx_v_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_1); @@ -34157,7 +33713,7 @@ __Pyx_GIVEREF(__pyx_n_s_noquals); PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_n_s_noquals); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_swq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); @@ -34165,14 +33721,14 @@ } __pyx_L11:; - /* "HTSeq/_HTSeq.pyx":1442 + /* "HTSeq/_HTSeq.pyx":1454 * swq = SequenceWithQualities(seq.upper(), qname, "", "noquals") * * alnmt = SAM_Alignment(swq, iv) # <<<<<<<<<<<<<< * alnmt.flag = flagint * alnmt.cigar = cigarlist */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_swq)); __Pyx_GIVEREF(((PyObject *)__pyx_v_swq)); @@ -34180,25 +33736,25 @@ __Pyx_INCREF(((PyObject *)__pyx_v_iv)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_iv)); - __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1442, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_1, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1454, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_alnmt = ((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1443 + /* "HTSeq/_HTSeq.pyx":1455 * * alnmt = SAM_Alignment(swq, iv) * alnmt.flag = flagint # <<<<<<<<<<<<<< * alnmt.cigar = cigarlist * alnmt.optional_fields = [ */ - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_flagint); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1443, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_flagint); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_alnmt), __pyx_n_s_flag, __pyx_t_13) < 0) __PYX_ERR(0, 1443, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_alnmt), __pyx_n_s_flag, __pyx_t_13) < 0) __PYX_ERR(0, 1455, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1444 + /* "HTSeq/_HTSeq.pyx":1456 * alnmt = SAM_Alignment(swq, iv) * alnmt.flag = flagint * alnmt.cigar = cigarlist # <<<<<<<<<<<<<< @@ -34211,17 +33767,17 @@ __Pyx_DECREF(__pyx_v_alnmt->cigar); __pyx_v_alnmt->cigar = __pyx_v_cigarlist; - /* "HTSeq/_HTSeq.pyx":1445 + /* "HTSeq/_HTSeq.pyx":1457 * alnmt.flag = flagint * alnmt.cigar = cigarlist * alnmt.optional_fields = [ # <<<<<<<<<<<<<< * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] * alnmt.aQual = int(mapq) */ - __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_13 = PyList_New(0); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - /* "HTSeq/_HTSeq.pyx":1446 + /* "HTSeq/_HTSeq.pyx":1458 * alnmt.cigar = cigarlist * alnmt.optional_fields = [ * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] # <<<<<<<<<<<<<< @@ -34230,25 +33786,25 @@ */ if (unlikely(__pyx_v_optional_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1446, __pyx_L1_error) + __PYX_ERR(0, 1458, __pyx_L1_error) } - __pyx_t_1 = __pyx_v_optional_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0; + __pyx_t_1 = __pyx_v_optional_fields; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0; for (;;) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_14 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_14); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_14 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_14); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1458, __pyx_L1_error) #else - __pyx_t_14 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_14 = PySequence_ITEM(__pyx_t_1, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); #endif __Pyx_XDECREF_SET(__pyx_v_field, __pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_v_field, 0, 2, NULL, NULL, &__pyx_slice__31, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetSlice(__pyx_v_field, 0, 2, NULL, NULL, &__pyx_slice__21, 0, 1, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (!(likely(PyString_CheckExact(__pyx_v_field))||((__pyx_v_field) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_field)->tp_name), 0))) __PYX_ERR(0, 1446, __pyx_L1_error) - __pyx_t_12 = __pyx_f_5HTSeq_6_HTSeq__parse_SAM_optional_field_value(((PyObject*)__pyx_v_field)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1446, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_field))||((__pyx_v_field) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_field)->tp_name), 0))) __PYX_ERR(0, 1458, __pyx_L1_error) + __pyx_t_12 = __pyx_f_5HTSeq_6_HTSeq__parse_SAM_optional_field_value(((PyObject*)__pyx_v_field)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_14); @@ -34256,12 +33812,12 @@ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_12); __pyx_t_14 = 0; __pyx_t_12 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_13, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1445, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_13, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1445 + /* "HTSeq/_HTSeq.pyx":1457 * alnmt.flag = flagint * alnmt.cigar = cigarlist * alnmt.optional_fields = [ # <<<<<<<<<<<<<< @@ -34274,40 +33830,40 @@ __pyx_v_alnmt->optional_fields = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1447 + /* "HTSeq/_HTSeq.pyx":1459 * alnmt.optional_fields = [ * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] * alnmt.aQual = int(mapq) # <<<<<<<<<<<<<< * alnmt.inferred_insert_size = int(isize) * alnmt.original_sam_line = line */ - __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_mapq); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_mapq); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1447, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1459, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_alnmt->aQual = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1448 + /* "HTSeq/_HTSeq.pyx":1460 * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] * alnmt.aQual = int(mapq) * alnmt.inferred_insert_size = int(isize) # <<<<<<<<<<<<<< * alnmt.original_sam_line = line * */ - __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_isize); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_isize); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1460, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1448, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_13); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1460, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_alnmt->inferred_insert_size = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1449 + /* "HTSeq/_HTSeq.pyx":1461 * alnmt.aQual = int(mapq) * alnmt.inferred_insert_size = int(isize) * alnmt.original_sam_line = line # <<<<<<<<<<<<<< * * if flagint & 0x0001: # flag "read is paired in sequencing" */ - if (!(likely(PyString_CheckExact(__pyx_v_line))||((__pyx_v_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_line)->tp_name), 0))) __PYX_ERR(0, 1449, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_v_line))||((__pyx_v_line) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_v_line)->tp_name), 0))) __PYX_ERR(0, 1461, __pyx_L1_error) __pyx_t_13 = __pyx_v_line; __Pyx_INCREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_13); @@ -34316,27 +33872,27 @@ __pyx_v_alnmt->original_sam_line = ((PyObject*)__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1451 + /* "HTSeq/_HTSeq.pyx":1463 * alnmt.original_sam_line = line * * if flagint & 0x0001: # flag "read is paired in sequencing" # <<<<<<<<<<<<<< * if flagint & 0x0008: # flag "mate is unmapped" * alnmt.mate_start = None */ - __pyx_t_5 = ((__pyx_v_flagint & 0x0001) != 0); - if (__pyx_t_5) { + __pyx_t_6 = ((__pyx_v_flagint & 0x0001) != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1452 + /* "HTSeq/_HTSeq.pyx":1464 * * if flagint & 0x0001: # flag "read is paired in sequencing" * if flagint & 0x0008: # flag "mate is unmapped" # <<<<<<<<<<<<<< * alnmt.mate_start = None * else: */ - __pyx_t_5 = ((__pyx_v_flagint & 0x0008) != 0); - if (__pyx_t_5) { + __pyx_t_6 = ((__pyx_v_flagint & 0x0008) != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1453 + /* "HTSeq/_HTSeq.pyx":1465 * if flagint & 0x0001: # flag "read is paired in sequencing" * if flagint & 0x0008: # flag "mate is unmapped" * alnmt.mate_start = None # <<<<<<<<<<<<<< @@ -34349,7 +33905,7 @@ __Pyx_DECREF(((PyObject *)__pyx_v_alnmt->mate_start)); __pyx_v_alnmt->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)Py_None); - /* "HTSeq/_HTSeq.pyx":1452 + /* "HTSeq/_HTSeq.pyx":1464 * * if flagint & 0x0001: # flag "read is paired in sequencing" * if flagint & 0x0008: # flag "mate is unmapped" # <<<<<<<<<<<<<< @@ -34359,7 +33915,7 @@ goto __pyx_L15; } - /* "HTSeq/_HTSeq.pyx":1455 + /* "HTSeq/_HTSeq.pyx":1467 * alnmt.mate_start = None * else: * if mrnm == "*": # <<<<<<<<<<<<<< @@ -34367,11 +33923,11 @@ * posint = int(mpos) - 1 */ /*else*/ { - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_v_mrnm, __pyx_kp_s__27, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1455, __pyx_L1_error) - __pyx_t_18 = (__pyx_t_5 != 0); + __pyx_t_6 = (__Pyx_PyString_Equals(__pyx_v_mrnm, __pyx_kp_s__18, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_18 = (__pyx_t_6 != 0); if (unlikely(__pyx_t_18)) { - /* "HTSeq/_HTSeq.pyx":1456 + /* "HTSeq/_HTSeq.pyx":1468 * else: * if mrnm == "*": * raise ValueError, "Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared" # <<<<<<<<<<<<<< @@ -34379,9 +33935,9 @@ * if flagint & 0x0020: # flag "strand of the mate" */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_Malformed_SAM_line_MRNM_although, 0, 0); - __PYX_ERR(0, 1456, __pyx_L1_error) + __PYX_ERR(0, 1468, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1455 + /* "HTSeq/_HTSeq.pyx":1467 * alnmt.mate_start = None * else: * if mrnm == "*": # <<<<<<<<<<<<<< @@ -34390,23 +33946,23 @@ */ } - /* "HTSeq/_HTSeq.pyx":1457 + /* "HTSeq/_HTSeq.pyx":1469 * if mrnm == "*": * raise ValueError, "Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared" * posint = int(mpos) - 1 # <<<<<<<<<<<<<< * if flagint & 0x0020: # flag "strand of the mate" * strand = "-" */ - __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_mpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyNumber_Int(__pyx_v_mpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_13, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_SubtractObjC(__pyx_t_13, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1469, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_posint = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1458 + /* "HTSeq/_HTSeq.pyx":1470 * raise ValueError, "Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared" * posint = int(mpos) - 1 * if flagint & 0x0020: # flag "strand of the mate" # <<<<<<<<<<<<<< @@ -34416,7 +33972,7 @@ __pyx_t_18 = ((__pyx_v_flagint & 0x0020) != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1459 + /* "HTSeq/_HTSeq.pyx":1471 * posint = int(mpos) - 1 * if flagint & 0x0020: # flag "strand of the mate" * strand = "-" # <<<<<<<<<<<<<< @@ -34426,7 +33982,7 @@ __Pyx_INCREF(__pyx_kp_s__9); __Pyx_XDECREF_SET(__pyx_v_strand, __pyx_kp_s__9); - /* "HTSeq/_HTSeq.pyx":1458 + /* "HTSeq/_HTSeq.pyx":1470 * raise ValueError, "Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared" * posint = int(mpos) - 1 * if flagint & 0x0020: # flag "strand of the mate" # <<<<<<<<<<<<<< @@ -34436,7 +33992,7 @@ goto __pyx_L17; } - /* "HTSeq/_HTSeq.pyx":1461 + /* "HTSeq/_HTSeq.pyx":1473 * strand = "-" * else: * strand = "+" # <<<<<<<<<<<<<< @@ -34449,16 +34005,16 @@ } __pyx_L17:; - /* "HTSeq/_HTSeq.pyx":1462 + /* "HTSeq/_HTSeq.pyx":1474 * else: * strand = "+" * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) # <<<<<<<<<<<<<< * if alnmt.mate_start.chrom == "=": * if alnmt.iv is not None: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_posint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_posint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(3); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_mrnm); __Pyx_GIVEREF(__pyx_v_mrnm); @@ -34469,7 +34025,7 @@ __Pyx_GIVEREF(__pyx_v_strand); PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_v_strand); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1462, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_GIVEREF(__pyx_t_1); @@ -34478,29 +34034,29 @@ __pyx_v_alnmt->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1463 + /* "HTSeq/_HTSeq.pyx":1475 * strand = "+" * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) * if alnmt.mate_start.chrom == "=": # <<<<<<<<<<<<<< * if alnmt.iv is not None: * alnmt.mate_start.chrom = alnmt.iv.chrom */ - __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_v_alnmt->mate_start->__pyx_base.chrom, __pyx_kp_s__20, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1463, __pyx_L1_error) - __pyx_t_5 = (__pyx_t_18 != 0); - if (__pyx_t_5) { + __pyx_t_18 = (__Pyx_PyString_Equals(__pyx_v_alnmt->mate_start->__pyx_base.chrom, __pyx_kp_s__15, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1475, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_18 != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1464 + /* "HTSeq/_HTSeq.pyx":1476 * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) * if alnmt.mate_start.chrom == "=": * if alnmt.iv is not None: # <<<<<<<<<<<<<< * alnmt.mate_start.chrom = alnmt.iv.chrom * if flagint & 0x0040: */ - __pyx_t_5 = (((PyObject *)__pyx_v_alnmt->__pyx_base.__pyx_base.iv) != Py_None); - __pyx_t_18 = (__pyx_t_5 != 0); + __pyx_t_6 = (((PyObject *)__pyx_v_alnmt->__pyx_base.__pyx_base.iv) != Py_None); + __pyx_t_18 = (__pyx_t_6 != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1465 + /* "HTSeq/_HTSeq.pyx":1477 * if alnmt.mate_start.chrom == "=": * if alnmt.iv is not None: * alnmt.mate_start.chrom = alnmt.iv.chrom # <<<<<<<<<<<<<< @@ -34515,7 +34071,7 @@ __pyx_v_alnmt->mate_start->__pyx_base.chrom = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1464 + /* "HTSeq/_HTSeq.pyx":1476 * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) * if alnmt.mate_start.chrom == "=": * if alnmt.iv is not None: # <<<<<<<<<<<<<< @@ -34524,7 +34080,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1463 + /* "HTSeq/_HTSeq.pyx":1475 * strand = "+" * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) * if alnmt.mate_start.chrom == "=": # <<<<<<<<<<<<<< @@ -34535,7 +34091,7 @@ } __pyx_L15:; - /* "HTSeq/_HTSeq.pyx":1466 + /* "HTSeq/_HTSeq.pyx":1478 * if alnmt.iv is not None: * alnmt.mate_start.chrom = alnmt.iv.chrom * if flagint & 0x0040: # <<<<<<<<<<<<<< @@ -34545,23 +34101,23 @@ __pyx_t_18 = ((__pyx_v_flagint & 0x0040) != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1467 + /* "HTSeq/_HTSeq.pyx":1479 * alnmt.mate_start.chrom = alnmt.iv.chrom * if flagint & 0x0040: * alnmt.pe_which = intern("first") # <<<<<<<<<<<<<< * elif flagint & 0x0080: * alnmt.pe_which = intern("second") */ - __pyx_t_1 = __Pyx_Intern(__pyx_n_s_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_1 = __Pyx_Intern(__pyx_n_s_first); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1467, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_alnmt->pe_which); __Pyx_DECREF(__pyx_v_alnmt->pe_which); __pyx_v_alnmt->pe_which = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1466 + /* "HTSeq/_HTSeq.pyx":1478 * if alnmt.iv is not None: * alnmt.mate_start.chrom = alnmt.iv.chrom * if flagint & 0x0040: # <<<<<<<<<<<<<< @@ -34571,7 +34127,7 @@ goto __pyx_L20; } - /* "HTSeq/_HTSeq.pyx":1468 + /* "HTSeq/_HTSeq.pyx":1480 * if flagint & 0x0040: * alnmt.pe_which = intern("first") * elif flagint & 0x0080: # <<<<<<<<<<<<<< @@ -34581,23 +34137,23 @@ __pyx_t_18 = ((__pyx_v_flagint & 0x0080) != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1469 + /* "HTSeq/_HTSeq.pyx":1481 * alnmt.pe_which = intern("first") * elif flagint & 0x0080: * alnmt.pe_which = intern("second") # <<<<<<<<<<<<<< * else: * alnmt.pe_which = intern("unknown") */ - __pyx_t_1 = __Pyx_Intern(__pyx_n_s_second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1469, __pyx_L1_error) + __pyx_t_1 = __Pyx_Intern(__pyx_n_s_second); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1469, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_alnmt->pe_which); __Pyx_DECREF(__pyx_v_alnmt->pe_which); __pyx_v_alnmt->pe_which = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1468 + /* "HTSeq/_HTSeq.pyx":1480 * if flagint & 0x0040: * alnmt.pe_which = intern("first") * elif flagint & 0x0080: # <<<<<<<<<<<<<< @@ -34607,7 +34163,7 @@ goto __pyx_L20; } - /* "HTSeq/_HTSeq.pyx":1471 + /* "HTSeq/_HTSeq.pyx":1483 * alnmt.pe_which = intern("second") * else: * alnmt.pe_which = intern("unknown") # <<<<<<<<<<<<<< @@ -34615,9 +34171,9 @@ * alnmt.mate_start = None */ /*else*/ { - __pyx_t_1 = __Pyx_Intern(__pyx_n_s_unknown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error) + __pyx_t_1 = __Pyx_Intern(__pyx_n_s_unknown); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1483, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1471, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1483, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_alnmt->pe_which); __Pyx_DECREF(__pyx_v_alnmt->pe_which); @@ -34626,7 +34182,7 @@ } __pyx_L20:; - /* "HTSeq/_HTSeq.pyx":1451 + /* "HTSeq/_HTSeq.pyx":1463 * alnmt.original_sam_line = line * * if flagint & 0x0001: # flag "read is paired in sequencing" # <<<<<<<<<<<<<< @@ -34636,7 +34192,7 @@ goto __pyx_L14; } - /* "HTSeq/_HTSeq.pyx":1473 + /* "HTSeq/_HTSeq.pyx":1485 * alnmt.pe_which = intern("unknown") * else: * alnmt.mate_start = None # <<<<<<<<<<<<<< @@ -34650,16 +34206,16 @@ __Pyx_DECREF(((PyObject *)__pyx_v_alnmt->mate_start)); __pyx_v_alnmt->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)Py_None); - /* "HTSeq/_HTSeq.pyx":1474 + /* "HTSeq/_HTSeq.pyx":1486 * else: * alnmt.mate_start = None * alnmt.pe_which = intern("not_paired_end") # <<<<<<<<<<<<<< * * alnmt.proper_pair = flagint & 0x0002 > 0 */ - __pyx_t_1 = __Pyx_Intern(__pyx_n_s_not_paired_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1474, __pyx_L1_error) + __pyx_t_1 = __Pyx_Intern(__pyx_n_s_not_paired_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1474, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 1486, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_alnmt->pe_which); __Pyx_DECREF(__pyx_v_alnmt->pe_which); @@ -34668,7 +34224,7 @@ } __pyx_L14:; - /* "HTSeq/_HTSeq.pyx":1476 + /* "HTSeq/_HTSeq.pyx":1488 * alnmt.pe_which = intern("not_paired_end") * * alnmt.proper_pair = flagint & 0x0002 > 0 # <<<<<<<<<<<<<< @@ -34677,7 +34233,7 @@ */ __pyx_v_alnmt->proper_pair = ((__pyx_v_flagint & 0x0002) > 0); - /* "HTSeq/_HTSeq.pyx":1477 + /* "HTSeq/_HTSeq.pyx":1489 * * alnmt.proper_pair = flagint & 0x0002 > 0 * alnmt.not_primary_alignment = flagint & 0x0100 > 0 # <<<<<<<<<<<<<< @@ -34686,7 +34242,7 @@ */ __pyx_v_alnmt->not_primary_alignment = ((__pyx_v_flagint & 0x0100) > 0); - /* "HTSeq/_HTSeq.pyx":1478 + /* "HTSeq/_HTSeq.pyx":1490 * alnmt.proper_pair = flagint & 0x0002 > 0 * alnmt.not_primary_alignment = flagint & 0x0100 > 0 * alnmt.failed_platform_qc = flagint & 0x0200 > 0 # <<<<<<<<<<<<<< @@ -34695,7 +34251,7 @@ */ __pyx_v_alnmt->failed_platform_qc = ((__pyx_v_flagint & 0x0200) > 0); - /* "HTSeq/_HTSeq.pyx":1479 + /* "HTSeq/_HTSeq.pyx":1491 * alnmt.not_primary_alignment = flagint & 0x0100 > 0 * alnmt.failed_platform_qc = flagint & 0x0200 > 0 * alnmt.pcr_or_optical_duplicate = flagint & 0x0400 > 0 # <<<<<<<<<<<<<< @@ -34704,7 +34260,7 @@ */ __pyx_v_alnmt->pcr_or_optical_duplicate = ((__pyx_v_flagint & 0x0400) > 0); - /* "HTSeq/_HTSeq.pyx":1480 + /* "HTSeq/_HTSeq.pyx":1492 * alnmt.failed_platform_qc = flagint & 0x0200 > 0 * alnmt.pcr_or_optical_duplicate = flagint & 0x0400 > 0 * alnmt.supplementary = flagint & 0x0800 > 0 # <<<<<<<<<<<<<< @@ -34713,7 +34269,7 @@ */ __pyx_v_alnmt->supplementary = ((__pyx_v_flagint & 0x0800) > 0); - /* "HTSeq/_HTSeq.pyx":1482 + /* "HTSeq/_HTSeq.pyx":1494 * alnmt.supplementary = flagint & 0x0800 > 0 * * return alnmt # <<<<<<<<<<<<<< @@ -34725,7 +34281,7 @@ __pyx_r = ((PyObject *)__pyx_v_alnmt); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1399 + /* "HTSeq/_HTSeq.pyx":1411 * * @classmethod * def from_SAM_line(cls, line): # <<<<<<<<<<<<<< @@ -34738,7 +34294,7 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); @@ -34775,7 +34331,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1485 +/* "HTSeq/_HTSeq.pyx":1497 * * property flag: * def __get__(self): # <<<<<<<<<<<<<< @@ -34802,7 +34358,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1486 + /* "HTSeq/_HTSeq.pyx":1498 * property flag: * def __get__(self): * return self._flag # <<<<<<<<<<<<<< @@ -34810,13 +34366,13 @@ * def __set__(self, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1486, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1498, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1485 + /* "HTSeq/_HTSeq.pyx":1497 * * property flag: * def __get__(self): # <<<<<<<<<<<<<< @@ -34835,7 +34391,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1488 +/* "HTSeq/_HTSeq.pyx":1500 * return self._flag * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -34862,17 +34418,17 @@ int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - /* "HTSeq/_HTSeq.pyx":1489 + /* "HTSeq/_HTSeq.pyx":1501 * * def __set__(self, value): * self._flag = value # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1489, __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, 1501, __pyx_L1_error) __pyx_v_self->_flag = __pyx_t_1; - /* "HTSeq/_HTSeq.pyx":1488 + /* "HTSeq/_HTSeq.pyx":1500 * return self._flag * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -34891,7 +34447,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1492 +/* "HTSeq/_HTSeq.pyx":1504 * * @property * def paired_end(self): # <<<<<<<<<<<<<< @@ -34919,7 +34475,7 @@ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1493 + /* "HTSeq/_HTSeq.pyx":1505 * @property * def paired_end(self): * return self.pe_which != "not_paired_end" # <<<<<<<<<<<<<< @@ -34927,14 +34483,14 @@ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->pe_which, __pyx_n_s_not_paired_end, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1493, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1493, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_v_self->pe_which, __pyx_n_s_not_paired_end, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1505, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1492 + /* "HTSeq/_HTSeq.pyx":1504 * * @property * def paired_end(self): # <<<<<<<<<<<<<< @@ -34953,7 +34509,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1496 +/* "HTSeq/_HTSeq.pyx":1508 * * @property * def mate_aligned(self): # <<<<<<<<<<<<<< @@ -34981,7 +34537,7 @@ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1497 + /* "HTSeq/_HTSeq.pyx":1509 * @property * def mate_aligned(self): * return self.mate_start is not None # <<<<<<<<<<<<<< @@ -34990,13 +34546,13 @@ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = (((PyObject *)__pyx_v_self->mate_start) != Py_None); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1497, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1509, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1496 + /* "HTSeq/_HTSeq.pyx":1508 * * @property * def mate_aligned(self): # <<<<<<<<<<<<<< @@ -35015,7 +34571,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1499 +/* "HTSeq/_HTSeq.pyx":1511 * return self.mate_start is not None * * def get_sam_line(self): # <<<<<<<<<<<<<< @@ -35058,7 +34614,7 @@ PyObject *__pyx_t_13 = NULL; __Pyx_RefNannySetupContext("get_sam_line", 0); - /* "HTSeq/_HTSeq.pyx":1500 + /* "HTSeq/_HTSeq.pyx":1512 * * def get_sam_line(self): * cdef str cigar = "" # <<<<<<<<<<<<<< @@ -35068,20 +34624,20 @@ __Pyx_INCREF(__pyx_kp_s__3); __pyx_v_cigar = __pyx_kp_s__3; - /* "HTSeq/_HTSeq.pyx":1504 + /* "HTSeq/_HTSeq.pyx":1516 * cdef CigarOperation cop * * if self.aligned: # <<<<<<<<<<<<<< * query_start = self.iv * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1504, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1516, __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, 1504, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1516, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1505 + /* "HTSeq/_HTSeq.pyx":1517 * * if self.aligned: * query_start = self.iv # <<<<<<<<<<<<<< @@ -35093,7 +34649,7 @@ __pyx_v_query_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1504 + /* "HTSeq/_HTSeq.pyx":1516 * cdef CigarOperation cop * * if self.aligned: # <<<<<<<<<<<<<< @@ -35103,7 +34659,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1507 + /* "HTSeq/_HTSeq.pyx":1519 * query_start = self.iv * else: * query_start = GenomicPosition("*", -1) # <<<<<<<<<<<<<< @@ -35111,14 +34667,14 @@ * if self.mate_start is not None: */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1507, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1509 + /* "HTSeq/_HTSeq.pyx":1521 * query_start = GenomicPosition("*", -1) * * if self.mate_start is not None: # <<<<<<<<<<<<<< @@ -35129,7 +34685,7 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1510 + /* "HTSeq/_HTSeq.pyx":1522 * * if self.mate_start is not None: * mate_start = self.mate_start # <<<<<<<<<<<<<< @@ -35141,7 +34697,7 @@ __pyx_v_mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1509 + /* "HTSeq/_HTSeq.pyx":1521 * query_start = GenomicPosition("*", -1) * * if self.mate_start is not None: # <<<<<<<<<<<<<< @@ -35151,7 +34707,7 @@ goto __pyx_L4; } - /* "HTSeq/_HTSeq.pyx":1512 + /* "HTSeq/_HTSeq.pyx":1524 * mate_start = self.mate_start * else: * mate_start = GenomicPosition("*", -1) # <<<<<<<<<<<<<< @@ -35159,14 +34715,14 @@ * if self.cigar is not None: */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1512, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1524, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; - /* "HTSeq/_HTSeq.pyx":1514 + /* "HTSeq/_HTSeq.pyx":1526 * mate_start = GenomicPosition("*", -1) * * if self.cigar is not None: # <<<<<<<<<<<<<< @@ -35177,7 +34733,7 @@ __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1515 + /* "HTSeq/_HTSeq.pyx":1527 * * if self.cigar is not None: * for cop in self.cigar: # <<<<<<<<<<<<<< @@ -35186,44 +34742,44 @@ */ if (unlikely(__pyx_v_self->cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1515, __pyx_L1_error) + __PYX_ERR(0, 1527, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->cigar; __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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1515, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1527, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5HTSeq_6_HTSeq_CigarOperation))))) __PYX_ERR(0, 1515, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5HTSeq_6_HTSeq_CigarOperation))))) __PYX_ERR(0, 1527, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_cop, ((struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *)__pyx_t_5)); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1516 + /* "HTSeq/_HTSeq.pyx":1528 * if self.cigar is not None: * for cop in self.cigar: * cigar += str(cop.size) + cop.type # <<<<<<<<<<<<<< * else: * cigar = "*" */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_cop->size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_cop->size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1516, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_v_cop->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1516, __pyx_L1_error) + __pyx_t_5 = PyNumber_Add(__pyx_t_6, __pyx_v_cop->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_cigar, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1516, __pyx_L1_error) + __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_cigar, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1516, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1528, __pyx_L1_error) __Pyx_DECREF_SET(__pyx_v_cigar, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1515 + /* "HTSeq/_HTSeq.pyx":1527 * * if self.cigar is not None: * for cop in self.cigar: # <<<<<<<<<<<<<< @@ -35233,7 +34789,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1514 + /* "HTSeq/_HTSeq.pyx":1526 * mate_start = GenomicPosition("*", -1) * * if self.cigar is not None: # <<<<<<<<<<<<<< @@ -35243,7 +34799,7 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":1518 + /* "HTSeq/_HTSeq.pyx":1530 * cigar += str(cop.size) + cop.type * else: * cigar = "*" # <<<<<<<<<<<<<< @@ -35251,12 +34807,12 @@ * return '\t'.join((self.read.name, str(self.flag), query_start.chrom, */ /*else*/ { - __Pyx_INCREF(__pyx_kp_s__27); - __Pyx_DECREF_SET(__pyx_v_cigar, __pyx_kp_s__27); + __Pyx_INCREF(__pyx_kp_s__18); + __Pyx_DECREF_SET(__pyx_v_cigar, __pyx_kp_s__18); } __pyx_L5:; - /* "HTSeq/_HTSeq.pyx":1520 + /* "HTSeq/_HTSeq.pyx":1532 * cigar = "*" * * return '\t'.join((self.read.name, str(self.flag), query_start.chrom, # <<<<<<<<<<<<<< @@ -35264,82 +34820,82 @@ * 1), str(self.aQual), cigar, mate_start.chrom, */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1521 + /* "HTSeq/_HTSeq.pyx":1533 * * return '\t'.join((self.read.name, str(self.flag), query_start.chrom, * str(query_start.start + # <<<<<<<<<<<<<< * 1), str(self.aQual), cigar, mate_start.chrom, * str(mate_start.pos + 1), str(self.inferred_insert_size), */ - __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_query_start->start + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1521, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_query_start->start + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1521, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1533, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1522 + /* "HTSeq/_HTSeq.pyx":1534 * return '\t'.join((self.read.name, str(self.flag), query_start.chrom, * str(query_start.start + * 1), str(self.aQual), cigar, mate_start.chrom, # <<<<<<<<<<<<<< * str(mate_start.pos + 1), str(self.inferred_insert_size), * self.read_as_aligned.seq, self.read_as_aligned.qualstr, */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1523 + /* "HTSeq/_HTSeq.pyx":1535 * str(query_start.start + * 1), str(self.aQual), cigar, mate_start.chrom, * str(mate_start.pos + 1), str(self.inferred_insert_size), # <<<<<<<<<<<<<< * self.read_as_aligned.seq, self.read_as_aligned.qualstr, * '\t'.join(self.raw_optional_fields()))) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mate_start), __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mate_start), __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __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_self->inferred_insert_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "HTSeq/_HTSeq.pyx":1524 + /* "HTSeq/_HTSeq.pyx":1536 * 1), str(self.aQual), cigar, mate_start.chrom, * str(mate_start.pos + 1), str(self.inferred_insert_size), * self.read_as_aligned.seq, self.read_as_aligned.qualstr, # <<<<<<<<<<<<<< * '\t'.join(self.raw_optional_fields()))) * */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.read_as_aligned), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1524, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.read_as_aligned), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1536, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "HTSeq/_HTSeq.pyx":1525 + /* "HTSeq/_HTSeq.pyx":1537 * str(mate_start.pos + 1), str(self.inferred_insert_size), * self.read_as_aligned.seq, self.read_as_aligned.qualstr, * '\t'.join(self.raw_optional_fields()))) # <<<<<<<<<<<<<< * * def optional_field(SAM_Alignment self, str tag): */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw_optional_fields); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw_optional_fields); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -35351,26 +34907,23 @@ __Pyx_DECREF_SET(__pyx_t_12, function); } } - if (__pyx_t_13) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1525, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - } else { - __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1525, __pyx_L1_error) - } + __pyx_t_11 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyString_Join(__pyx_kp_s__18, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1525, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyString_Join(__pyx_kp_s__14, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1537, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - /* "HTSeq/_HTSeq.pyx":1520 + /* "HTSeq/_HTSeq.pyx":1532 * cigar = "*" * * return '\t'.join((self.read.name, str(self.flag), query_start.chrom, # <<<<<<<<<<<<<< * str(query_start.start + * 1), str(self.aQual), cigar, mate_start.chrom, */ - __pyx_t_11 = PyTuple_New(12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_11 = PyTuple_New(12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_6); @@ -35408,14 +34961,14 @@ __pyx_t_10 = 0; __pyx_t_9 = 0; __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyString_Join(__pyx_kp_s__18, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyString_Join(__pyx_kp_s__14, __pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_r = __pyx_t_12; __pyx_t_12 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1499 + /* "HTSeq/_HTSeq.pyx":1511 * return self.mate_start is not None * * def get_sam_line(self): # <<<<<<<<<<<<<< @@ -35447,7 +35000,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1527 +/* "HTSeq/_HTSeq.pyx":1539 * '\t'.join(self.raw_optional_fields()))) * * def optional_field(SAM_Alignment self, str tag): # <<<<<<<<<<<<<< @@ -35461,7 +35014,7 @@ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("optional_field (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), (&PyString_Type), 1, "tag", 1))) __PYX_ERR(0, 1527, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), (&PyString_Type), 1, "tag", 1))) __PYX_ERR(0, 1539, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_13SAM_Alignment_12optional_field(((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_v_self), ((PyObject*)__pyx_v_tag)); /* function exit code */ @@ -35485,54 +35038,54 @@ int __pyx_t_5; __Pyx_RefNannySetupContext("optional_field", 0); - /* "HTSeq/_HTSeq.pyx":1528 + /* "HTSeq/_HTSeq.pyx":1540 * * def optional_field(SAM_Alignment self, str tag): * res = [p for p in self.optional_fields if p[0] == tag] # <<<<<<<<<<<<<< * if len(res) == 1: * return res[0][1] */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->optional_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1528, __pyx_L1_error) + __PYX_ERR(0, 1540, __pyx_L1_error) } __pyx_t_2 = __pyx_v_self->optional_fields; __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, 1528, __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, 1540, __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, 1528, __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, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_v_p, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_p, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_p, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_v_tag, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyString_Equals(__pyx_t_4, __pyx_v_tag, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_p))) __PYX_ERR(0, 1528, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_v_p))) __PYX_ERR(0, 1540, __pyx_L1_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_res = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1529 + /* "HTSeq/_HTSeq.pyx":1541 * def optional_field(SAM_Alignment self, str tag): * res = [p for p in self.optional_fields if p[0] == tag] * if len(res) == 1: # <<<<<<<<<<<<<< * return res[0][1] * else: */ - __pyx_t_3 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1529, __pyx_L1_error) + __pyx_t_3 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1541, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_3 == 1) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1530 + /* "HTSeq/_HTSeq.pyx":1542 * res = [p for p in self.optional_fields if p[0] == tag] * if len(res) == 1: * return res[0][1] # <<<<<<<<<<<<<< @@ -35540,16 +35093,16 @@ * if len(res) == 0: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_res, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_res, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1542, __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, 1530, __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, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1529 + /* "HTSeq/_HTSeq.pyx":1541 * def optional_field(SAM_Alignment self, str tag): * res = [p for p in self.optional_fields if p[0] == tag] * if len(res) == 1: # <<<<<<<<<<<<<< @@ -35558,7 +35111,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1532 + /* "HTSeq/_HTSeq.pyx":1544 * return res[0][1] * else: * if len(res) == 0: # <<<<<<<<<<<<<< @@ -35566,24 +35119,24 @@ * else: */ /*else*/ { - __pyx_t_3 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1532, __pyx_L1_error) + __pyx_t_3 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1544, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_3 == 0) != 0); if (unlikely(__pyx_t_5)) { - /* "HTSeq/_HTSeq.pyx":1533 + /* "HTSeq/_HTSeq.pyx":1545 * else: * if len(res) == 0: * raise KeyError, "SAM optional field tag %s not found" % tag # <<<<<<<<<<<<<< * else: * raise ValueError, "SAM optional field tag %s not unique" % tag */ - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_SAM_optional_field_tag_s_not_fou, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1533, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_SAM_optional_field_tag_s_not_fou, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1545, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_builtin_KeyError, __pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1533, __pyx_L1_error) + __PYX_ERR(0, 1545, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1532 + /* "HTSeq/_HTSeq.pyx":1544 * return res[0][1] * else: * if len(res) == 0: # <<<<<<<<<<<<<< @@ -35592,7 +35145,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1535 + /* "HTSeq/_HTSeq.pyx":1547 * raise KeyError, "SAM optional field tag %s not found" % tag * else: * raise ValueError, "SAM optional field tag %s not unique" % tag # <<<<<<<<<<<<<< @@ -35600,15 +35153,15 @@ * def raw_optional_fields(self): */ /*else*/ { - __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_SAM_optional_field_tag_s_not_uni, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1535, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_SAM_optional_field_tag_s_not_uni, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1535, __pyx_L1_error) + __PYX_ERR(0, 1547, __pyx_L1_error) } } - /* "HTSeq/_HTSeq.pyx":1527 + /* "HTSeq/_HTSeq.pyx":1539 * '\t'.join(self.raw_optional_fields()))) * * def optional_field(SAM_Alignment self, str tag): # <<<<<<<<<<<<<< @@ -35631,7 +35184,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1537 +/* "HTSeq/_HTSeq.pyx":1549 * raise ValueError, "SAM optional field tag %s not unique" % tag * * def raw_optional_fields(self): # <<<<<<<<<<<<<< @@ -35668,19 +35221,19 @@ int __pyx_t_8; __Pyx_RefNannySetupContext("raw_optional_fields", 0); - /* "HTSeq/_HTSeq.pyx":1538 + /* "HTSeq/_HTSeq.pyx":1550 * * def raw_optional_fields(self): * res = [] # <<<<<<<<<<<<<< * for op in self.optional_fields: * if op[1].__class__ == str: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_res = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1539 + /* "HTSeq/_HTSeq.pyx":1551 * def raw_optional_fields(self): * res = [] * for op in self.optional_fields: # <<<<<<<<<<<<<< @@ -35689,53 +35242,53 @@ */ if (unlikely(__pyx_v_self->optional_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1539, __pyx_L1_error) + __PYX_ERR(0, 1551, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->optional_fields; __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, 1539, __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, 1551, __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, 1539, __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, 1551, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1540 + /* "HTSeq/_HTSeq.pyx":1552 * res = [] * for op in self.optional_fields: * if op[1].__class__ == str: # <<<<<<<<<<<<<< * if len(op[1]) == 1: * tc = "A" */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyString_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1541 + /* "HTSeq/_HTSeq.pyx":1553 * for op in self.optional_fields: * if op[1].__class__ == str: * if len(op[1]) == 1: # <<<<<<<<<<<<<< * tc = "A" * else: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1553, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1541, __pyx_L1_error) + __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1553, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((__pyx_t_6 == 1) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1542 + /* "HTSeq/_HTSeq.pyx":1554 * if op[1].__class__ == str: * if len(op[1]) == 1: * tc = "A" # <<<<<<<<<<<<<< @@ -35745,7 +35298,7 @@ __Pyx_INCREF(__pyx_n_s_A); __Pyx_XDECREF_SET(__pyx_v_tc, __pyx_n_s_A); - /* "HTSeq/_HTSeq.pyx":1541 + /* "HTSeq/_HTSeq.pyx":1553 * for op in self.optional_fields: * if op[1].__class__ == str: * if len(op[1]) == 1: # <<<<<<<<<<<<<< @@ -35755,7 +35308,7 @@ goto __pyx_L6; } - /* "HTSeq/_HTSeq.pyx":1544 + /* "HTSeq/_HTSeq.pyx":1556 * tc = "A" * else: * tc = "Z" # <<<<<<<<<<<<<< @@ -35768,7 +35321,7 @@ } __pyx_L6:; - /* "HTSeq/_HTSeq.pyx":1540 + /* "HTSeq/_HTSeq.pyx":1552 * res = [] * for op in self.optional_fields: * if op[1].__class__ == str: # <<<<<<<<<<<<<< @@ -35778,25 +35331,25 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":1545 + /* "HTSeq/_HTSeq.pyx":1557 * else: * tc = "Z" * elif op[1].__class__ == int: # <<<<<<<<<<<<<< * tc = "i" * elif op[1].__class__ == float: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1546 + /* "HTSeq/_HTSeq.pyx":1558 * tc = "Z" * elif op[1].__class__ == int: * tc = "i" # <<<<<<<<<<<<<< @@ -35806,7 +35359,7 @@ __Pyx_INCREF(__pyx_n_s_i); __Pyx_XDECREF_SET(__pyx_v_tc, __pyx_n_s_i); - /* "HTSeq/_HTSeq.pyx":1545 + /* "HTSeq/_HTSeq.pyx":1557 * else: * tc = "Z" * elif op[1].__class__ == int: # <<<<<<<<<<<<<< @@ -35816,25 +35369,25 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":1547 + /* "HTSeq/_HTSeq.pyx":1559 * elif op[1].__class__ == int: * tc = "i" * elif op[1].__class__ == float: # <<<<<<<<<<<<<< * tc = "j" * else: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1547, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1559, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1548 + /* "HTSeq/_HTSeq.pyx":1560 * tc = "i" * elif op[1].__class__ == float: * tc = "j" # <<<<<<<<<<<<<< @@ -35844,7 +35397,7 @@ __Pyx_INCREF(__pyx_n_s_j); __Pyx_XDECREF_SET(__pyx_v_tc, __pyx_n_s_j); - /* "HTSeq/_HTSeq.pyx":1547 + /* "HTSeq/_HTSeq.pyx":1559 * elif op[1].__class__ == int: * tc = "i" * elif op[1].__class__ == float: # <<<<<<<<<<<<<< @@ -35854,7 +35407,7 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":1550 + /* "HTSeq/_HTSeq.pyx":1562 * tc = "j" * else: * tc = "H" # <<<<<<<<<<<<<< @@ -35867,21 +35420,21 @@ } __pyx_L5:; - /* "HTSeq/_HTSeq.pyx":1551 + /* "HTSeq/_HTSeq.pyx":1563 * else: * tc = "H" * res.append(":".join([op[0], tc, str(op[1])])) # <<<<<<<<<<<<<< * return res * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyString_Type)), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -35892,13 +35445,13 @@ PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_7); __pyx_t_3 = 0; __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__21, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyString_Join(__pyx_kp_s__16, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1551, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1563, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1539 + /* "HTSeq/_HTSeq.pyx":1551 * def raw_optional_fields(self): * res = [] * for op in self.optional_fields: # <<<<<<<<<<<<<< @@ -35908,7 +35461,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1552 + /* "HTSeq/_HTSeq.pyx":1564 * tc = "H" * res.append(":".join([op[0], tc, str(op[1])])) * return res # <<<<<<<<<<<<<< @@ -35920,7 +35473,7 @@ __pyx_r = __pyx_v_res; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1537 + /* "HTSeq/_HTSeq.pyx":1549 * raise ValueError, "SAM optional field tag %s not unique" % tag * * def raw_optional_fields(self): # <<<<<<<<<<<<<< @@ -35947,7 +35500,7 @@ /* "HTSeq/_HTSeq.pxd":51 * - * cdef class SAM_Alignment( AlignmentWithSequenceReversal ): + * cdef class SAM_Alignment(AlignmentWithSequenceReversal): * cdef public list cigar # <<<<<<<<<<<<<< * cdef public int aQual * cdef public GenomicPosition mate_start @@ -36051,7 +35604,7 @@ } /* "HTSeq/_HTSeq.pxd":52 - * cdef class SAM_Alignment( AlignmentWithSequenceReversal ): + * cdef class SAM_Alignment(AlignmentWithSequenceReversal): * cdef public list cigar * cdef public int aQual # <<<<<<<<<<<<<< * cdef public GenomicPosition mate_start @@ -36935,8 +36488,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -36953,9 +36506,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_13SAM_Alignment_16__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -36972,30 +36525,30 @@ int __pyx_t_12; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->failed_platform_qc); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->failed_platform_qc); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->not_primary_alignment); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->not_primary_alignment); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->pcr_or_optical_duplicate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->pcr_or_optical_duplicate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->proper_pair); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->proper_pair); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_self->supplementary); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_self->supplementary); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyTuple_New(17); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(17); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); @@ -37051,19 +36604,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_9 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_v__dict = __pyx_t_9; __pyx_t_9 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -37074,25 +36627,25 @@ __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v__dict); - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -37101,7 +36654,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -37111,7 +36664,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.cigar is not None or self.iv is not None or self.mate_start is not None or self.optional_fields is not None or self.original_sam_line is not None or self.pe_which is not None or self.read_as_aligned is not None # <<<<<<<<<<<<<< @@ -37183,7 +36736,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.cigar is not None or self.iv is not None or self.mate_start is not None or self.optional_fields is not None or self.original_sam_line is not None or self.pe_which is not None or self.read_as_aligned is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -37193,7 +36746,7 @@ __pyx_t_11 = (__pyx_v_use_setstate != 0); if (__pyx_t_11) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.cigar is not None or self.iv is not None or self.mate_start is not None or self.optional_fields is not None or self.original_sam_line is not None or self.pe_which is not None or self.read_as_aligned is not None * if use_setstate: * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, None), state # <<<<<<<<<<<<<< @@ -37201,9 +36754,9 @@ * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SAM_Alignment); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pyx_unpickle_SAM_Alignment); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -37214,7 +36767,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_9, 2, Py_None); - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); @@ -37229,7 +36782,7 @@ __pyx_t_7 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.cigar is not None or self.iv is not None or self.mate_start is not None or self.optional_fields is not None or self.original_sam_line is not None or self.pe_which is not None or self.read_as_aligned is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -37238,7 +36791,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, None), state * else: * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) # <<<<<<<<<<<<<< @@ -37247,9 +36800,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SAM_Alignment); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_pyx_unpickle_SAM_Alignment); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -37260,7 +36813,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_state); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); @@ -37275,8 +36828,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -37300,7 +36853,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -37326,17 +36879,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_SAM_Alignment__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_SAM_Alignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_SAM_Alignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -37356,7 +36909,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1559 +/* "HTSeq/_HTSeq.pyx":1571 * ########################### * * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): # <<<<<<<<<<<<<< @@ -37366,8 +36919,8 @@ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_15quotesafe_split(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_quotesafe_split(PyObject *__pyx_v_s, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_quotesafe_split *__pyx_optional_args) { - PyObject *__pyx_v_split = ((PyObject*)__pyx_kp_b__34); - PyObject *__pyx_v_quote = ((PyObject*)__pyx_kp_b__35); + PyObject *__pyx_v_split = ((PyObject*)__pyx_kp_b__23); + PyObject *__pyx_v_quote = ((PyObject*)__pyx_kp_b__24); PyObject *__pyx_v_l = 0; int __pyx_v_i; int __pyx_v_begin_token; @@ -37394,19 +36947,19 @@ } } - /* "HTSeq/_HTSeq.pyx":1560 + /* "HTSeq/_HTSeq.pyx":1572 * * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): * cdef list l = [] # <<<<<<<<<<<<<< * cdef int i = 0 * cdef int begin_token = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1560, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1572, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_l = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1561 + /* "HTSeq/_HTSeq.pyx":1573 * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): * cdef list l = [] * cdef int i = 0 # <<<<<<<<<<<<<< @@ -37415,7 +36968,7 @@ */ __pyx_v_i = 0; - /* "HTSeq/_HTSeq.pyx":1562 + /* "HTSeq/_HTSeq.pyx":1574 * cdef list l = [] * cdef int i = 0 * cdef int begin_token = 0 # <<<<<<<<<<<<<< @@ -37424,7 +36977,7 @@ */ __pyx_v_begin_token = 0; - /* "HTSeq/_HTSeq.pyx":1563 + /* "HTSeq/_HTSeq.pyx":1575 * cdef int i = 0 * cdef int begin_token = 0 * cdef bint in_quote = False # <<<<<<<<<<<<<< @@ -37433,7 +36986,7 @@ */ __pyx_v_in_quote = 0; - /* "HTSeq/_HTSeq.pyx":1564 + /* "HTSeq/_HTSeq.pyx":1576 * cdef int begin_token = 0 * cdef bint in_quote = False * cdef char * s_c = s # <<<<<<<<<<<<<< @@ -37442,12 +36995,12 @@ */ if (unlikely(__pyx_v_s == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 1564, __pyx_L1_error) + __PYX_ERR(0, 1576, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1576, __pyx_L1_error) __pyx_v_s_c = __pyx_t_2; - /* "HTSeq/_HTSeq.pyx":1565 + /* "HTSeq/_HTSeq.pyx":1577 * cdef bint in_quote = False * cdef char * s_c = s * cdef char split_c = split[0] # <<<<<<<<<<<<<< @@ -37456,12 +37009,12 @@ */ if (unlikely(__pyx_v_split == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1565, __pyx_L1_error) + __PYX_ERR(0, 1577, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GetItemInt(__pyx_v_split, 0, 1); if (unlikely(__pyx_t_3 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GetItemInt(__pyx_v_split, 0, 1); if (unlikely(__pyx_t_3 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1577, __pyx_L1_error) __pyx_v_split_c = __pyx_t_3; - /* "HTSeq/_HTSeq.pyx":1566 + /* "HTSeq/_HTSeq.pyx":1578 * cdef char * s_c = s * cdef char split_c = split[0] * cdef char quote_c = quote[0] # <<<<<<<<<<<<<< @@ -37470,12 +37023,12 @@ */ if (unlikely(__pyx_v_quote == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1566, __pyx_L1_error) + __PYX_ERR(0, 1578, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GetItemInt(__pyx_v_quote, 0, 1); if (unlikely(__pyx_t_3 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1566, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GetItemInt(__pyx_v_quote, 0, 1); if (unlikely(__pyx_t_3 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1578, __pyx_L1_error) __pyx_v_quote_c = __pyx_t_3; - /* "HTSeq/_HTSeq.pyx":1567 + /* "HTSeq/_HTSeq.pyx":1579 * cdef char split_c = split[0] * cdef char quote_c = quote[0] * if len(split) != 1: # <<<<<<<<<<<<<< @@ -37484,13 +37037,13 @@ */ if (unlikely(__pyx_v_split == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1567, __pyx_L1_error) + __PYX_ERR(0, 1579, __pyx_L1_error) } - __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_split); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1567, __pyx_L1_error) + __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_split); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1579, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 != 1) != 0); if (unlikely(__pyx_t_5)) { - /* "HTSeq/_HTSeq.pyx":1568 + /* "HTSeq/_HTSeq.pyx":1580 * cdef char quote_c = quote[0] * if len(split) != 1: * raise ValueError, "'split' must be length 1" # <<<<<<<<<<<<<< @@ -37498,9 +37051,9 @@ * raise ValueError, "'quote' must be length 1" */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_split_must_be_length_1, 0, 0); - __PYX_ERR(0, 1568, __pyx_L1_error) + __PYX_ERR(0, 1580, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1567 + /* "HTSeq/_HTSeq.pyx":1579 * cdef char split_c = split[0] * cdef char quote_c = quote[0] * if len(split) != 1: # <<<<<<<<<<<<<< @@ -37509,7 +37062,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1569 + /* "HTSeq/_HTSeq.pyx":1581 * if len(split) != 1: * raise ValueError, "'split' must be length 1" * if len(quote) != 1: # <<<<<<<<<<<<<< @@ -37518,13 +37071,13 @@ */ if (unlikely(__pyx_v_quote == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1569, __pyx_L1_error) + __PYX_ERR(0, 1581, __pyx_L1_error) } - __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_quote); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1569, __pyx_L1_error) + __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_quote); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1581, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 != 1) != 0); if (unlikely(__pyx_t_5)) { - /* "HTSeq/_HTSeq.pyx":1570 + /* "HTSeq/_HTSeq.pyx":1582 * raise ValueError, "'split' must be length 1" * if len(quote) != 1: * raise ValueError, "'quote' must be length 1" # <<<<<<<<<<<<<< @@ -37532,9 +37085,9 @@ * if s_c[i] == quote_c: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_quote_must_be_length_1, 0, 0); - __PYX_ERR(0, 1570, __pyx_L1_error) + __PYX_ERR(0, 1582, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1569 + /* "HTSeq/_HTSeq.pyx":1581 * if len(split) != 1: * raise ValueError, "'split' must be length 1" * if len(quote) != 1: # <<<<<<<<<<<<<< @@ -37543,7 +37096,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1571 + /* "HTSeq/_HTSeq.pyx":1583 * if len(quote) != 1: * raise ValueError, "'quote' must be length 1" * while s_c[i] != 0: # <<<<<<<<<<<<<< @@ -37554,7 +37107,7 @@ __pyx_t_5 = (((__pyx_v_s_c[__pyx_v_i]) != 0) != 0); if (!__pyx_t_5) break; - /* "HTSeq/_HTSeq.pyx":1572 + /* "HTSeq/_HTSeq.pyx":1584 * raise ValueError, "'quote' must be length 1" * while s_c[i] != 0: * if s_c[i] == quote_c: # <<<<<<<<<<<<<< @@ -37564,7 +37117,7 @@ __pyx_t_5 = (((__pyx_v_s_c[__pyx_v_i]) == __pyx_v_quote_c) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1573 + /* "HTSeq/_HTSeq.pyx":1585 * while s_c[i] != 0: * if s_c[i] == quote_c: * in_quote = not in_quote # <<<<<<<<<<<<<< @@ -37573,7 +37126,7 @@ */ __pyx_v_in_quote = (!(__pyx_v_in_quote != 0)); - /* "HTSeq/_HTSeq.pyx":1572 + /* "HTSeq/_HTSeq.pyx":1584 * raise ValueError, "'quote' must be length 1" * while s_c[i] != 0: * if s_c[i] == quote_c: # <<<<<<<<<<<<<< @@ -37583,7 +37136,7 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1574 + /* "HTSeq/_HTSeq.pyx":1586 * if s_c[i] == quote_c: * in_quote = not in_quote * elif (not in_quote) and s_c[i] == split_c: # <<<<<<<<<<<<<< @@ -37601,7 +37154,7 @@ __pyx_L8_bool_binop_done:; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1575 + /* "HTSeq/_HTSeq.pyx":1587 * in_quote = not in_quote * elif (not in_quote) and s_c[i] == split_c: * l.append(s[begin_token: i]) # <<<<<<<<<<<<<< @@ -37610,14 +37163,14 @@ */ if (unlikely(__pyx_v_s == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1575, __pyx_L1_error) + __PYX_ERR(0, 1587, __pyx_L1_error) } - __pyx_t_1 = PySequence_GetSlice(__pyx_v_s, __pyx_v_begin_token, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_1 = PySequence_GetSlice(__pyx_v_s, __pyx_v_begin_token, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1575, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1587, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1576 + /* "HTSeq/_HTSeq.pyx":1588 * elif (not in_quote) and s_c[i] == split_c: * l.append(s[begin_token: i]) * begin_token = i + 1 # <<<<<<<<<<<<<< @@ -37626,7 +37179,7 @@ */ __pyx_v_begin_token = (__pyx_v_i + 1); - /* "HTSeq/_HTSeq.pyx":1574 + /* "HTSeq/_HTSeq.pyx":1586 * if s_c[i] == quote_c: * in_quote = not in_quote * elif (not in_quote) and s_c[i] == split_c: # <<<<<<<<<<<<<< @@ -37636,7 +37189,7 @@ } __pyx_L7:; - /* "HTSeq/_HTSeq.pyx":1577 + /* "HTSeq/_HTSeq.pyx":1589 * l.append(s[begin_token: i]) * begin_token = i + 1 * i += 1 # <<<<<<<<<<<<<< @@ -37646,7 +37199,7 @@ __pyx_v_i = (__pyx_v_i + 1); } - /* "HTSeq/_HTSeq.pyx":1578 + /* "HTSeq/_HTSeq.pyx":1590 * begin_token = i + 1 * i += 1 * l.append(s[begin_token:]) # <<<<<<<<<<<<<< @@ -37655,14 +37208,14 @@ */ if (unlikely(__pyx_v_s == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1578, __pyx_L1_error) + __PYX_ERR(0, 1590, __pyx_L1_error) } - __pyx_t_1 = PySequence_GetSlice(__pyx_v_s, __pyx_v_begin_token, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_1 = PySequence_GetSlice(__pyx_v_s, __pyx_v_begin_token, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1590, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1578, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1590, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1579 + /* "HTSeq/_HTSeq.pyx":1591 * i += 1 * l.append(s[begin_token:]) * if in_quote: # <<<<<<<<<<<<<< @@ -37672,16 +37225,16 @@ __pyx_t_5 = (__pyx_v_in_quote != 0); if (unlikely(__pyx_t_5)) { - /* "HTSeq/_HTSeq.pyx":1580 + /* "HTSeq/_HTSeq.pyx":1592 * l.append(s[begin_token:]) * if in_quote: * raise ValueError, "unmatched quote" # <<<<<<<<<<<<<< * return l */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_s_unmatched_quote, 0, 0); - __PYX_ERR(0, 1580, __pyx_L1_error) + __PYX_ERR(0, 1592, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1579 + /* "HTSeq/_HTSeq.pyx":1591 * i += 1 * l.append(s[begin_token:]) * if in_quote: # <<<<<<<<<<<<<< @@ -37690,7 +37243,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1581 + /* "HTSeq/_HTSeq.pyx":1593 * if in_quote: * raise ValueError, "unmatched quote" * return l # <<<<<<<<<<<<<< @@ -37700,7 +37253,7 @@ __pyx_r = __pyx_v_l; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1559 + /* "HTSeq/_HTSeq.pyx":1571 * ########################### * * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): # <<<<<<<<<<<<<< @@ -37732,8 +37285,8 @@ { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s_3,&__pyx_n_s_split,&__pyx_n_s_quote,0}; PyObject* values[3] = {0,0,0}; - values[1] = ((PyObject*)__pyx_kp_b__34); - values[2] = ((PyObject*)__pyx_kp_b__35); + values[1] = ((PyObject*)__pyx_kp_b__23); + values[2] = ((PyObject*)__pyx_kp_b__24); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -37766,7 +37319,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "quotesafe_split") < 0)) __PYX_ERR(0, 1559, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "quotesafe_split") < 0)) __PYX_ERR(0, 1571, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -37785,15 +37338,15 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("quotesafe_split", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1559, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("quotesafe_split", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1571, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.quotesafe_split", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyBytes_Type), 1, "s", 1))) __PYX_ERR(0, 1559, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_split), (&PyBytes_Type), 1, "split", 1))) __PYX_ERR(0, 1559, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_quote), (&PyBytes_Type), 1, "quote", 1))) __PYX_ERR(0, 1559, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyBytes_Type), 1, "s", 1))) __PYX_ERR(0, 1571, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_split), (&PyBytes_Type), 1, "split", 1))) __PYX_ERR(0, 1571, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_quote), (&PyBytes_Type), 1, "quote", 1))) __PYX_ERR(0, 1571, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_14quotesafe_split(__pyx_self, __pyx_v_s, __pyx_v_split, __pyx_v_quote); /* function exit code */ @@ -37815,7 +37368,7 @@ __pyx_t_2.__pyx_n = 2; __pyx_t_2.split = __pyx_v_split; __pyx_t_2.quote = __pyx_v_quote; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_quotesafe_split(__pyx_v_s, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1559, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_quotesafe_split(__pyx_v_s, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1571, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -37834,13 +37387,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x77bfdf2: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment = {"__pyx_unpickle_Alignment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment = {"__pyx_unpickle_Alignment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -37912,8 +37465,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_16__pyx_unpickle_Alignment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -37921,12 +37474,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_Alignment", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x77bfdf2: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) @@ -37934,38 +37487,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x77bfdf2) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0x77bfdf2: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) * __pyx_result = Alignment.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0x77bfdf2: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Alignment.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x77, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x77, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -37979,110 +37532,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x77bfdf2: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) * __pyx_result = Alignment.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Alignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Alignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) * __pyx_result = Alignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -38090,22 +37586,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = Alignment.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_Alignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_Alignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_Alignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_Alignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) * __pyx_result = Alignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -38114,7 +37610,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -38128,8 +37624,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x77bfdf2: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -38138,7 +37634,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_Alignment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -38149,7 +37644,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -38168,10 +37663,9 @@ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_Alignment__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result.iv = __pyx_state[1] # <<<<<<<<<<<<<< @@ -38180,11 +37674,11 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_read); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_read)); @@ -38192,18 +37686,18 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->iv)); __pyx_v___pyx_result->iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result.iv = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -38211,36 +37705,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._read = __pyx_state[0]; __pyx_result.iv = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -38252,45 +37746,15 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result.iv = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -38298,7 +37762,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -38314,7 +37778,6 @@ __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_Alignment__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -38325,13 +37788,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x1b7eeff: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal = {"__pyx_unpickle_AlignmentWithSequenceReversal", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal = {"__pyx_unpickle_AlignmentWithSequenceReversal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -38403,8 +37866,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_18__pyx_unpickle_AlignmentWithSequenceReversal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -38412,12 +37875,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_AlignmentWithSequenceReversal", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x1b7eeff: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) @@ -38425,38 +37888,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x1b7eeff) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0x1b7eeff: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0x1b7eeff: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x1b, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x1b, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -38470,110 +37933,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x1b7eeff: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -38581,22 +37987,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_AlignmentWithSequenceReversal__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_AlignmentWithSequenceReversal__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -38605,7 +38011,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -38619,8 +38025,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x1b7eeff: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -38629,7 +38035,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_AlignmentWithSequenceReversal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -38640,7 +38045,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -38659,10 +38064,9 @@ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_AlignmentWithSequenceReversal__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3] # <<<<<<<<<<<<<< @@ -38671,11 +38075,11 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._read)); @@ -38683,11 +38087,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_read_as_sequenced); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_read_as_sequenced)); @@ -38695,11 +38099,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.iv)); @@ -38707,18 +38111,18 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->read_as_aligned); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->read_as_aligned)); __pyx_v___pyx_result->read_as_aligned = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -38726,36 +38130,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -38767,45 +38171,15 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -38813,7 +38187,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -38829,7 +38203,6 @@ __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_AlignmentWithSequenceReversal__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -38840,13 +38213,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x482c176: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment = {"__pyx_unpickle_BowtieAlignment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment = {"__pyx_unpickle_BowtieAlignment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -38918,8 +38291,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_20__pyx_unpickle_BowtieAlignment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -38927,12 +38300,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_BowtieAlignment", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x482c176: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) @@ -38940,38 +38313,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x482c176) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0x482c176: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) * __pyx_result = BowtieAlignment.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0x482c176: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = BowtieAlignment.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x48, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x48, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -38985,110 +38358,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x482c176: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) * __pyx_result = BowtieAlignment.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_BowtieAlignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_BowtieAlignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) * __pyx_result = BowtieAlignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -39096,22 +38412,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = BowtieAlignment.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_BowtieAlignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_BowtieAlignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_BowtieAlignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_BowtieAlignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) * __pyx_result = BowtieAlignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -39120,7 +38436,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -39134,8 +38450,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x482c176: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -39144,7 +38460,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_BowtieAlignment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -39155,7 +38470,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -39174,10 +38489,9 @@ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_BowtieAlignment__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3]; __pyx_result.reserved = __pyx_state[4]; __pyx_result.substitutions = __pyx_state[5] # <<<<<<<<<<<<<< @@ -39186,11 +38500,11 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._read); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._read)); @@ -39198,11 +38512,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_as_sequenced); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._read_as_sequenced)); @@ -39210,11 +38524,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.iv)); @@ -39222,11 +38536,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.read_as_aligned); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.read_as_aligned)); @@ -39234,11 +38548,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->reserved); __Pyx_DECREF(__pyx_v___pyx_result->reserved); @@ -39246,18 +38560,18 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->substitutions); __Pyx_DECREF(__pyx_v___pyx_result->substitutions); __pyx_v___pyx_result->substitutions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3]; __pyx_result.reserved = __pyx_state[4]; __pyx_result.substitutions = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -39265,36 +38579,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 6) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3]; __pyx_result.reserved = __pyx_state[4]; __pyx_result.substitutions = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[6]) # <<<<<<<<<<<<<< */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -39306,45 +38620,15 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3]; __pyx_result.reserved = __pyx_state[4]; __pyx_result.substitutions = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -39352,7 +38636,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -39368,7 +38652,6 @@ __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_BowtieAlignment__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -39379,13 +38662,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xb5bd29c: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation = {"__pyx_unpickle_CigarOperation", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation = {"__pyx_unpickle_CigarOperation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -39457,8 +38740,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_22__pyx_unpickle_CigarOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -39466,12 +38749,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_CigarOperation", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0xb5bd29c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) @@ -39479,38 +38762,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb5bd29c) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0xb5bd29c: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) * __pyx_result = CigarOperation.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0xb5bd29c: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = CigarOperation.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -39524,110 +38807,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0xb5bd29c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) * __pyx_result = CigarOperation.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) * __pyx_result = CigarOperation.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -39635,22 +38861,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = CigarOperation.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_CigarOperation__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_CigarOperation__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) * __pyx_result = CigarOperation.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -39659,7 +38885,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -39673,8 +38899,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xb5bd29c: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -39683,7 +38909,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_CigarOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -39694,7 +38919,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -39714,10 +38939,9 @@ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_CigarOperation__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): * __pyx_result.query_from = __pyx_state[0]; __pyx_result.query_to = __pyx_state[1]; __pyx_result.ref_iv = __pyx_state[2]; __pyx_result.size = __pyx_state[3]; __pyx_result.type = __pyx_state[4] # <<<<<<<<<<<<<< @@ -39726,29 +38950,29 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->query_from = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->query_to = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->ref_iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->ref_iv)); @@ -39756,27 +38980,27 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->size = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->type); __Pyx_DECREF(__pyx_v___pyx_result->type); __pyx_v___pyx_result->type = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): * __pyx_result.query_from = __pyx_state[0]; __pyx_result.query_to = __pyx_state[1]; __pyx_result.ref_iv = __pyx_state[2]; __pyx_result.size = __pyx_state[3]; __pyx_result.type = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -39784,36 +39008,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 5) != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result.query_from = __pyx_state[0]; __pyx_result.query_to = __pyx_state[1]; __pyx_result.ref_iv = __pyx_state[2]; __pyx_result.size = __pyx_state[3]; __pyx_result.type = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<< */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -39825,45 +39049,15 @@ __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (!__pyx_t_9) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): * __pyx_result.query_from = __pyx_state[0]; __pyx_result.query_to = __pyx_state[1]; __pyx_result.ref_iv = __pyx_state[2]; __pyx_result.size = __pyx_state[3]; __pyx_result.type = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -39871,7 +39065,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -39887,7 +39081,6 @@ __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_CigarOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -39898,13 +39091,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xf6933f3: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment = {"__pyx_unpickle_SAM_Alignment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment = {"__pyx_unpickle_SAM_Alignment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -39976,8 +39169,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_24__pyx_unpickle_SAM_Alignment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -39985,12 +39178,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_SAM_Alignment", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0xf6933f3: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) @@ -39998,38 +39191,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xf6933f3) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0xf6933f3: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) * __pyx_result = SAM_Alignment.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, -1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0xf6933f3: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = SAM_Alignment.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xf6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xf6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -40043,110 +39236,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0xf6933f3: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) * __pyx_result = SAM_Alignment.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) * __pyx_result = SAM_Alignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -40154,22 +39290,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = SAM_Alignment.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_SAM_Alignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_SAM_Alignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) * __pyx_result = SAM_Alignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -40178,7 +39314,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -40192,8 +39328,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xf6933f3: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -40202,7 +39338,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_SAM_Alignment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -40213,7 +39348,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -40233,10 +39368,9 @@ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_SAM_Alignment__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): * __pyx_result._flag = __pyx_state[0]; __pyx_result._read = __pyx_state[1]; __pyx_result._read_as_sequenced = __pyx_state[2]; __pyx_result.aQual = __pyx_state[3]; __pyx_result.cigar = __pyx_state[4]; __pyx_result.failed_platform_qc = __pyx_state[5]; __pyx_result.inferred_insert_size = __pyx_state[6]; __pyx_result.iv = __pyx_state[7]; __pyx_result.mate_start = __pyx_state[8]; __pyx_result.not_primary_alignment = __pyx_state[9]; __pyx_result.optional_fields = __pyx_state[10]; __pyx_result.original_sam_line = __pyx_state[11]; __pyx_result.pcr_or_optical_duplicate = __pyx_state[12]; __pyx_result.pe_which = __pyx_state[13]; __pyx_result.proper_pair = __pyx_state[14]; __pyx_result.read_as_aligned = __pyx_state[15]; __pyx_result.supplementary = __pyx_state[16] # <<<<<<<<<<<<<< @@ -40245,20 +39379,20 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->_flag = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._read); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._read)); @@ -40266,11 +39400,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_as_sequenced); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._read_as_sequenced)); @@ -40278,20 +39412,20 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->aQual = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->cigar); __Pyx_DECREF(__pyx_v___pyx_result->cigar); @@ -40299,29 +39433,29 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->failed_platform_qc = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->inferred_insert_size = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.iv)); @@ -40329,11 +39463,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->mate_start); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->mate_start)); @@ -40341,20 +39475,20 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->not_primary_alignment = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->optional_fields); __Pyx_DECREF(__pyx_v___pyx_result->optional_fields); @@ -40362,11 +39496,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->original_sam_line); __Pyx_DECREF(__pyx_v___pyx_result->original_sam_line); @@ -40374,20 +39508,20 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->pcr_or_optical_duplicate = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(PyString_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "str", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->pe_which); __Pyx_DECREF(__pyx_v___pyx_result->pe_which); @@ -40395,20 +39529,20 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->proper_pair = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.read_as_aligned); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.read_as_aligned)); @@ -40416,15 +39550,15 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->supplementary = __pyx_t_3; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): * __pyx_result._flag = __pyx_state[0]; __pyx_result._read = __pyx_state[1]; __pyx_result._read_as_sequenced = __pyx_state[2]; __pyx_result.aQual = __pyx_state[3]; __pyx_result.cigar = __pyx_state[4]; __pyx_result.failed_platform_qc = __pyx_state[5]; __pyx_result.inferred_insert_size = __pyx_state[6]; __pyx_result.iv = __pyx_state[7]; __pyx_result.mate_start = __pyx_state[8]; __pyx_result.not_primary_alignment = __pyx_state[9]; __pyx_result.optional_fields = __pyx_state[10]; __pyx_result.original_sam_line = __pyx_state[11]; __pyx_result.pcr_or_optical_duplicate = __pyx_state[12]; __pyx_result.pe_which = __pyx_state[13]; __pyx_result.proper_pair = __pyx_state[14]; __pyx_result.read_as_aligned = __pyx_state[15]; __pyx_result.supplementary = __pyx_state[16] * if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -40432,36 +39566,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 17) != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._flag = __pyx_state[0]; __pyx_result._read = __pyx_state[1]; __pyx_result._read_as_sequenced = __pyx_state[2]; __pyx_result.aQual = __pyx_state[3]; __pyx_result.cigar = __pyx_state[4]; __pyx_result.failed_platform_qc = __pyx_state[5]; __pyx_result.inferred_insert_size = __pyx_state[6]; __pyx_result.iv = __pyx_state[7]; __pyx_result.mate_start = __pyx_state[8]; __pyx_result.not_primary_alignment = __pyx_state[9]; __pyx_result.optional_fields = __pyx_state[10]; __pyx_result.original_sam_line = __pyx_state[11]; __pyx_result.pcr_or_optical_duplicate = __pyx_state[12]; __pyx_result.pe_which = __pyx_state[13]; __pyx_result.proper_pair = __pyx_state[14]; __pyx_result.read_as_aligned = __pyx_state[15]; __pyx_result.supplementary = __pyx_state[16] * if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[17]) # <<<<<<<<<<<<<< */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -40473,45 +39607,15 @@ __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (!__pyx_t_9) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): * __pyx_result._flag = __pyx_state[0]; __pyx_result._read = __pyx_state[1]; __pyx_result._read_as_sequenced = __pyx_state[2]; __pyx_result.aQual = __pyx_state[3]; __pyx_result.cigar = __pyx_state[4]; __pyx_result.failed_platform_qc = __pyx_state[5]; __pyx_result.inferred_insert_size = __pyx_state[6]; __pyx_result.iv = __pyx_state[7]; __pyx_result.mate_start = __pyx_state[8]; __pyx_result.not_primary_alignment = __pyx_state[9]; __pyx_result.optional_fields = __pyx_state[10]; __pyx_result.original_sam_line = __pyx_state[11]; __pyx_result.pcr_or_optical_duplicate = __pyx_state[12]; __pyx_result.pe_which = __pyx_state[13]; __pyx_result.proper_pair = __pyx_state[14]; __pyx_result.read_as_aligned = __pyx_state[15]; __pyx_result.supplementary = __pyx_state[16] * if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -40519,7 +39623,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -40535,7 +39639,6 @@ __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_SAM_Alignment__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -40544,7 +39647,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":215 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -40582,8 +39685,9 @@ int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - char *__pyx_t_8; + PyArray_Descr *__pyx_t_7; + PyObject *__pyx_t_8 = NULL; + char *__pyx_t_9; if (__pyx_v_info == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; @@ -40592,7 +39696,7 @@ __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 * * cdef int i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -40601,7 +39705,7 @@ */ __pyx_v_endian_detector = 1; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":223 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 * cdef int i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -40610,7 +39714,7 @@ */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":225 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -40619,11 +39723,11 @@ */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); @@ -40633,53 +39737,53 @@ goto __pyx_L4_bool_binop_done; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":228 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not C contiguous") * */ - __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ if (unlikely(__pyx_t_1)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 229, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 229, __pyx_L1_error) + __PYX_ERR(3, 272, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); @@ -40689,49 +39793,49 @@ goto __pyx_L7_bool_binop_done; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":232 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not Fortran contiguous") * */ - __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ if (unlikely(__pyx_t_1)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 233, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 233, __pyx_L1_error) + __PYX_ERR(3, 276, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< @@ -40740,7 +39844,7 @@ */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":236 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -40749,7 +39853,7 @@ */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -40759,7 +39863,7 @@ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":240 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< @@ -40768,7 +39872,7 @@ */ __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":241 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284 * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -40777,7 +39881,7 @@ */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":242 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285 * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< @@ -40789,7 +39893,7 @@ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -40798,7 +39902,7 @@ */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":244 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -40808,7 +39912,7 @@ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -40818,7 +39922,7 @@ goto __pyx_L9; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":246 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -40828,7 +39932,7 @@ /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":247 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -40839,7 +39943,7 @@ } __pyx_L9:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -40848,7 +39952,7 @@ */ __pyx_v_info->suboffsets = NULL; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":249 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -40857,7 +39961,7 @@ */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":250 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -40866,28 +39970,29 @@ */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":253 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< - * cdef dtype descr = self.descr + * cdef dtype descr = PyArray_DESCR(self) * cdef int offset */ __pyx_v_f = NULL; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":254 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297 * cdef int t * cdef char* f = NULL - * cdef dtype descr = self.descr # <<<<<<<<<<<<<< + * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< * cdef int offset * */ - __pyx_t_3 = ((PyObject *)__pyx_v_self->descr); + __pyx_t_7 = PyArray_DESCR(__pyx_v_self); + __pyx_t_3 = ((PyObject *)__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300 * cdef int offset * * info.obj = self # <<<<<<<<<<<<<< @@ -40900,7 +40005,7 @@ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< @@ -40910,7 +40015,7 @@ __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":260 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303 * * if not PyDataType_HASFIELDS(descr): * t = descr.type_num # <<<<<<<<<<<<<< @@ -40920,7 +40025,7 @@ __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -40940,7 +40045,7 @@ } __pyx_L15_next_or:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":262 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -40957,7 +40062,7 @@ __pyx_t_1 = __pyx_t_2; __pyx_L14_bool_binop_done:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -40966,20 +40071,20 @@ */ if (unlikely(__pyx_t_1)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 263, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 263, __pyx_L1_error) + __PYX_ERR(3, 306, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -40988,7 +40093,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":264 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< @@ -40999,206 +40104,206 @@ case NPY_BYTE: __pyx_v_f = ((char *)"b"); break; + case NPY_UBYTE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ - case NPY_UBYTE: __pyx_v_f = ((char *)"B"); break; + case NPY_SHORT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ - case NPY_SHORT: __pyx_v_f = ((char *)"h"); break; + case NPY_USHORT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":267 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ - case NPY_USHORT: __pyx_v_f = ((char *)"H"); break; + case NPY_INT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ - case NPY_INT: __pyx_v_f = ((char *)"i"); break; + case NPY_UINT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":269 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ - case NPY_UINT: __pyx_v_f = ((char *)"I"); break; + case NPY_LONG: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ - case NPY_LONG: __pyx_v_f = ((char *)"l"); break; + case NPY_ULONG: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ - case NPY_ULONG: __pyx_v_f = ((char *)"L"); break; + case NPY_LONGLONG: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ - case NPY_LONGLONG: __pyx_v_f = ((char *)"q"); break; + case NPY_ULONGLONG: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":273 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ - case NPY_ULONGLONG: __pyx_v_f = ((char *)"Q"); break; + case NPY_FLOAT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ - case NPY_FLOAT: __pyx_v_f = ((char *)"f"); break; + case NPY_DOUBLE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ - case NPY_DOUBLE: __pyx_v_f = ((char *)"d"); break; + case NPY_LONGDOUBLE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ - case NPY_LONGDOUBLE: __pyx_v_f = ((char *)"g"); break; + case NPY_CFLOAT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":277 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ - case NPY_CFLOAT: __pyx_v_f = ((char *)"Zf"); break; + case NPY_CDOUBLE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ - case NPY_CDOUBLE: __pyx_v_f = ((char *)"Zd"); break; + case NPY_CLONGDOUBLE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ - case NPY_CLONGDOUBLE: __pyx_v_f = ((char *)"Zg"); break; + case NPY_OBJECT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - case NPY_OBJECT: __pyx_v_f = ((char *)"O"); break; default: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":282 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 282, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 282, __pyx_L1_error) + __PYX_ERR(3, 325, __pyx_L1_error) break; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< @@ -41207,7 +40312,7 @@ */ __pyx_v_info->format = __pyx_v_f; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< @@ -41217,7 +40322,7 @@ __pyx_r = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< @@ -41226,7 +40331,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329 * return * else: * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -41236,7 +40341,7 @@ /*else*/ { __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330 * else: * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -41245,7 +40350,7 @@ */ (__pyx_v_info->format[0]) = '^'; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":288 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331 * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -41254,17 +40359,17 @@ */ __pyx_v_offset = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ - __pyx_t_8 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_8 == ((char *)NULL))) __PYX_ERR(3, 289, __pyx_L1_error) - __pyx_v_f = __pyx_t_8; + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 332, __pyx_L1_error) + __pyx_v_f = __pyx_t_9; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< @@ -41274,7 +40379,7 @@ (__pyx_v_f[0]) = '\x00'; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":215 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -41287,7 +40392,7 @@ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info->obj != NULL) { @@ -41306,7 +40411,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":294 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -41330,7 +40435,7 @@ int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":295 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -41340,7 +40445,7 @@ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) # <<<<<<<<<<<<<< @@ -41349,7 +40454,7 @@ */ PyObject_Free(__pyx_v_info->format); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":295 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -41358,7 +40463,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -41368,7 +40473,7 @@ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":298 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341 * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * PyObject_Free(info.strides) # <<<<<<<<<<<<<< @@ -41377,7 +40482,7 @@ */ PyObject_Free(__pyx_v_info->strides); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -41386,7 +40491,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":294 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -41398,7 +40503,7 @@ __Pyx_RefNannyFinishContext(); } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":775 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -41412,7 +40517,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -41420,13 +40525,13 @@ * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 776, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":775 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -41445,7 +40550,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -41459,7 +40564,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -41467,13 +40572,13 @@ * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 779, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -41492,7 +40597,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":781 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -41506,7 +40611,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -41514,13 +40619,13 @@ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 782, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":781 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -41539,7 +40644,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -41553,7 +40658,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -41561,13 +40666,13 @@ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 785, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -41586,7 +40691,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":787 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -41600,7 +40705,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":788 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -41608,13 +40713,13 @@ * cdef inline tuple PyDataType_SHAPE(dtype d): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 788, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":787 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -41633,7 +40738,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -41647,7 +40752,7 @@ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -41657,7 +40762,7 @@ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":792 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -41669,7 +40774,7 @@ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -41678,7 +40783,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -41692,7 +40797,7 @@ goto __pyx_L0; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -41707,7 +40812,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":796 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -41736,7 +40841,7 @@ char *__pyx_t_9; __Pyx_RefNannySetupContext("_util_dtypestring", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -41745,7 +40850,7 @@ */ __pyx_v_endian_detector = 1; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -41754,7 +40859,7 @@ */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -41763,21 +40868,21 @@ */ if (unlikely(__pyx_v_descr->names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(3, 805, __pyx_L1_error) + __PYX_ERR(3, 851, __pyx_L1_error) } __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 805, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 851, __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(3, 805, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< @@ -41786,15 +40891,15 @@ */ if (unlikely(__pyx_v_descr->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(3, 806, __pyx_L1_error) + __PYX_ERR(3, 852, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 806, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 806, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":807 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< @@ -41807,7 +40912,7 @@ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(3, 807, __pyx_L1_error) + __PYX_ERR(3, 853, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -41815,51 +40920,51 @@ __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(3, 807, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 807, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 807, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 853, __pyx_L1_error) } - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 807, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 853, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 809, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 809, __pyx_L1_error) + __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 809, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (unlikely(__pyx_t_6)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":810 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 810, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 810, __pyx_L1_error) + __PYX_ERR(3, 856, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< @@ -41868,7 +40973,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -41888,7 +40993,7 @@ } __pyx_L8_next_or:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -41905,7 +41010,7 @@ __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -41914,20 +41019,20 @@ */ if (unlikely(__pyx_t_6)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 814, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 814, __pyx_L1_error) + __PYX_ERR(3, 860, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -41936,7 +41041,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -41944,15 +41049,15 @@ * f += 1 */ while (1) { - __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 824, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 824, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 824, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -41961,7 +41066,7 @@ */ (__pyx_v_f[0]) = 0x78; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":826 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -41970,7 +41075,7 @@ */ __pyx_v_f = (__pyx_v_f + 1); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -41981,7 +41086,7 @@ (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":829 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -41991,7 +41096,7 @@ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -42001,19 +41106,19 @@ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":832 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 832, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -42023,20 +41128,20 @@ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (unlikely(__pyx_t_6)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 834, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(3, 834, __pyx_L1_error) + __PYX_ERR(3, 880, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -42045,252 +41150,252 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 837, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 837, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 837, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 838, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 838, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 838, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":839 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 839, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 839, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 839, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x68; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 840, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 840, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 840, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":841 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 841, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 841, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 841, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x69; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 842, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 842, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 842, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":843 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 843, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 843, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 843, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x6C; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":844 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 844, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 844, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 844, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":845 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 845, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 845, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 845, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x71; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":846 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 846, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 846, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 846, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 847, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 847, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 847, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x66; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 848, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 848, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 848, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x64; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":849 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 849, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 849, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 849, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x67; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":850 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 850, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 850, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 850, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -42299,18 +41404,18 @@ goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 851, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 851, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 851, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -42319,18 +41424,18 @@ goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 852, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 852, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -42339,25 +41444,25 @@ goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 853, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 853, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_6)) { (__pyx_v_f[0]) = 79; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -42365,18 +41470,18 @@ * else: */ /*else*/ { - __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(3, 855, __pyx_L1_error) + __PYX_ERR(3, 901, __pyx_L1_error) } __pyx_L15:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< @@ -42385,7 +41490,7 @@ */ __pyx_v_f = (__pyx_v_f + 1); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -42395,7 +41500,7 @@ goto __pyx_L13; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< @@ -42403,12 +41508,12 @@ * */ /*else*/ { - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 860, __pyx_L1_error) + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 906, __pyx_L1_error) __pyx_v_f = __pyx_t_9; } __pyx_L13:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -42418,7 +41523,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":861 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< @@ -42428,7 +41533,7 @@ __pyx_r = __pyx_v_f; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":796 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -42453,166 +41558,120 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977 - * +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * cdef PyObject* baseptr - * if base is None: + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { - PyObject *__pyx_v_baseptr; __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; __Pyx_RefNannySetupContext("set_array_base", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":979 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023 + * * cdef inline void set_array_base(ndarray arr, object base): - * cdef PyObject* baseptr - * if base is None: # <<<<<<<<<<<<<< - * baseptr = NULL - * else: - */ - __pyx_t_1 = (__pyx_v_base == Py_None); - __pyx_t_2 = (__pyx_t_1 != 0); - if (__pyx_t_2) { - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":980 - * cdef PyObject* baseptr - * if base is None: - * baseptr = NULL # <<<<<<<<<<<<<< - * else: - * Py_INCREF(base) # important to do this before decref below! + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * */ - __pyx_v_baseptr = NULL; + Py_INCREF(__pyx_v_base); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":979 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024 * cdef inline void set_array_base(ndarray arr, object base): - * cdef PyObject* baseptr - * if base is None: # <<<<<<<<<<<<<< - * baseptr = NULL - * else: - */ - goto __pyx_L3; - } - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":982 - * baseptr = NULL - * else: - * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< - * baseptr = base - * Py_XDECREF(arr.base) - */ - /*else*/ { - Py_INCREF(__pyx_v_base); - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":983 - * else: - * Py_INCREF(base) # important to do this before decref below! - * baseptr = base # <<<<<<<<<<<<<< - * Py_XDECREF(arr.base) - * arr.base = baseptr - */ - __pyx_v_baseptr = ((PyObject *)__pyx_v_base); - } - __pyx_L3:; - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":984 - * Py_INCREF(base) # important to do this before decref below! - * baseptr = base - * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< - * arr.base = baseptr - * - */ - Py_XDECREF(__pyx_v_arr->base); - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":985 - * baseptr = base - * Py_XDECREF(arr.base) - * arr.base = baseptr # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ - __pyx_v_arr->base = __pyx_v_baseptr; + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977 - * + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * cdef PyObject* baseptr - * if base is None: + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":987 - * arr.base = baseptr +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * if arr.base is NULL: - * return None + * base = PyArray_BASE(arr) + * if base is NULL: */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":988 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027 * * cdef inline object get_array_base(ndarray arr): - * if arr.base is NULL: # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: * return None - * else: */ - __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); - if (__pyx_t_1) { + __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":989 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 * cdef inline object get_array_base(ndarray arr): - * if arr.base is NULL: + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029 + * base = PyArray_BASE(arr) + * if base is NULL: * return None # <<<<<<<<<<<<<< - * else: - * return arr.base + * return base + * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":988 - * + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 * cdef inline object get_array_base(ndarray arr): - * if arr.base is NULL: # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< * return None - * else: + * return base */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":991 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030 + * if base is NULL: * return None - * else: - * return arr.base # <<<<<<<<<<<<<< - * + * return base # <<<<<<<<<<<<<< * + * # Versions of the import_* functions which are more suitable for */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); - __pyx_r = ((PyObject *)__pyx_v_arr->base); - goto __pyx_L0; - } + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":987 - * arr.base = baseptr + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * if arr.base is NULL: - * return None + * base = PyArray_BASE(arr) + * if base is NULL: */ /* function exit code */ @@ -42622,7 +41681,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":996 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -42643,7 +41702,7 @@ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_array", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -42659,16 +41718,16 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036 * cdef inline int import_array() except -1: * try: * _import_array() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.multiarray failed to import") */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 998, __pyx_L3_error) + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1036, __pyx_L3_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -42682,7 +41741,7 @@ goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":999 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037 * try: * _import_array() * except Exception: # <<<<<<<<<<<<<< @@ -42692,28 +41751,28 @@ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 999, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1037, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1000, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1038, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(3, 1000, __pyx_L5_except_error) + __PYX_ERR(3, 1038, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -42728,7 +41787,7 @@ __pyx_L8_try_end:; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":996 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -42751,7 +41810,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1002 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -42772,7 +41831,7 @@ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_umath", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -42788,16 +41847,16 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1004 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1004, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1042, __pyx_L3_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -42811,7 +41870,7 @@ goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1005 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -42821,28 +41880,28 @@ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1005, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1043, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1006 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1006, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1044, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(3, 1006, __pyx_L5_except_error) + __PYX_ERR(3, 1044, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -42857,7 +41916,7 @@ __pyx_L8_try_end:; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1002 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -42880,7 +41939,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -42901,7 +41960,7 @@ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_ufunc", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -42917,16 +41976,16 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1010 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1010, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1048, __pyx_L3_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -42940,7 +41999,7 @@ goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1011 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -42949,26 +42008,26 @@ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1011, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1049, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1012 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1012, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1050, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(3, 1012, __pyx_L5_except_error) + __PYX_ERR(3, 1050, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -42983,7 +42042,7 @@ __pyx_L8_try_end:; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -43144,8 +42203,8 @@ {"is_contained_in", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_15is_contained_in, METH_O, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_14is_contained_in}, {"contains", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_17contains, METH_O, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_16contains}, {"overlaps", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_19overlaps, METH_O, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_18overlaps}, - {"xrange", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_21xrange, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_20xrange}, - {"xrange_d", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_23xrange_d, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_22xrange_d}, + {"xrange", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_21xrange, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_20xrange}, + {"xrange_d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_23xrange_d, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_22xrange_d}, {"extend_to_include", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_25extend_to_include, METH_O, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_24extend_to_include}, {"copy", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_27copy, METH_NOARGS, 0}, {0, 0, 0, 0} @@ -43405,14 +42464,14 @@ } static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_Sequence[] = { - {"get_reverse_complement", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement, METH_NOARGS, 0}, + {"get_reverse_complement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement, METH_VARARGS|METH_KEYWORDS, 0}, {"__getstate__", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_13__getstate__, METH_NOARGS, 0}, {"__setstate__", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_15__setstate__, METH_O, 0}, {"__reduce__", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_17__reduce__, METH_NOARGS, 0}, - {"write_to_fasta_file", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_19write_to_fasta_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_8Sequence_18write_to_fasta_file}, + {"write_to_fasta_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_19write_to_fasta_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_8Sequence_18write_to_fasta_file}, {"add_bases_to_count_array", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_21add_bases_to_count_array, METH_O, 0}, - {"trim_left_end", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_23trim_left_end, METH_VARARGS|METH_KEYWORDS, 0}, - {"trim_right_end", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_25trim_right_end, METH_VARARGS|METH_KEYWORDS, 0}, + {"trim_left_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_23trim_left_end, METH_VARARGS|METH_KEYWORDS, 0}, + {"trim_right_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_25trim_right_end, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -43596,11 +42655,11 @@ static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_SequenceWithQualities[] = { {"write_to_fastq_file", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_7write_to_fastq_file, METH_O, 0}, - {"get_fastq_str", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_9get_fastq_str, METH_VARARGS|METH_KEYWORDS, 0}, - {"get_reverse_complement", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement, METH_NOARGS, 0}, + {"get_fastq_str", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_9get_fastq_str, METH_VARARGS|METH_KEYWORDS, 0}, + {"get_reverse_complement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement, METH_VARARGS|METH_KEYWORDS, 0}, {"add_qual_to_count_array", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_13add_qual_to_count_array, METH_O, 0}, - {"trim_left_end_with_quals", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_15trim_left_end_with_quals, METH_VARARGS|METH_KEYWORDS, 0}, - {"trim_right_end_with_quals", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_17trim_right_end_with_quals, METH_VARARGS|METH_KEYWORDS, 0}, + {"trim_left_end_with_quals", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_15trim_left_end_with_quals, METH_VARARGS|METH_KEYWORDS, 0}, + {"trim_right_end_with_quals", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_17trim_right_end_with_quals, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -44262,8 +43321,8 @@ static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_SAM_Alignment[] = { {"to_pysam_AlignedSegment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_1to_pysam_AlignedSegment, METH_O, 0}, {"to_pysam_AlignedRead", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_3to_pysam_AlignedRead, METH_O, 0}, - {"from_pysam_AlignedRead", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_5from_pysam_AlignedRead, METH_VARARGS|METH_KEYWORDS, 0}, - {"from_pysam_AlignedSegment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_7from_pysam_AlignedSegment, METH_VARARGS|METH_KEYWORDS, 0}, + {"from_pysam_AlignedRead", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_5from_pysam_AlignedRead, METH_VARARGS|METH_KEYWORDS, 0}, + {"from_pysam_AlignedSegment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_7from_pysam_AlignedSegment, METH_VARARGS|METH_KEYWORDS, 0}, {"from_SAM_line", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_9from_SAM_line, METH_O, 0}, {"get_sam_line", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_11get_sam_line, METH_NOARGS, 0}, {"optional_field", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_13optional_field, METH_O, 0}, @@ -44498,8 +43557,8 @@ } static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_ChromVector[] = { - {"create", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_1create, METH_VARARGS|METH_KEYWORDS, 0}, - {"_create_view", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_3_create_view, METH_VARARGS|METH_KEYWORDS, 0}, + {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_1create, METH_VARARGS|METH_KEYWORDS, 0}, + {"_create_view", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_3_create_view, METH_VARARGS|METH_KEYWORDS, 0}, {"values", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_13values, METH_NOARGS, 0}, {"steps", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_15steps, METH_NOARGS, 0}, {"apply", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_17apply, METH_O, 0}, @@ -44767,9 +43826,9 @@ } static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_GenomicArray[] = { - {"add_chrom", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_7add_chrom, METH_VARARGS|METH_KEYWORDS, 0}, + {"add_chrom", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_7add_chrom, METH_VARARGS|METH_KEYWORDS, 0}, {"__reduce__", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_9__reduce__, METH_NOARGS, 0}, - {"write_bedgraph_file", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_11write_bedgraph_file, METH_VARARGS|METH_KEYWORDS, 0}, + {"write_bedgraph_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_11write_bedgraph_file, METH_VARARGS|METH_KEYWORDS, 0}, {"steps", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_13steps, METH_NOARGS, 0}, {0, 0, 0, 0} }; @@ -45279,9 +44338,9 @@ static PyMethodDef __pyx_methods[] = { {"reverse_complement", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_9reverse_complement, METH_O, __pyx_doc_5HTSeq_6_HTSeq_8reverse_complement}, - {"parse_cigar", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11parse_cigar, METH_VARARGS|METH_KEYWORDS, 0}, - {"build_cigar_list", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13build_cigar_list, METH_VARARGS|METH_KEYWORDS, 0}, - {"quotesafe_split", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15quotesafe_split, METH_VARARGS|METH_KEYWORDS, 0}, + {"parse_cigar", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_11parse_cigar, METH_VARARGS|METH_KEYWORDS, 0}, + {"build_cigar_list", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_13build_cigar_list, METH_VARARGS|METH_KEYWORDS, 0}, + {"quotesafe_split", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_15quotesafe_split, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -45316,31 +44375,48 @@ NULL /* m_free */ }; #endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_s_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 0, 1, 1}, {&__pyx_n_s_AlignedRead, __pyx_k_AlignedRead, sizeof(__pyx_k_AlignedRead), 0, 0, 1, 1}, {&__pyx_n_s_AlignedSegment, __pyx_k_AlignedSegment, sizeof(__pyx_k_AlignedSegment), 0, 0, 1, 1}, + {&__pyx_n_s_Alignment, __pyx_k_Alignment, sizeof(__pyx_k_Alignment), 0, 0, 1, 1}, + {&__pyx_n_s_AlignmentWithSequenceReversal, __pyx_k_AlignmentWithSequenceReversal, sizeof(__pyx_k_AlignmentWithSequenceReversal), 0, 0, 1, 1}, {&__pyx_kp_s_Automatic_adding_of_chromosomes, __pyx_k_Automatic_adding_of_chromosomes, sizeof(__pyx_k_Automatic_adding_of_chromosomes), 0, 0, 1, 0}, {&__pyx_n_s_B, __pyx_k_B, sizeof(__pyx_k_B), 0, 0, 1, 1}, + {&__pyx_n_s_BowtieAlignment, __pyx_k_BowtieAlignment, sizeof(__pyx_k_BowtieAlignment), 0, 0, 1, 1}, {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1}, {&__pyx_kp_s_Cannot_assign_to_zero_length_int, __pyx_k_Cannot_assign_to_zero_length_int, sizeof(__pyx_k_Cannot_assign_to_zero_length_int), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_extend_an_interval_to_inc, __pyx_k_Cannot_extend_an_interval_to_inc, sizeof(__pyx_k_Cannot_extend_an_interval_to_inc), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_extend_an_interval_to_inc_2, __pyx_k_Cannot_extend_an_interval_to_inc_2, sizeof(__pyx_k_Cannot_extend_an_interval_to_inc_2), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_extend_an_interval_to_inc_3, __pyx_k_Cannot_extend_an_interval_to_inc_3, sizeof(__pyx_k_Cannot_extend_an_interval_to_inc_3), 0, 0, 1, 0}, {&__pyx_kp_s_Cannot_subset_to_zero_length_int, __pyx_k_Cannot_subset_to_zero_length_int, sizeof(__pyx_k_Cannot_subset_to_zero_length_int), 0, 0, 1, 0}, + {&__pyx_n_s_ChromVector, __pyx_k_ChromVector, sizeof(__pyx_k_ChromVector), 0, 0, 1, 1}, {&__pyx_n_s_ChromVector_steps, __pyx_k_ChromVector_steps, sizeof(__pyx_k_ChromVector_steps), 0, 0, 1, 1}, {&__pyx_n_s_ChromVector_unpickle, __pyx_k_ChromVector_unpickle, sizeof(__pyx_k_ChromVector_unpickle), 0, 0, 1, 1}, {&__pyx_kp_s_Chromosome_name_mismatch, __pyx_k_Chromosome_name_mismatch, sizeof(__pyx_k_Chromosome_name_mismatch), 0, 0, 1, 0}, + {&__pyx_n_s_CigarOperation, __pyx_k_CigarOperation, sizeof(__pyx_k_CigarOperation), 0, 0, 1, 1}, {&__pyx_n_s_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 0, 1, 1}, {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, {&__pyx_n_s_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 0, 1, 1}, + {&__pyx_n_s_GenomicArray, __pyx_k_GenomicArray, sizeof(__pyx_k_GenomicArray), 0, 0, 1, 1}, {&__pyx_n_s_GenomicArray_steps, __pyx_k_GenomicArray_steps, sizeof(__pyx_k_GenomicArray_steps), 0, 0, 1, 1}, {&__pyx_n_s_GenomicArray_unpickle, __pyx_k_GenomicArray_unpickle, sizeof(__pyx_k_GenomicArray_unpickle), 0, 0, 1, 1}, + {&__pyx_n_s_GenomicInterval, __pyx_k_GenomicInterval, sizeof(__pyx_k_GenomicInterval), 0, 0, 1, 1}, {&__pyx_n_s_GenomicInterval_from_directional, __pyx_k_GenomicInterval_from_directional, sizeof(__pyx_k_GenomicInterval_from_directional), 0, 0, 1, 1}, {&__pyx_n_s_GenomicInterval_xrange, __pyx_k_GenomicInterval_xrange, sizeof(__pyx_k_GenomicInterval_xrange), 0, 0, 1, 1}, {&__pyx_n_s_GenomicInterval_xranged, __pyx_k_GenomicInterval_xranged, sizeof(__pyx_k_GenomicInterval_xranged), 0, 0, 1, 1}, + {&__pyx_n_s_GenomicPosition, __pyx_k_GenomicPosition, sizeof(__pyx_k_GenomicPosition), 0, 0, 1, 1}, {&__pyx_n_s_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 0, 1, 1}, {&__pyx_n_s_HTSeq__HTSeq, __pyx_k_HTSeq__HTSeq, sizeof(__pyx_k_HTSeq__HTSeq), 0, 0, 1, 1}, {&__pyx_n_s_HTSeq_internal, __pyx_k_HTSeq_internal, sizeof(__pyx_k_HTSeq_internal), 0, 0, 1, 1}, @@ -45383,10 +44459,13 @@ {&__pyx_kp_s_Required_assignment_signature_no, __pyx_k_Required_assignment_signature_no, sizeof(__pyx_k_Required_assignment_signature_no), 0, 0, 1, 0}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_s_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 0, 1, 1}, + {&__pyx_n_s_SAM_Alignment, __pyx_k_SAM_Alignment, sizeof(__pyx_k_SAM_Alignment), 0, 0, 1, 1}, {&__pyx_kp_s_SAM_line_does_not_contain_at_lea, __pyx_k_SAM_line_does_not_contain_at_lea, sizeof(__pyx_k_SAM_line_does_not_contain_at_lea), 0, 0, 1, 0}, {&__pyx_kp_s_SAM_optional_field_tag_s_not_fou, __pyx_k_SAM_optional_field_tag_s_not_fou, sizeof(__pyx_k_SAM_optional_field_tag_s_not_fou), 0, 0, 1, 0}, {&__pyx_kp_s_SAM_optional_field_tag_s_not_uni, __pyx_k_SAM_optional_field_tag_s_not_uni, sizeof(__pyx_k_SAM_optional_field_tag_s_not_uni), 0, 0, 1, 0}, {&__pyx_kp_s_SAM_optional_field_with_illegal, __pyx_k_SAM_optional_field_with_illegal, sizeof(__pyx_k_SAM_optional_field_with_illegal), 0, 0, 1, 0}, + {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1}, + {&__pyx_n_s_SequenceWithQualities, __pyx_k_SequenceWithQualities, sizeof(__pyx_k_SequenceWithQualities), 0, 0, 1, 1}, {&__pyx_kp_s_Sequence_in_SAM_file_contains_wh, __pyx_k_Sequence_in_SAM_file_contains_wh, sizeof(__pyx_k_Sequence_in_SAM_file_contains_wh), 0, 0, 1, 0}, {&__pyx_kp_s_Sequence_in_SAM_file_contains_wh_2, __pyx_k_Sequence_in_SAM_file_contains_wh_2, sizeof(__pyx_k_Sequence_in_SAM_file_contains_wh_2), 0, 0, 1, 0}, {&__pyx_kp_s_Start_of_interval_is_after_its_e, __pyx_k_Start_of_interval_is_after_its_e, sizeof(__pyx_k_Start_of_interval_is_after_its_e), 0, 0, 1, 0}, @@ -45403,19 +44482,19 @@ {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, {&__pyx_n_s_X, __pyx_k_X, sizeof(__pyx_k_X), 0, 0, 1, 1}, {&__pyx_n_s_Z, __pyx_k_Z, sizeof(__pyx_k_Z), 0, 0, 1, 1}, + {&__pyx_kp_s__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 0, 1, 0}, {&__pyx_kp_s__12, __pyx_k__12, sizeof(__pyx_k__12), 0, 0, 1, 0}, {&__pyx_kp_s__13, __pyx_k__13, sizeof(__pyx_k__13), 0, 0, 1, 0}, {&__pyx_kp_s__14, __pyx_k__14, sizeof(__pyx_k__14), 0, 0, 1, 0}, + {&__pyx_kp_s__15, __pyx_k__15, sizeof(__pyx_k__15), 0, 0, 1, 0}, + {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0}, + {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0}, {&__pyx_kp_s__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 1, 0}, {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, - {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0}, - {&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0}, - {&__pyx_kp_s__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 0, 1, 0}, - {&__pyx_kp_s__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 1, 0}, + {&__pyx_kp_b__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 0, 0, 0}, + {&__pyx_kp_b__24, __pyx_k__24, sizeof(__pyx_k__24), 0, 0, 0, 0}, {&__pyx_kp_b__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 0, 0}, {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, - {&__pyx_kp_b__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 0, 0}, - {&__pyx_kp_b__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 0, 0, 0}, {&__pyx_kp_s__8, __pyx_k__8, sizeof(__pyx_k__8), 0, 0, 1, 0}, {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0}, {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1}, @@ -45603,6 +44682,7 @@ {&__pyx_n_s_reference_end, __pyx_k_reference_end, sizeof(__pyx_k_reference_end), 0, 0, 1, 1}, {&__pyx_n_s_reference_id, __pyx_k_reference_id, sizeof(__pyx_k_reference_id), 0, 0, 1, 1}, {&__pyx_n_s_reference_start, __pyx_k_reference_start, sizeof(__pyx_k_reference_start), 0, 0, 1, 1}, + {&__pyx_n_s_rename, __pyx_k_rename, sizeof(__pyx_k_rename), 0, 0, 1, 1}, {&__pyx_n_s_revcomp_of, __pyx_k_revcomp_of, sizeof(__pyx_k_revcomp_of), 0, 0, 1, 1}, {&__pyx_n_s_rfrom, __pyx_k_rfrom, sizeof(__pyx_k_rfrom), 0, 0, 1, 1}, {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1}, @@ -45691,8 +44771,8 @@ {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; -static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1234, __pyx_L1_error) +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1246, __pyx_L1_error) __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 64, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 163, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 237, __pyx_L1_error) @@ -45705,15 +44785,15 @@ __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) __PYX_ERR(0, 624, __pyx_L1_error) #endif __pyx_builtin_chr = __Pyx_GetBuiltinName(__pyx_n_s_chr); if (!__pyx_builtin_chr) __PYX_ERR(0, 624, __pyx_L1_error) - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 1249, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(3, 242, __pyx_L1_error) - __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 810, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(3, 285, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 856, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } -static int __Pyx_InitCachedConstants(void) { +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); @@ -45740,278 +44820,137 @@ __Pyx_GIVEREF(__pyx_tuple__5); __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__5, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_addval, 444, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 444, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":596 - * f = open(file_or_filename, "w") - * if track_options == "": - * f.write("track type=bedGraph\n") # <<<<<<<<<<<<<< - * else: - * f.write("track type=bedGraph %s\n" % track_options) - */ - __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_track_type_bedGraph); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 596, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__10); - __Pyx_GIVEREF(__pyx_tuple__10); - /* "HTSeq/_HTSeq.pyx":641 * work with extended IUPAC nucleotide letters or RNA.""" * - * return seq[::-1].translate(_translation_table_for_complementation) # <<<<<<<<<<<<<< - * - * base_to_column = {'A': 0, 'C': 1, 'G': 2, 'T': 3, 'N': 4} - */ - __pyx_slice__11 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__11)) __PYX_ERR(0, 641, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__11); - __Pyx_GIVEREF(__pyx_slice__11); - - /* "HTSeq/_HTSeq.pyx":898 - * fastq_file.write("@%s\n" % self.name) - * fastq_file.write(self.seq + "\n") - * fastq_file.write("+\n") # <<<<<<<<<<<<<< - * fastq_file.write(self.qualstr + "\n") - * - */ - __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s__14); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 898, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__15); - __Pyx_GIVEREF(__pyx_tuple__15); - - /* "HTSeq/_HTSeq.pyx":911 - * reverse_complement(self.seq), - * "revcomp_of_" + self.name, - * self._qualstr[::-1], # <<<<<<<<<<<<<< - * self._qualscale) - * if self._qualarr is not None: - */ - __pyx_slice__16 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__16)) __PYX_ERR(0, 911, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__16); - __Pyx_GIVEREF(__pyx_slice__16); - - /* "HTSeq/_HTSeq.pyx":914 - * self._qualscale) - * if self._qualarr is not None: - * res._qualarr = self._qualarr[::-1] # <<<<<<<<<<<<<< - * return res - * - */ - __pyx_slice__17 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__17)) __PYX_ERR(0, 914, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__17); - __Pyx_GIVEREF(__pyx_slice__17); - - /* "HTSeq/_HTSeq.pyx":1092 - * cdef int positionint - * (readId, strand, chrom, position, read, qual, - * self.reserved, self.substitutions) = bowtie_line.split('\t') # <<<<<<<<<<<<<< - * positionint = int(position) - * AlignmentWithSequenceReversal.__init__(self, - */ - __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s__18); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 1092, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__19); - __Pyx_GIVEREF(__pyx_tuple__19); - - /* "HTSeq/_HTSeq.pyx":1226 - * elif field[3] == 'B': - * if field[5] == 'f': - * return numpy.array(field[7:].split(','), float) # <<<<<<<<<<<<<< - * else: - * return numpy.array(field[7:].split(','), int) - */ - __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s__22); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 1226, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__23); - __Pyx_GIVEREF(__pyx_tuple__23); - - /* "HTSeq/_HTSeq.pyx":1228 - * return numpy.array(field[7:].split(','), float) - * else: - * return numpy.array(field[7:].split(','), int) # <<<<<<<<<<<<<< - * else: - * raise ValueError, "SAM optional field with illegal type letter '%s'" % field[2] - */ - __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s__22); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 1228, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__24); - __Pyx_GIVEREF(__pyx_tuple__24); - - /* "HTSeq/_HTSeq.pyx":1250 - * import pysam - * except ImportError: - * sys.stderr.write( # <<<<<<<<<<<<<< - * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") - * raise - */ - __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Please_Install_PySam_to_use_this); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 1250, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__25); - __Pyx_GIVEREF(__pyx_tuple__25); - - /* "HTSeq/_HTSeq.pyx":1282 - * import pysam - * except ImportError: - * sys.stderr.write( # <<<<<<<<<<<<<< - * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") - * raise - */ - __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_Please_Install_PySam_to_use_this); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 1282, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__26); - __Pyx_GIVEREF(__pyx_tuple__26); - - /* "HTSeq/_HTSeq.pyx":1408 - * cdef SequenceWithQualities swq - * - * fields = line.rstrip().split("\t") # <<<<<<<<<<<<<< - * if len(fields) < 10: - * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." + * return seq[::-1].translate(_translation_table_for_complementation) # <<<<<<<<<<<<<< + * + * base_to_column = {'A': 0, 'C': 1, 'G': 2, 'T': 3, 'N': 4} */ - __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s__18); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 1408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__28); - __Pyx_GIVEREF(__pyx_tuple__28); + __pyx_slice__10 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__10)) __PYX_ERR(0, 641, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__10); + __Pyx_GIVEREF(__pyx_slice__10); - /* "HTSeq/_HTSeq.pyx":1412 + /* "HTSeq/_HTSeq.pyx":1424 * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, * seq, qual) = fields[0:11] # <<<<<<<<<<<<<< * optional_fields = fields[11:] * */ - __pyx_slice__29 = PySlice_New(__pyx_int_0, __pyx_int_11, Py_None); if (unlikely(!__pyx_slice__29)) __PYX_ERR(0, 1412, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__29); - __Pyx_GIVEREF(__pyx_slice__29); + __pyx_slice__19 = PySlice_New(__pyx_int_0, __pyx_int_11, Py_None); if (unlikely(!__pyx_slice__19)) __PYX_ERR(0, 1424, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__19); + __Pyx_GIVEREF(__pyx_slice__19); - /* "HTSeq/_HTSeq.pyx":1413 + /* "HTSeq/_HTSeq.pyx":1425 * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, * seq, qual) = fields[0:11] * optional_fields = fields[11:] # <<<<<<<<<<<<<< * * if seq.count("=") > 0: */ - __pyx_slice__30 = PySlice_New(__pyx_int_11, Py_None, Py_None); if (unlikely(!__pyx_slice__30)) __PYX_ERR(0, 1413, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__30); - __Pyx_GIVEREF(__pyx_slice__30); + __pyx_slice__20 = PySlice_New(__pyx_int_11, Py_None, Py_None); if (unlikely(!__pyx_slice__20)) __PYX_ERR(0, 1425, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__20); + __Pyx_GIVEREF(__pyx_slice__20); - /* "HTSeq/_HTSeq.pyx":1446 + /* "HTSeq/_HTSeq.pyx":1458 * alnmt.cigar = cigarlist * alnmt.optional_fields = [ * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] # <<<<<<<<<<<<<< * alnmt.aQual = int(mapq) * alnmt.inferred_insert_size = int(isize) */ - __pyx_slice__31 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 1446, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__31); - __Pyx_GIVEREF(__pyx_slice__31); + __pyx_slice__21 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__21)) __PYX_ERR(0, 1458, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__21); + __Pyx_GIVEREF(__pyx_slice__21); - /* "HTSeq/_HTSeq.pyx":1507 + /* "HTSeq/_HTSeq.pyx":1519 * query_start = self.iv * else: * query_start = GenomicPosition("*", -1) # <<<<<<<<<<<<<< * * if self.mate_start is not None: */ - __pyx_tuple__32 = PyTuple_Pack(2, __pyx_kp_s__27, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 1507, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__32); - __Pyx_GIVEREF(__pyx_tuple__32); - - /* "HTSeq/_HTSeq.pyx":1512 - * mate_start = self.mate_start - * else: - * mate_start = GenomicPosition("*", -1) # <<<<<<<<<<<<<< - * - * if self.cigar is not None: - */ - __pyx_tuple__33 = PyTuple_Pack(2, __pyx_kp_s__27, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 1512, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__33); - __Pyx_GIVEREF(__pyx_tuple__33); + __pyx_tuple__22 = PyTuple_Pack(2, __pyx_kp_s__18, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 1519, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__22); + __Pyx_GIVEREF(__pyx_tuple__22); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ - __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(3, 229, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__36); - __Pyx_GIVEREF(__pyx_tuple__36); + __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(3, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__25); + __Pyx_GIVEREF(__pyx_tuple__25); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ - __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(3, 233, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__37); - __Pyx_GIVEREF(__pyx_tuple__37); + __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(3, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__26); + __Pyx_GIVEREF(__pyx_tuple__26); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ - __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(3, 263, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__38); - __Pyx_GIVEREF(__pyx_tuple__38); + __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__27)) __PYX_ERR(3, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__27); + __Pyx_GIVEREF(__pyx_tuple__27); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":810 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ - __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(3, 810, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__39); - __Pyx_GIVEREF(__pyx_tuple__39); - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814 - * if ((child.byteorder == c'>' and little_endian) or - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * # One could encode it in the format string and have Cython - * # complain instead, BUT: < and > in format strings also imply - */ - __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(3, 814, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__40); - __Pyx_GIVEREF(__pyx_tuple__40); + __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(3, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__28); + __Pyx_GIVEREF(__pyx_tuple__28); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(3, 834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__41); - __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(3, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__29); + __Pyx_GIVEREF(__pyx_tuple__29); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(3, 1000, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); + __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(3, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__30); + __Pyx_GIVEREF(__pyx_tuple__30); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1006 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(3, 1006, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__43); - __Pyx_GIVEREF(__pyx_tuple__43); - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1012 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - */ - __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(3, 1012, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__44); - __Pyx_GIVEREF(__pyx_tuple__44); + __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(3, 1044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__31); + __Pyx_GIVEREF(__pyx_tuple__31); /* "HTSeq/_HTSeq.pyx":250 * @@ -46020,10 +44959,10 @@ * strand = intern(strand) * if strand.se is not strand_minus: */ - __pyx_tuple__45 = PyTuple_Pack(4, __pyx_n_s_chrom, __pyx_n_s_start_d, __pyx_n_s_length, __pyx_n_s_strand); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 250, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__45); - __Pyx_GIVEREF(__pyx_tuple__45); - __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_GenomicInterval_from_directional, 250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 250, __pyx_L1_error) + __pyx_tuple__32 = PyTuple_Pack(4, __pyx_n_s_chrom, __pyx_n_s_start_d, __pyx_n_s_length, __pyx_n_s_strand); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 250, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__32); + __Pyx_GIVEREF(__pyx_tuple__32); + __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_GenomicInterval_from_directional, 250, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 250, __pyx_L1_error) /* "HTSeq/_HTSeq.pyx":474 * @@ -46032,10 +44971,10 @@ * cv = ChromVector() * cv.array = array */ - __pyx_tuple__47 = PyTuple_Pack(6, __pyx_n_s_array, __pyx_n_s_iv, __pyx_n_s_offset, __pyx_n_s_is_vector_of_sets, __pyx_n_s_storage_2, __pyx_n_s_cv); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 474, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__47); - __Pyx_GIVEREF(__pyx_tuple__47); - __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_ChromVector_unpickle, 474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 474, __pyx_L1_error) + __pyx_tuple__34 = PyTuple_Pack(6, __pyx_n_s_array, __pyx_n_s_iv, __pyx_n_s_offset, __pyx_n_s_is_vector_of_sets, __pyx_n_s_storage_2, __pyx_n_s_cv); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 474, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__34); + __Pyx_GIVEREF(__pyx_tuple__34); + __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_ChromVector_unpickle, 474, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 474, __pyx_L1_error) /* "HTSeq/_HTSeq.pyx":612 * @@ -46044,10 +44983,10 @@ * ga = GenomicArray({}, stranded, typecode) * ga.chrom_vectors = chrom_vectors */ - __pyx_tuple__49 = PyTuple_Pack(4, __pyx_n_s_stranded, __pyx_n_s_typecode, __pyx_n_s_chrom_vectors, __pyx_n_s_ga); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__49); - __Pyx_GIVEREF(__pyx_tuple__49); - __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_GenomicArray_unpickle, 612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 612, __pyx_L1_error) + __pyx_tuple__36 = PyTuple_Pack(4, __pyx_n_s_stranded, __pyx_n_s_typecode, __pyx_n_s_chrom_vectors, __pyx_n_s_ga); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__36); + __Pyx_GIVEREF(__pyx_tuple__36); + __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_GenomicArray_unpickle, 612, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 612, __pyx_L1_error) /* "HTSeq/_HTSeq.pyx":623 * @@ -46056,47 +44995,47 @@ * t = [chr(i) for i in xrange(256)] * t[ord('A')] = 'T' */ - __pyx_tuple__51 = PyTuple_Pack(2, __pyx_n_s_t, __pyx_n_s_i); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 623, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__51); - __Pyx_GIVEREF(__pyx_tuple__51); - __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_make_translation_table_for_comp, 623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 623, __pyx_L1_error) + __pyx_tuple__38 = PyTuple_Pack(2, __pyx_n_s_t, __pyx_n_s_i); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 623, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); + __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python2_src_HTSeq__HTSeq_pyx, __pyx_n_s_make_translation_table_for_comp, 623, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 623, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1153 + /* "HTSeq/_HTSeq.pyx":1165 * return True * * _re_cigar_codes = re.compile('([MIDNSHP=X])') # <<<<<<<<<<<<<< * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): */ - __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_MIDNSHP_X); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 1153, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__53); - __Pyx_GIVEREF(__pyx_tuple__53); + __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_MIDNSHP_X); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1165, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__40); + __Pyx_GIVEREF(__pyx_tuple__40); /* "(tree fragment)":1 * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x77bfdf2: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ - __pyx_tuple__54 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__54); - __Pyx_GIVEREF(__pyx_tuple__54); - __pyx_codeobj__55 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__54, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Alignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__55)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__56 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__56); - __Pyx_GIVEREF(__pyx_tuple__56); - __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AlignmentWithSequ, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__58 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__58); - __Pyx_GIVEREF(__pyx_tuple__58); - __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BowtieAlignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__60 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__60); - __Pyx_GIVEREF(__pyx_tuple__60); - __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CigarOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__62 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__62); - __Pyx_GIVEREF(__pyx_tuple__62); - __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SAM_Alignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__41 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); + __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Alignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__43 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); + __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AlignmentWithSequ, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__45 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); + __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BowtieAlignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__47 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__47); + __Pyx_GIVEREF(__pyx_tuple__47); + __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CigarOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__49 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__49); + __Pyx_GIVEREF(__pyx_tuple__49); + __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SAM_Alignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -46104,7 +45043,7 @@ return -1; } -static int __Pyx_InitGlobals(void) { +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { __pyx_umethod_PyString_Type_count.type = (PyObject*)&PyString_Type; __pyx_umethod_PyString_Type_upper.type = (PyObject*)&PyString_Type; if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); @@ -46128,13 +45067,13 @@ return -1; } -static int __Pyx_modinit_global_init_code(void); /*proto*/ -static int __Pyx_modinit_variable_export_code(void); /*proto*/ -static int __Pyx_modinit_function_export_code(void); /*proto*/ -static int __Pyx_modinit_type_init_code(void); /*proto*/ -static int __Pyx_modinit_type_import_code(void); /*proto*/ -static int __Pyx_modinit_variable_import_code(void); /*proto*/ -static int __Pyx_modinit_function_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations @@ -46189,7 +45128,7 @@ } #endif if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_GenomicInterval.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_GenomicInterval) < 0) __PYX_ERR(0, 26, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "GenomicInterval", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicInterval) < 0) __PYX_ERR(0, 26, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GenomicInterval, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicInterval) < 0) __PYX_ERR(0, 26, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval = &__pyx_type_5HTSeq_6_HTSeq_GenomicInterval; __pyx_vtabptr_5HTSeq_6_HTSeq_GenomicPosition = &__pyx_vtable_5HTSeq_6_HTSeq_GenomicPosition; __pyx_vtable_5HTSeq_6_HTSeq_GenomicPosition.__pyx_base = *__pyx_vtabptr_5HTSeq_6_HTSeq_GenomicInterval; @@ -46200,10 +45139,10 @@ __pyx_type_5HTSeq_6_HTSeq_GenomicPosition.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_GenomicPosition.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_GenomicPosition) < 0) __PYX_ERR(0, 258, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "GenomicPosition", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicPosition) < 0) __PYX_ERR(0, 258, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GenomicPosition, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicPosition) < 0) __PYX_ERR(0, 258, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition = &__pyx_type_5HTSeq_6_HTSeq_GenomicPosition; __pyx_vtabptr_5HTSeq_6_HTSeq_Sequence = &__pyx_vtable_5HTSeq_6_HTSeq_Sequence; - __pyx_vtable_5HTSeq_6_HTSeq_Sequence.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement; + __pyx_vtable_5HTSeq_6_HTSeq_Sequence.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement; __pyx_vtable_5HTSeq_6_HTSeq_Sequence.add_bases_to_count_array = (PyObject *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_8Sequence_add_bases_to_count_array; __pyx_vtable_5HTSeq_6_HTSeq_Sequence.trim_left_end = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_8Sequence_trim_left_end; __pyx_vtable_5HTSeq_6_HTSeq_Sequence.trim_right_end = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_right_end *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_8Sequence_trim_right_end; @@ -46213,25 +45152,25 @@ __pyx_type_5HTSeq_6_HTSeq_Sequence.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_Sequence.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_Sequence) < 0) __PYX_ERR(0, 645, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Sequence", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_Sequence) < 0) __PYX_ERR(0, 645, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Sequence, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_Sequence) < 0) __PYX_ERR(0, 645, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_Sequence = &__pyx_type_5HTSeq_6_HTSeq_Sequence; __pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities = &__pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.__pyx_base = *__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence; - __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.__pyx_base.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1; + __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.__pyx_base.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities._fill_qual_arr = (PyObject *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities__fill_qual_arr; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.add_qual_to_count_array = (PyObject *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_add_qual_to_count_array; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.trim_left_end_with_quals = (struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.trim_right_end_with_quals = (struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals; - __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement; + __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement; __pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_base = __pyx_ptype_5HTSeq_6_HTSeq_Sequence; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 790, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 795, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 790, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 795, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_5HTSeq_6_HTSeq_21SequenceWithQualities___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_5HTSeq_6_HTSeq_21SequenceWithQualities___init__.doc = __pyx_doc_5HTSeq_6_HTSeq_21SequenceWithQualities___init__; @@ -46239,65 +45178,65 @@ } } #endif - if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 790, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "SequenceWithQualities", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 790, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 795, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SequenceWithQualities, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 795, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities = &__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1014, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_Alignment.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_Alignment.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_Alignment.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_Alignment.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "Alignment", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1002, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Alignment, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1014, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1014, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_Alignment = &__pyx_type_5HTSeq_6_HTSeq_Alignment; __pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_base = __pyx_ptype_5HTSeq_6_HTSeq_Alignment; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1045, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1057, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "AlignmentWithSequenceReversal", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1045, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1045, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AlignmentWithSequenceReversal, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1057, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1057, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal = &__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal; __pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_base = __pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1236, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1248, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "SAM_Alignment", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1236, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1236, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SAM_Alignment, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1248, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1248, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment = &__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment; if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_ChromVector) < 0) __PYX_ERR(0, 315, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_ChromVector.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_ChromVector.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_ChromVector.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_ChromVector.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "ChromVector", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_ChromVector) < 0) __PYX_ERR(0, 315, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ChromVector, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_ChromVector) < 0) __PYX_ERR(0, 315, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_ChromVector = &__pyx_type_5HTSeq_6_HTSeq_ChromVector; if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_GenomicArray) < 0) __PYX_ERR(0, 483, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_GenomicArray.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_GenomicArray.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_GenomicArray.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_GenomicArray.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "GenomicArray", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicArray) < 0) __PYX_ERR(0, 483, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GenomicArray, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicArray) < 0) __PYX_ERR(0, 483, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_GenomicArray = &__pyx_type_5HTSeq_6_HTSeq_GenomicArray; __pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_base = __pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1075, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1087, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "BowtieAlignment", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1075, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1075, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BowtieAlignment, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1087, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1087, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_BowtieAlignment = &__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1111, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1123, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_CigarOperation.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_CigarOperation.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_CigarOperation.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_CigarOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "CigarOperation", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1111, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1111, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CigarOperation, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1123, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1123, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_CigarOperation = &__pyx_type_5HTSeq_6_HTSeq_CigarOperation; if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__) < 0) __PYX_ERR(0, 439, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__.tp_print = 0; @@ -46314,23 +45253,37 @@ static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ - __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif - 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(4, 9, __pyx_L1_error) - __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(3, 164, __pyx_L1_error) - __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(3, 186, __pyx_L1_error) - __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(3, 190, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(3, 199, __pyx_L1_error) - __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(3, 872, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 206, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 229, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 233, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 242, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 918, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } @@ -46365,15 +45318,6 @@ #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #endif -#ifndef CYTHON_SMALL_CODE -#if defined(__clang__) - #define CYTHON_SMALL_CODE -#elif defined(__GNUC__) - #define CYTHON_SMALL_CODE __attribute__((optimize("Os"))) -#else - #define CYTHON_SMALL_CODE -#endif -#endif #if PY_MAJOR_VERSION < 3 @@ -46386,11 +45330,36 @@ { return PyModuleDef_Init(&__pyx_moduledef); } -static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) { +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { - result = PyDict_SetItemString(moddict, to_name, value); + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); @@ -46399,8 +45368,10 @@ } return result; } -static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); @@ -46410,10 +45381,10 @@ if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); @@ -46421,7 +45392,7 @@ } -static int __pyx_pymod_exec__HTSeq(PyObject *__pyx_pyinit_module) +static CYTHON_SMALL_CODE int __pyx_pymod_exec__HTSeq(PyObject *__pyx_pyinit_module) #endif #endif { @@ -46435,7 +45406,11 @@ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0; + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module '_HTSeq' has already been imported. Re-initialisation is not supported."); + return -1; + } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif @@ -46450,6 +45425,9 @@ #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__HTSeq(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -46504,7 +45482,7 @@ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_HTSeq___HTSeq) { - if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { @@ -46759,7 +45737,7 @@ * ncv = cls() * ncv.iv = iv */ - __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_ChromVector, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_ChromVector, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "HTSeq/_HTSeq.pyx":323 @@ -46783,7 +45761,7 @@ * if iv.length == 0: * raise IndexError, "Cannot subset to zero-length interval." */ - __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_ChromVector, __pyx_n_s_create_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_ChromVector, __pyx_n_s_create_view); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 347, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); /* "HTSeq/_HTSeq.pyx":346 @@ -46819,7 +45797,7 @@ * cdef GenomicInterval iv * if length == sys.maxint: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maxint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -46859,7 +45837,7 @@ * * cpdef bytes reverse_complement(bytes seq): */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_translation_table_for_comp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_make_translation_table_for_comp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -46887,53 +45865,53 @@ if (PyDict_SetItem(__pyx_d, __pyx_n_s_base_to_column, __pyx_t_1) < 0) __PYX_ERR(0, 643, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1101 + /* "HTSeq/_HTSeq.pyx":1113 * * cigar_operation_names = { * 'M': 'matched', # <<<<<<<<<<<<<< * 'I': 'inserted', * 'D': 'deleted', */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1113, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_M, __pyx_n_s_matched) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_I, __pyx_n_s_inserted) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_D, __pyx_n_s_deleted) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_N, __pyx_n_s_skipped) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S, __pyx_kp_s_soft_clipped) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_H, __pyx_kp_s_hard_clipped) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_P, __pyx_n_s_padded) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__20, __pyx_kp_s_sequence_matched) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_X, __pyx_kp_s_sequence_mismatched) < 0) __PYX_ERR(0, 1101, __pyx_L1_error) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_names, __pyx_t_1) < 0) __PYX_ERR(0, 1100, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_M, __pyx_n_s_matched) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_I, __pyx_n_s_inserted) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_D, __pyx_n_s_deleted) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_N, __pyx_n_s_skipped) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_S, __pyx_kp_s_soft_clipped) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_H, __pyx_kp_s_hard_clipped) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_P, __pyx_n_s_padded) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_s__15, __pyx_kp_s_sequence_matched) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_X, __pyx_kp_s_sequence_mismatched) < 0) __PYX_ERR(0, 1113, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_names, __pyx_t_1) < 0) __PYX_ERR(0, 1112, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1153 + /* "HTSeq/_HTSeq.pyx":1165 * return True * * _re_cigar_codes = re.compile('([MIDNSHP=X])') # <<<<<<<<<<<<<< * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1153, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __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_re_cigar_codes, __pyx_t_1) < 0) __PYX_ERR(0, 1153, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_re_cigar_codes, __pyx_t_1) < 0) __PYX_ERR(0, 1165, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1232 + /* "HTSeq/_HTSeq.pyx":1244 * raise ValueError, "SAM optional field with illegal type letter '%s'" % field[2] * * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] # <<<<<<<<<<<<<< * cigar_operation_code_dict = dict( * [(x, i) for i, x in enumerate(cigar_operation_codes)]) */ - __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1232, __pyx_L1_error) + __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_s_M); __Pyx_GIVEREF(__pyx_n_s_M); @@ -46956,35 +45934,35 @@ __Pyx_INCREF(__pyx_n_s_P); __Pyx_GIVEREF(__pyx_n_s_P); PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_P); - __Pyx_INCREF(__pyx_kp_s__20); - __Pyx_GIVEREF(__pyx_kp_s__20); - PyList_SET_ITEM(__pyx_t_1, 7, __pyx_kp_s__20); + __Pyx_INCREF(__pyx_kp_s__15); + __Pyx_GIVEREF(__pyx_kp_s__15); + PyList_SET_ITEM(__pyx_t_1, 7, __pyx_kp_s__15); __Pyx_INCREF(__pyx_n_s_X); __Pyx_GIVEREF(__pyx_n_s_X); PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_s_X); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_codes, __pyx_t_1) < 0) __PYX_ERR(0, 1232, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_codes, __pyx_t_1) < 0) __PYX_ERR(0, 1244, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1234 + /* "HTSeq/_HTSeq.pyx":1246 * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] * cigar_operation_code_dict = dict( * [(x, i) for i, x in enumerate(cigar_operation_codes)]) # <<<<<<<<<<<<<< * * cdef class SAM_Alignment(AlignmentWithSequenceReversal): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); __pyx_t_2 = __pyx_int_0; - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __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_5 = 0; __pyx_t_6 = NULL; } else { - __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_5 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_6 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1246, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { @@ -46992,17 +45970,17 @@ 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_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1246, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { if (__pyx_t_5 >= 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_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1246, __pyx_L1_error) #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } @@ -47012,25 +45990,25 @@ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1234, __pyx_L1_error) + else __PYX_ERR(0, 1246, __pyx_L1_error) } break; } __Pyx_GOTREF(__pyx_t_3); } - if (PyDict_SetItem(__pyx_d, __pyx_n_s_x, __pyx_t_3) < 0) __PYX_ERR(0, 1234, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_x, __pyx_t_3) < 0) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_i, __pyx_t_2) < 0) __PYX_ERR(0, 1234, __pyx_L1_error) - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_i, __pyx_t_2) < 0) __PYX_ERR(0, 1246, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = __pyx_t_3; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_x); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1234, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_i); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1234, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); @@ -47038,108 +46016,108 @@ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7); __pyx_t_3 = 0; __pyx_t_7 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1234, __pyx_L1_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 1246, __pyx_L1_error) __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1233 + /* "HTSeq/_HTSeq.pyx":1245 * * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] * cigar_operation_code_dict = dict( # <<<<<<<<<<<<<< * [(x, i) for i, x in enumerate(cigar_operation_codes)]) * */ - __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1233, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1245, __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_cigar_operation_code_dict, __pyx_t_2) < 0) __PYX_ERR(0, 1233, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_code_dict, __pyx_t_2) < 0) __PYX_ERR(0, 1245, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1311 + /* "HTSeq/_HTSeq.pyx":1323 * * @classmethod * def from_pysam_AlignedRead(cls, read, samfile): # <<<<<<<<<<<<<< * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: */ - __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_pysam_AlignedRead); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1311, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_pysam_AlignedRead); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1310 + /* "HTSeq/_HTSeq.pyx":1322 * return a * * @classmethod # <<<<<<<<<<<<<< * def from_pysam_AlignedRead(cls, read, samfile): * strand = "-" if read.is_reverse else "+" */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_pysam_AlignedRead, __pyx_t_1) < 0) __PYX_ERR(0, 1311, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_pysam_AlignedRead, __pyx_t_1) < 0) __PYX_ERR(0, 1323, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment); - /* "HTSeq/_HTSeq.pyx":1355 + /* "HTSeq/_HTSeq.pyx":1367 * * @classmethod * def from_pysam_AlignedSegment(cls, read, samfile): # <<<<<<<<<<<<<< * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: */ - __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_pysam_AlignedSegment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_pysam_AlignedSegment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":1354 + /* "HTSeq/_HTSeq.pyx":1366 * return a * * @classmethod # <<<<<<<<<<<<<< * def from_pysam_AlignedSegment(cls, read, samfile): * strand = "-" if read.is_reverse else "+" */ - __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_pysam_AlignedSegment, __pyx_t_2) < 0) __PYX_ERR(0, 1355, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_pysam_AlignedSegment, __pyx_t_2) < 0) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment); - /* "HTSeq/_HTSeq.pyx":1399 + /* "HTSeq/_HTSeq.pyx":1411 * * @classmethod * def from_SAM_line(cls, line): # <<<<<<<<<<<<<< * cdef str qname, flag, rname, pos, mapq, cigar, * cdef str mrnm, mpos, isize, seq, qual */ - __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_SAM_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1399, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_2, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_SAM_line); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1398 + /* "HTSeq/_HTSeq.pyx":1410 * return a * * @classmethod # <<<<<<<<<<<<<< * def from_SAM_line(cls, line): * cdef str qname, flag, rname, pos, mapq, cigar, */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1398, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1410, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_SAM_line, __pyx_t_1) < 0) __PYX_ERR(0, 1399, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_SAM_line, __pyx_t_1) < 0) __PYX_ERR(0, 1411, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment); /* "(tree fragment)":1 * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x77bfdf2: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment, NULL, __pyx_n_s_HTSeq__HTSeq); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Alignment, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -47153,15 +46131,15 @@ /* "(tree fragment)":1 * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x482c176: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment, NULL, __pyx_n_s_HTSeq__HTSeq); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BowtieAlignment, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -47175,8 +46153,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xf6933f3: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment, NULL, __pyx_n_s_HTSeq__HTSeq); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -47193,7 +46171,7 @@ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -47213,9 +46191,9 @@ __Pyx_XDECREF(__pyx_t_8); if (__pyx_m) { if (__pyx_d) { - __Pyx_AddTraceback("init HTSeq._HTSeq", 0, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("init HTSeq._HTSeq", __pyx_clineno, __pyx_lineno, __pyx_filename); } - Py_DECREF(__pyx_m); __pyx_m = 0; + Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init HTSeq._HTSeq"); } @@ -47236,9 +46214,9 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; - m = PyImport_ImportModule((char *)modname); + m = PyImport_ImportModule(modname); if (!m) goto end; - p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: @@ -47651,32 +46629,8 @@ } #endif -/* PyCFunctionFastCall */ -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { - PyCFunctionObject *func = (PyCFunctionObject*)func_obj; - PyCFunction meth = PyCFunction_GET_FUNCTION(func); - PyObject *self = PyCFunction_GET_SELF(func); - int flags = PyCFunction_GET_FLAGS(func); - assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))); - assert(nargs >= 0); - assert(nargs == 0 || args != NULL); - /* _PyCFunction_FastCallDict() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the - caller loses its exception */ - assert(!PyErr_Occurred()); - if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { - return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL); - } else { - return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs); - } -} -#endif - /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL -#include "frameobject.h" static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; @@ -47694,7 +46648,7 @@ if (f == NULL) { return NULL; } - fastlocals = f->f_localsplus; + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; @@ -47834,6 +46788,51 @@ } #endif +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { @@ -47874,42 +46873,21 @@ } #endif -/* PyObjectCallNoArg */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { -#if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCall(func, NULL, 0); - } -#endif -#ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) { -#else - if (likely(PyCFunction_Check(func))) { -#endif - if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { - return __Pyx_PyObject_CallMethO(func, NULL); - } - } - return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); -} -#endif - /* RaiseTooManyValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ - static CYTHON_INLINE int __Pyx_IterFinish(void) { +static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; @@ -47944,7 +46922,7 @@ } /* UnpackItemEndCheck */ - static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); @@ -47956,34 +46934,71 @@ } /* GetModuleGlobalName */ - static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { - Py_INCREF(result); + return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { - result = NULL; - } else { + return NULL; + } #else result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { - Py_INCREF(result); - } else { + return __Pyx_NewRef(result); + } #endif #else result = PyObject_GetItem(__pyx_d, name); - if (!result) { - PyErr_Clear(); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); + } + PyErr_Clear(); #endif - result = __Pyx_GetBuiltinName(name); + return __Pyx_GetBuiltinName(name); +} + +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: return result; } /* BytesEquals */ - static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -48030,7 +47045,7 @@ } /* UnicodeEquals */ - static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -48109,6 +47124,9 @@ } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); @@ -48129,7 +47147,7 @@ } /* SliceObject */ - static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, +static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { @@ -48226,9 +47244,8 @@ return -1; } -/* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { +/* 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; } @@ -48236,89 +47253,66 @@ 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; - } + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { - const long b = intval; - long a; + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); const digit* digits = ((PyLongObject*)op1)->ob_digit; - const Py_ssize_t size = Py_SIZE(op1); - if (likely(__Pyx_sst_abs(size) <= 1)) { - a = likely(size) ? digits[0] : 0; - if (size == -1) a = -a; + 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 { - switch (size) { - case -2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case -3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case -4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 - default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); - #else - default: Py_RETURN_FALSE; - #endif - } - } - if (a == b) { - Py_RETURN_TRUE; - } 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; - } + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } - return PyObject_RichCompare(op1, op2, Py_EQ); + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); } -#endif /* GetItemInt */ - static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); @@ -48333,7 +47327,7 @@ if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -48351,7 +47345,7 @@ if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -48367,7 +47361,7 @@ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -48375,7 +47369,7 @@ } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -48405,7 +47399,7 @@ } /* ExtTypeTest */ - static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; @@ -48418,17 +47412,17 @@ } /* None */ - static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } /* None */ - static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } /* SliceObject */ - static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { @@ -48525,7 +47519,7 @@ } /* FetchCommonType */ - static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); @@ -48564,7 +47558,7 @@ } /* CythonFunction */ - #include +#include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { @@ -48586,7 +47580,7 @@ return op->func_doc; } static int -__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { @@ -48598,7 +47592,7 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 @@ -48613,14 +47607,15 @@ return op->func_name; } static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; @@ -48632,20 +47627,21 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; @@ -48667,7 +47663,7 @@ return self; } static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); @@ -48678,7 +47674,7 @@ return op->func_dict; } static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { @@ -48698,19 +47694,19 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * -__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); @@ -48739,7 +47735,7 @@ return result; } static int -__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -48755,7 +47751,7 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { @@ -48769,7 +47765,7 @@ return result; } static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -48785,7 +47781,7 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { @@ -48799,7 +47795,7 @@ return result; } static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; @@ -48815,7 +47811,7 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); @@ -48995,7 +47991,7 @@ return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); @@ -49158,7 +48154,7 @@ } /* ObjectGetItem */ - #if CYTHON_USE_TYPE_SLOTS +#if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { PyObject *runerr; Py_ssize_t key_value; @@ -49187,16 +48183,21 @@ #endif /* DictGetItem */ - #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) - PyErr_SetObject(PyExc_KeyError, args); - Py_XDECREF(args); + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } } return NULL; } @@ -49206,7 +48207,7 @@ #endif /* GetAttr */ - static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) @@ -49219,7 +48220,7 @@ } /* HasAttr */ - static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, @@ -49236,22 +48237,112 @@ } } -/* PyObjectCallMethod0 */ - static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { - PyObject *method, *result = NULL; - method = __Pyx_PyObject_GetAttrStr(obj, method_name); - if (unlikely(!method)) goto bad; -#if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(method))) { - PyObject *self = PyMethod_GET_SELF(method); - if (likely(self)) { - PyObject *function = PyMethod_GET_FUNCTION(method); - result = __Pyx_PyObject_CallOneArg(function, self); - Py_DECREF(method); - return result; +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } } } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); +#endif + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } #endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: @@ -49259,12 +48350,12 @@ } /* RaiseNoneIterError */ - static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError */ - static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { @@ -49275,7 +48366,7 @@ } /* UnpackTuple2 */ - static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_COMPILING_IN_PYPY @@ -49327,7 +48418,7 @@ } /* dict_iter */ - static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; @@ -49440,7 +48531,7 @@ } /* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { @@ -49562,7 +48653,7 @@ #endif /* SetItemInt */ - static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { +static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) { int r; if (!j) return -1; r = PyObject_SetItem(o, j, v); @@ -49574,7 +48665,7 @@ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o)); - if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o)))) { PyObject* old = PyList_GET_ITEM(o, n); Py_INCREF(v); PyList_SET_ITEM(o, n, v); @@ -49599,10 +48690,11 @@ } #else #if CYTHON_COMPILING_IN_PYPY - if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) { + if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) #else - if (is_list || PySequence_Check(o)) { + if (is_list || PySequence_Check(o)) #endif + { return PySequence_SetItem(o, i, v); } #endif @@ -49610,14 +48702,14 @@ } /* StringJoin */ - #if !CYTHON_COMPILING_IN_CPYTHON +#if !CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL); } #endif /* bytes_tailmatch */ - static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, +static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, Py_ssize_t end, int direction) { const char* self_ptr = PyBytes_AS_STRING(self); Py_ssize_t self_len = PyBytes_GET_SIZE(self); @@ -49692,7 +48784,7 @@ } /* unicode_tailmatch */ - static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings, +static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings, Py_ssize_t start, Py_ssize_t end, int direction) { Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); for (i = 0; i < count; i++) { @@ -49721,7 +48813,7 @@ } /* str_tailmatch */ - static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, +static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py_ssize_t start, Py_ssize_t end, int direction) { if (PY_MAJOR_VERSION < 3) @@ -49731,7 +48823,7 @@ } /* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { @@ -49853,7 +48945,7 @@ #endif /* IsLittleEndian */ - static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) { union { uint32_t u32; @@ -49864,7 +48956,7 @@ } /* BufferFormatCheck */ - static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; @@ -50366,7 +49458,7 @@ } /* BufferGetAndValidate */ - static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (unlikely(info->buf == NULL)) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); @@ -50413,19 +49505,19 @@ } /* BufferIndexError */ - static void __Pyx_RaiseBufferIndexError(int axis) { + static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } /* BufferFallbackError */ - static void __Pyx_RaiseBufferFallbackError(void) { + static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } /* PyErrExceptionMatches */ - #if CYTHON_FAST_THREAD_STATE + #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); @@ -50450,7 +49542,7 @@ #endif /* GetAttr3 */ - static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) @@ -50465,27 +49557,43 @@ } /* None */ - static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { + static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } /* None */ - static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { + static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } +/* GetTopmostException */ + #if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + /* SaveResetException */ - #if CYTHON_FAST_THREAD_STATE + #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - #if PY_VERSION_HEX >= 0x030700A2 - *type = tstate->exc_state.exc_type; - *value = tstate->exc_state.exc_value; - *tb = tstate->exc_state.exc_traceback; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; @@ -50497,13 +49605,14 @@ } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; - #if PY_VERSION_HEX >= 0x030700A2 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = type; - tstate->exc_state.exc_value = value; - tstate->exc_state.exc_traceback = tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -50519,11 +49628,12 @@ #endif /* GetException */ - #if CYTHON_FAST_THREAD_STATE -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif +{ PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -50556,13 +49666,16 @@ *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE - #if PY_VERSION_HEX >= 0x030700A2 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = local_type; - tstate->exc_state.exc_value = local_value; - tstate->exc_state.exc_traceback = local_tb; + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -50589,7 +49702,7 @@ } /* Import */ - static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; @@ -50636,7 +49749,7 @@ if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( @@ -50653,8 +49766,75 @@ return module; } +/* PyIntCompare */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_FALSE; + } + #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_TRUE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_TRUE; + } + 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_NE)); +} + /* UnpackUnboundCMethod */ - static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { + static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) { PyObject *method; method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name); if (unlikely(!method)) @@ -50667,14 +49847,14 @@ { PyMethodDescrObject *descr = (PyMethodDescrObject*) method; target->func = descr->d_method->ml_meth; - target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST); + target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS); } #endif return 0; } /* CallUnboundCMethod1 */ - #if CYTHON_COMPILING_IN_CPYTHON + #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_CallUnboundCMethod1(__Pyx_CachedCFunction* cfunc, PyObject* self, PyObject* arg) { if (likely(cfunc->func)) { int flag = cfunc->flag; @@ -50682,12 +49862,12 @@ return (*(cfunc->func))(self, arg); } else if (PY_VERSION_HEX >= 0x030600B1 && flag == METH_FASTCALL) { if (PY_VERSION_HEX >= 0x030700A0) { - return (*(__Pyx_PyCFunctionFast)cfunc->func)(self, &arg, 1); + return (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)cfunc->func)(self, &arg, 1); } else { - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } else if (PY_VERSION_HEX >= 0x030700A0 && flag == (METH_FASTCALL | METH_KEYWORDS)) { - return (*(__Pyx_PyCFunctionFastWithKeywords)cfunc->func)(self, &arg, 1, NULL); + return (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)cfunc->func)(self, &arg, 1, NULL); } } return __Pyx__CallUnboundCMethod1(cfunc, self, arg); @@ -50703,7 +49883,7 @@ Py_INCREF(arg); PyTuple_SET_ITEM(args, 0, arg); if (cfunc->flag & METH_KEYWORDS) - result = (*(PyCFunctionWithKeywords)cfunc->func)(self, args, NULL); + result = (*(PyCFunctionWithKeywords)(void*)(PyCFunction)cfunc->func)(self, args, NULL); else result = (*cfunc->func)(self, args); } else { @@ -50726,7 +49906,7 @@ } /* CallUnboundCMethod0 */ - static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { + static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) { PyObject *args, *result = NULL; if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL; #if CYTHON_ASSUME_SAFE_MACROS @@ -50745,21 +49925,21 @@ } /* bytes_index */ - static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { + static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { + if (index < 0) + index += PyBytes_GET_SIZE(bytes); if (check_bounds) { Py_ssize_t size = PyBytes_GET_SIZE(bytes); - if (unlikely(index >= size) | ((index < 0) & unlikely(index < -size))) { + if (unlikely(!__Pyx_is_valid_index(index, size))) { PyErr_SetString(PyExc_IndexError, "string index out of range"); return (char) -1; } } - if (index < 0) - index += PyBytes_GET_SIZE(bytes); return PyBytes_AS_STRING(bytes)[index]; } /* ImportFrom */ - static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, @@ -50773,7 +49953,7 @@ } /* CallNextTpTraverse */ - static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_traverse != current_tp_traverse) type = type->tp_base; @@ -50785,7 +49965,7 @@ } /* CallNextTpClear */ - static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_clear != current_tp_clear) type = type->tp_base; @@ -50796,7 +49976,7 @@ } /* PyObject_GenericGetAttrNoDict */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 + #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 @@ -50836,7 +50016,7 @@ #endif /* PyObject_GenericGetAttr */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 + #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); @@ -50846,7 +50026,7 @@ #endif /* SetVTable */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable) { + static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else @@ -50864,7 +50044,7 @@ } /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); @@ -50939,15 +50119,76 @@ return ret; } +/* TypeImport */ + #ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + /* ClassMethod */ - static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { + static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else #if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY - if (PyMethodDescr_Check(method)) { + if (PyMethodDescr_Check(method)) #else static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { @@ -50956,8 +50197,9 @@ methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } - if (__Pyx_TypeCheck(method, methoddescr_type)) { + if (__Pyx_TypeCheck(method, methoddescr_type)) #endif + { PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; @@ -50974,7 +50216,7 @@ return PyClassMethod_New(method); } #ifdef __Pyx_CyFunction_USED - else if (__Pyx_TypeCheck(method, __pyx_CyFunctionType)) { + else if (__Pyx_CyFunction_Check(method)) { return PyClassMethod_New(method); } #endif @@ -50985,15 +50227,17 @@ } /* GetNameInClass */ - static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { + static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { + PyObject *result; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); - return __Pyx_GetModuleGlobalName(name); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; } -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; result = __Pyx_PyObject_GetAttrStr(nmspace, name); if (!result) { @@ -51003,18 +50247,23 @@ } /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) { + #ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { - use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { @@ -51031,7 +50280,7 @@ c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } - else if (PyObject_Not(use_cline) != 0) { + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); @@ -51040,7 +50289,7 @@ #endif /* CodeObjectCache */ - static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; @@ -51120,7 +50369,7 @@ } /* AddTraceback */ - #include "compile.h" + #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( @@ -51205,8 +50454,8 @@ } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - const int neg_one = (int) -1, const_zero = (int) 0; + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { @@ -51236,7 +50485,7 @@ } /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) @@ -51279,9 +50528,9 @@ #endif - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) -1, const_zero = (long) 0; + /* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { @@ -51311,7 +50560,7 @@ } /* None */ - static CYTHON_INLINE long __Pyx_pow_long(long b, long e) { + static CYTHON_INLINE long __Pyx_pow_long(long b, long e) { long t = b; switch (e) { case 3: @@ -51338,8 +50587,8 @@ } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) { - const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = (Py_intptr_t) 0; + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) { + const Py_intptr_t neg_one = (Py_intptr_t) ((Py_intptr_t) 0 - (Py_intptr_t) 1), const_zero = (Py_intptr_t) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Py_intptr_t) < sizeof(long)) { @@ -51369,7 +50618,7 @@ } /* Declarations */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); @@ -51389,7 +50638,7 @@ #endif /* Arithmetic */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); @@ -51524,7 +50773,7 @@ #endif /* Declarations */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); @@ -51544,7 +50793,7 @@ #endif /* Arithmetic */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); @@ -51679,8 +50928,8 @@ #endif /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { - const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0; + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { + const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(enum NPY_TYPES) < sizeof(long)) { @@ -51710,8 +50959,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) -1, const_zero = (int) 0; + static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -51899,8 +51148,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) -1, const_zero = (long) 0; + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -52088,8 +51337,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE Py_intptr_t __Pyx_PyInt_As_Py_intptr_t(PyObject *x) { - const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = (Py_intptr_t) 0; + static CYTHON_INLINE Py_intptr_t __Pyx_PyInt_As_Py_intptr_t(PyObject *x) { + const Py_intptr_t neg_one = (Py_intptr_t) ((Py_intptr_t) 0 - (Py_intptr_t) 1), const_zero = (Py_intptr_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -52277,8 +51526,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE npy_long __Pyx_PyInt_As_npy_long(PyObject *x) { - const npy_long neg_one = (npy_long) -1, const_zero = (npy_long) 0; + static CYTHON_INLINE npy_long __Pyx_PyInt_As_npy_long(PyObject *x) { + const npy_long neg_one = (npy_long) ((npy_long) 0 - (npy_long) 1), const_zero = (npy_long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -52466,8 +51715,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { - const char neg_one = (char) -1, const_zero = (char) 0; + static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -52655,7 +51904,7 @@ } /* FastTypeChecks */ - #if CYTHON_COMPILING_IN_CPYTHON + #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; @@ -52710,14 +51959,42 @@ return res; } #endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; itp_basicsize; -#else - py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); - if (!py_basicsize) - goto bad; - basicsize = PyLong_AsSsize_t(py_basicsize); - Py_DECREF(py_basicsize); - py_basicsize = 0; - if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) - goto bad; -#endif - if (!strict && (size_t)basicsize > size) { - PyOS_snprintf(warning, sizeof(warning), - "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd", - module_name, class_name, basicsize, size); - if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; - } - else if ((size_t)basicsize != size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd", - module_name, class_name, basicsize, size); - goto bad; - } - return (PyTypeObject *)result; -bad: - Py_XDECREF(py_module); - Py_XDECREF(result); - return NULL; -} -#endif - /* InitStrings */ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { @@ -52935,6 +52129,13 @@ if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { @@ -53012,7 +52213,7 @@ if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else - return PyInt_AsSsize_t(x); + return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { @@ -53066,6 +52267,9 @@ Py_DECREF(x); return ival; } +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } diff -Nru htseq-0.10.0/python3/HTSeq/__init__.py htseq-0.11.2/python3/HTSeq/__init__.py --- htseq-0.10.0/python3/HTSeq/__init__.py 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python3/HTSeq/__init__.py 2019-01-08 02:36:23.000000000 +0000 @@ -9,21 +9,10 @@ import shlex import sys -try: - import HTSeq - from HTSeq._HTSeq import * - #from _HTSeq import * -except ImportError: - if os.path.isfile("setup.py"): - raise ImportError( - "Cannot import 'HTSeq' when working directory is HTSeq's own build directory.") - else: - raise - +import HTSeq +from HTSeq._HTSeq import * from HTSeq._version import __version__ -#from vcf_reader import * - ######################### # Utils ######################### @@ -32,14 +21,14 @@ class FileOrSequence(object): """ The construcutor takes one argument, which may either be a string, which is interpreted as a file name (possibly with path), or a - connection, by which we mean a text file opened for reading, or - any other object that can provide an iterator over strings + connection, by which we mean a text file opened for reading, or + any other object that can provide an iterator over strings (lines of the file). The advantage of passing a file name instead of an already opened file is that if an iterator is requested several times, the file will be re-opened each time. If the file is already open, its lines can be read - only once, and then, the iterator stays exhausted. + only once, and then, the iterator stays exhausted. Furthermore, if a file name is passed that end in ".gz" or ".gzip" (case insensitive), it is transparently gunzipped. @@ -90,14 +79,13 @@ ######################### class GenomicFeature(object): - """A genomic feature, i.e., an interval on a genome with metadata. At minimum, the following information should be provided by slots: name: a string identifying the feature (e.g., a gene symbol) type: a string giving the feature type (e.g., "gene", "exon") - iv: a GenomicInterval object specifying the feature locus + iv: a GenomicInterval object specifying the feature locus """ def __init__(self, name, type_, interval): @@ -145,8 +133,8 @@ attr_str = '; '.join( ['%s%s\"%s\"' % (ak, sep, attr[ak]) for ak in attr]) return "\t".join(str(a) for a in (self.iv.chrom, source, - self.type, self.iv.start + 1, self.iv.end, score, - self.iv.strand, frame, attr_str)) + "\n" + self.type, self.iv.start + 1, self.iv.end, score, + self.iv.strand, frame, attr_str)) + "\n" _re_attr_main = re.compile("\s*([^\s\=]+)[\s=]+(.*)") @@ -157,13 +145,16 @@ """Parses a GFF attribute string and returns it as a dictionary. If 'extra_return_first_value' is set, a pair is returned: the dictionary - and the value of the first attribute. This might be useful if this is the ID. + and the value of the first attribute. This might be useful if this is the + ID. """ if attrStr.endswith("\n"): attrStr = attrStr[:-1] d = {} first_val = "_unnamed_" - for (i, attr) in zip(itertools.count(), _HTSeq.quotesafe_split(attrStr.encode())): + for (i, attr) in zip( + itertools.count(), + _HTSeq.quotesafe_split(attrStr.encode())): attr = attr.decode() if _re_attr_empty.match(attr): continue @@ -176,7 +167,6 @@ val = mo.group(2) if val.startswith('"') and val.endswith('"'): val = val[1:-1] - #val = urllib.unquote( val ) d[sys.intern(mo.group(1))] = sys.intern(val) if extra_return_first_value and i == 0: first_val = val @@ -185,14 +175,14 @@ else: return d + _re_gff_meta_comment = re.compile("##\s*(\S+)\s+(\S*)") class GFF_Reader(FileOrSequence): - """Parse a GFF file - Pass the constructor either a file name or an iterator of lines of a + Pass the constructor either a file name or an iterator of lines of a GFF files. If a file name is specified, it may refer to a gzip compressed file. @@ -208,7 +198,6 @@ for line in FileOrSequence.__iter__(self): if isinstance(line, bytes): line = line.decode() - if line == "\n": continue if line.startswith('#'): @@ -221,10 +210,15 @@ strand, frame, attributeStr) = line.split("\t", 8) (attr, name) = parse_GFF_attribute_string(attributeStr, True) if self.end_included: - iv = GenomicInterval(seqname, int(start) - 1, int(end), strand) + iv = GenomicInterval( + seqname, + int(start) - 1, int(end), + strand) else: - iv = GenomicInterval(seqname, int( - start) - 1, int(end) - 1, strand) + iv = GenomicInterval( + seqname, + int(start) - 1, int(end) - 1, + strand) f = GenomicFeature(name, feature, iv) if score != ".": score = float(score) @@ -238,7 +232,7 @@ def make_feature_dict(feature_sequence): - """A feature dict is a convenient way to organize a sequence of Feature + """A feature dict is a convenient way to organize a sequence of Feature object (which you have got, e.g., from parse_GFF). The function returns a dict with all the feature types as keys. Each value @@ -248,8 +242,8 @@ An example makes this clear. Let's say you load the C. elegans GTF file from Ensemble and make a feature dict: - >>> worm_features_dict = HTSeq.make_feature_dict( HTSeq.parse_GFF( - ... "test_data/Caenorhabditis_elegans.WS200.55.gtf.gz" ) ) + >>> worm_features_dict = HTSeq.make_feature_dict(HTSeq.parse_GFF( + ... "test_data/Caenorhabditis_elegans.WS200.55.gtf.gz")) (This command may take a few minutes to deal with the 430,000 features in the GTF file. Note that you may need a lot of RAM if you have millions @@ -277,8 +271,9 @@ ######################### def read_chrom_lens(filename, delimiter="\t"): - return dict(((chrom, int(len)) - for chrom, len in csv.reader(open(filename), delimiter=delimiter))) + return dict( + ((chrom, int(len)) + for chrom, len in csv.reader(open(filename), delimiter=delimiter))) ######################### @@ -300,6 +295,8 @@ def __iter__(self): seq = None + name = None + descr = None for line in FileOrSequence.__iter__(self): if line.startswith(">"): if seq: @@ -326,6 +323,7 @@ def get_sequence_lengths(self): seqname = None + length = 0 seqlengths = {} for line in FileOrSequence.__iter__(self): if line.startswith(">"): @@ -354,12 +352,13 @@ def build_index(self, force=False): self._import_pysam() if not isinstance(self.fos, str): - raise TypeError("This function only works with FastaReader objects " + - "connected to a fasta file via file name") + raise TypeError( + "This function only works with FastaReader objects " + + "connected to a fasta file via file name") index_filename = self.fos + ".fai" if os.access(index_filename, os.R_OK): - if (not force) and os.stat( self.filename_or_sequence ).st_mtime <= \ - os.stat(index_filename).st_mtime: + if (not force) and os.stat(self.filename_or_sequence).st_mtime <= \ + os.stat(index_filename).st_mtime: # index is up to date return pysam.faidx(self.fos) @@ -371,11 +370,13 @@ if not isinstance(iv, GenomicInterval): raise TypeError("GenomicInterval expected as key.") if not isinstance(self.fos, str): - raise TypeError("This function only works with FastaReader objects " + - "connected to a fasta file via file name") + raise TypeError( + "This function only works with FastaReader objects " + + "connected to a fasta file via file name") self._import_pysam() - fasta = pysam.faidx(self.fos, "%s:%d-%d" % - (iv.chrom, iv.start, iv.end - 1)) + fasta = pysam.faidx( + self.fos, + "%s:%d-%d" % (iv.chrom, iv.start, iv.end - 1)) ans = list(FastaReader(fasta)) assert len(ans) == 1 ans[0].name = str(iv) @@ -408,28 +409,35 @@ qual = next(fin) if qual == "": if id1 != "": - warnings.warn("Number of lines in FASTQ file is not " - "a multiple of 4. Discarding the last, " - "incomplete record") + warnings.warn( + "Number of lines in FASTQ file is not " + "a multiple of 4. Discarding the last, " + "incomplete record") break if not qual.endswith("\n"): qual += "\n" if not id1.startswith("@"): - raise ValueError("Primary ID line in FASTQ file does" - "not start with '@'. Either this is not FASTQ data or the parser got out of sync.") + raise ValueError( + "Primary ID line in FASTQ file does " + "not start with '@'. Either this is not FASTQ data or the " + "parser got out of sync.") if not id2.startswith("+"): - raise ValueError("Secondary ID line in FASTQ file does" - "not start with '+'. Maybe got out of sync.") + raise ValueError( + "Secondary ID line in FASTQ file does" + "not start with '+'. Maybe got out of sync.") if len(id2) > 2 and id1[1:] != id2[1:]: - raise ValueError("Primary and secondary ID line in FASTQ" - "disagree.") + raise ValueError( + "Primary and secondary ID line in FASTQ" + "disagree.") if self.raw_iterator: s = (seq[:-1], id1[1:-1], qual[:-1], self.qual_scale) else: - s = SequenceWithQualities(seq[:-1].encode(), id1[1:-1], - qual[:-1].encode(), self.qual_scale) + s = SequenceWithQualities( + seq[:-1].encode(), id1[1:-1], + qual[:-1].encode(), + self.qual_scale) yield s @@ -445,8 +453,10 @@ except ValueError: if line.startswith("Reported "): continue - warnings.warn("BowtieReader: Ignoring the following line, which could not be parsed:\n%s\n" % line, - RuntimeWarning) + warnings.warn( + "BowtieReader: Ignoring the following line, which could " + "not be parsed:\n%s\n" % line, + RuntimeWarning) yield algnt @@ -472,14 +482,14 @@ class SolexaExportAlignment(Alignment): """Iterating over SolexaExportReader objects will yield SoelxaExportRecord objects. These have four fields: - read - a SequenceWithQualities object + read - a SequenceWithQualities object aligned - a boolean, indicating whether the object was aligned iv - a GenomicInterval giving the alignment (or None, if not aligned) passed_filter - a boolean, indicating whether the object passed the filter nomatch_code - a code indicating why no match was found (or None, if the read was aligned) - As long as 'aligned' is True, a SolexaExportRecord can be treated as an + As long as 'aligned' is True, a SolexaExportRecord can be treated as an Alignment object. """ @@ -490,10 +500,10 @@ def __repr__(self): if self.aligned: return "< %s object: Read '%s', aligned to %s >" % ( - self.__class__.__name__, self.read.name, self.iv) + self.__class__.__name__, self.read.name, self.iv) else: return "< %s object: Non-aligned read '%s' >" % ( - self.__class__.__name__, self.read.name) + self.__class__.__name__, self.read.name) class SolexaExportReader(FileOrSequence): @@ -514,15 +524,28 @@ if line[-1] == "\n": line = line[:-1] res = {} - (res['machine'], res['run_number'], res['lane'], res['tile'], res['x_coord'], - res['y_coord'], res['index_string'], res['read_nbr'], res['read_seq'], - res['qual_str'], res['chrom'], res[ - 'contig'], res['pos'], res['strand'], - res['match_descr'], res['single_read_algnt_score'], - res['paired_read_algnt_score'], res[ - 'partner_chrom'], res['partner_contig'], - res['partner_offset'], res['partner_strand'], res['passed_filtering'] ) \ - = line.split("\t") + (res['machine'], + res['run_number'], + res['lane'], + res['tile'], + res['x_coord'], + res['y_coord'], + res['index_string'], + res['read_nbr'], + res['read_seq'], + res['qual_str'], + res['chrom'], + res['contig'], + res['pos'], + res['strand'], + res['match_descr'], + res['single_read_algnt_score'], + res['paired_read_algnt_score'], + res['partner_chrom'], + res['partner_contig'], + res['partner_offset'], + res['partner_strand'], + res['passed_filtering']) = line.split("\t") return res def __iter__(self): @@ -530,20 +553,25 @@ record = SolexaExportAlignment() fields = SolexaExportReader.parse_line_bare(line) if fields['read_nbr'] != "1": - warnings.warn("Paired-end read encountered. PE is so far supported only for " + - "SAM files, not yet for SolexaExport. All PE-related fields are ignored. ") + warnings.warn( + "Paired-end read encountered. PE is so far supported only " + "for SAM files, not yet for SolexaExport. All PE-related " + "fields are ignored.") record.read = SequenceWithQualities( fields['read_seq'], - "%s:%s:%s:%s:%s#0" % (fields['machine'], fields['lane'], fields['tile'], - fields['x_coord'], fields['y_coord']), + "%s:%s:%s:%s:%s#0" % (fields['machine'], + fields['lane'], + fields['tile'], + fields['x_coord'], + fields['y_coord']), fields['qual_str'], self.qualscale) if fields['passed_filtering'] == 'Y': record.passed_filter = True elif fields['passed_filtering'] == 'N': record.passed_filter = False else: - raise ValueError("Illegal 'passed filter' value in Solexa export data: '%s'." % fields[ - 'passed_filtering']) + raise ValueError( + "Illegal 'passed filter' value in Solexa export data: '%s'." % fields['passed_filtering']) record.index_string = fields['index_string'] if fields['pos'] == '': record.iv = None @@ -560,13 +588,14 @@ chrom = fields['chrom'] if fields['chrom'] == "": chrom = fields['contig'] - record.iv = GenomicInterval(chrom, start, - start + len(fields['read_seq']), strand) + record.iv = GenomicInterval( + chrom, start, + start + len(fields['read_seq']), strand) yield record class SAM_Reader(FileOrSequence): - """A SAM_Reader object is associated with a SAM file that + """A SAM_Reader object is associated with a SAM file that contains short read alignments. It can generate an iterator of Alignment objects.""" @@ -584,7 +613,6 @@ class GenomicArrayOfSets(GenomicArray): - """A GenomicArrayOfSets is a specialization of GenomicArray that allows to store sets of objects. On construction, the step vectors are initialized with empty sets. By using the 'add_value' method, objects can be added to intervals. If an object @@ -606,11 +634,50 @@ # paired-end handling ########################### -def pair_SAM_alignments(alignments, bundle=False): +def pair_SAM_alignments( + alignments, + bundle=False, + primary_only=False): + '''Iterate over SAM aligments, name-sorted paired-end + + Args: + alignments (iterator of SAM/BAM alignments): the alignments to wrap + bundle (bool): if True, bundle all alignments from one read pair into a + single yield. If False (default), each pair of alignments is + yielded separately. + primary_only (bool): for each read, consider only the primary line + (SAM flag 0x900 = 0). The SAM specification requires one and only + one of those for each read. + + Yields: + 2-tuples with each pair of alignments or, if bundle==True, each bundled + list of alignments. + ''' mate_missing_count = [0] def process_list(almnt_list): + '''Transform a list of alignment with the same read name into pairs + + Args: + almnt_list (list): alignments to process + + Yields: + each pair of alignments. + + This function is needed because each line of a BAM file is not a read + but an alignment. For uniquely mapped and unmapped reads, those two are + the same. For multimapped reads, however, there can be more than one + alignment for each read. Also, it is normal for a mapper to uniquely + map one read and multimap its mate. + + This function goes down the list of alignments for a given read name + and tries to find the first mate. So if read 1 is uniquely mapped but + read 2 is mapped 4 times, only (read 1, read 2 - first occurrence) will + yield; the other 3 alignments of read 2 are ignored. + ''' + + while len(almnt_list) > 0: a1 = almnt_list.pop(0) # Find its mate @@ -622,14 +689,15 @@ if not (a1.aligned and a2.aligned): break if a1.iv.chrom == a2.mate_start.chrom and a1.iv.start == a2.mate_start.pos and \ - a2.iv.chrom == a1.mate_start.chrom and a2.iv.start == a1.mate_start.pos: + a2.iv.chrom == a1.mate_start.chrom and a2.iv.start == a1.mate_start.pos: break else: if a1.mate_aligned: mate_missing_count[0] += 1 if mate_missing_count[0] == 1: - warnings.warn("Read " + a1.read.name + " claims to have an aligned mate " + - "which could not be found in an adjacent line.") + warnings.warn( + "Read " + a1.read.name + " claims to have an aligned mate " + + "which could not be found in an adjacent line.") a2 = None if a2 is not None: almnt_list.remove(a2) @@ -648,6 +716,9 @@ if almnt.pe_which == "unknown": raise ValueError( "Paired-end read found with 'unknown' 'pe_which' status.") + # FIXME: almnt.not_primary_alignment currently means secondary + if primary_only and (almnt.not_primary_alignment or almnt.supplementary): + continue if almnt.read.name == current_name: almnt_list.append(almnt) else: @@ -668,18 +739,35 @@ mate_missing_count[0]) -def pair_SAM_alignments_with_buffer(alignments, max_buffer_size=30000000): +def pair_SAM_alignments_with_buffer( + alignments, + max_buffer_size=30000000, + primary_only=False): + '''Iterate over SAM aligments with buffer, position-sorted paired-end + + Args: + alignments (iterator of SAM/BAM alignments): the alignments to wrap + max_buffer_size (int): maxmal numer of alignments to keep in memory. + primary_only (bool): for each read, consider only the primary line + (SAM flag 0x900 = 0). The SAM specification requires one and only + one of those for each read. + + Yields: + 2-tuples with each pair of alignments. + ''' almnt_buffer = {} ambiguous_pairing_counter = 0 for almnt in alignments: - if not almnt.paired_end: raise ValueError( "Sequence of paired-end alignments expected, but got single-end alignment.") if almnt.pe_which == "unknown": raise ValueError( "Cannot process paired-end alignment found with 'unknown' 'pe_which' status.") + # FIXME: almnt.not_primary_alignment currently means secondary + if primary_only and (almnt.not_primary_alignment or almnt.supplementary): + continue matekey = ( almnt.read.name, @@ -720,8 +808,9 @@ "Maximum alignment buffer size exceeded while pairing SAM alignments.") if len(almnt_buffer) > 0: - warnings.warn("Mate records missing for %d records; first such record: %s." % - (len(almnt_buffer), str(list(almnt_buffer.values())[0][0]))) + warnings.warn( + "Mate records missing for %d records; first such record: %s." % + (len(almnt_buffer), str(list(almnt_buffer.values())[0][0]))) for almnt_list in list(almnt_buffer.values()): for almnt in almnt_list: if almnt.pe_which == "first": @@ -730,8 +819,9 @@ yield (None, almnt) if ambiguous_pairing_counter > 0: - warnings.warn("Mate pairing was ambiguous for %d records; mate key for first such record: %s." % - (ambiguous_pairing_counter, str(ambiguous_pairing_first_occurance))) + warnings.warn( + "Mate pairing was ambiguous for %d records; mate key for first such record: %s." % + (ambiguous_pairing_counter, str(ambiguous_pairing_first_occurance))) ########################### @@ -756,7 +846,8 @@ class VariantCall(object): - def __init__(self, chrom=None, pos=None, identifier=None, ref=None, alt=None, qual=None, filtr=None, info=None): + def __init__(self, chrom=None, pos=None, identifier=None, ref=None, + alt=None, qual=None, filtr=None, info=None): self.chrom = chrom self.pos = pos self.id = identifier @@ -785,12 +876,10 @@ ret = cls() if nsamples == 0: ret.format = None - ret.chrom, ret.pos, ret.id, ret.ref, ret.alt, ret.qual, ret.filter, ret.info = line.rstrip( - "\n").split("\t", 7) + ret.chrom, ret.pos, ret.id, ret.ref, ret.alt, ret.qual, ret.filter, ret.info = line.rstrip("\n").split("\t", 7) else: lsplit = line.rstrip("\n").split("\t") - ret.chrom, ret.pos, ret.id, ret.ref, ret.alt, ret.qual, ret.filter, ret.info = lsplit[ - :8] + ret.chrom, ret.pos, ret.id, ret.ref, ret.alt, ret.qual, ret.filter, ret.info = lsplit[:8] ret.format = lsplit[8].split(":") ret.samples = {} spos = 9 @@ -874,10 +963,11 @@ def make_info_dict(self): self.infodict = dict( - (key, _vcf_typemap[self.info[key]["Type"]]) for key in list(self.info.keys())) + (key, + _vcf_typemap[self.info[key]["Type"]]) for key in list(self.info.keys())) def parse_meta(self, header_filename=None): - if header_filename == None: + if header_filename is None: the_iter = FileOrSequence.__iter__(self) else: the_iter = open(header_filename, "r") @@ -917,7 +1007,7 @@ def meta_info(self, header_filename=None): ret = [] - if header_filename == None: + if header_filename is None: the_iter = FileOrSequence.__iter__(self) else: the_iter = open(header_filename, "r") @@ -1010,7 +1100,6 @@ sf = pysam.Samfile(self.filename, "rb", check_sq=self.check_sq) self.record_no = 0 for pa in sf: - # yield SAM_Alignment.from_pysam_AlignedRead( pa, sf ) yield SAM_Alignment.from_pysam_AlignedSegment(pa, sf) self.record_no += 1 @@ -1056,8 +1145,8 @@ class BAM_Writer(object): - - def __init__(self, filename, template=None, referencenames=None, referencelengths=None, text=None, header=None): + def __init__(self, filename, template=None, referencenames=None, + referencelengths=None, text=None, header=None): try: import pysam except ImportError: @@ -1071,15 +1160,20 @@ self.referencelengths = referencelengths self.text = text self.header = header - self.sf = pysam.Samfile(self.filename, mode="wb", template=self.template, referencenames=self.referencenames, - referencelengths=self.referencelengths, text=self.text, header=self.header) + self.sf = pysam.Samfile( + self.filename, + mode="wb", + template=self.template, + referencenames=self.referencenames, + referencelengths=self.referencelengths, + text=self.text, + header=self.header) @classmethod def from_BAM_Reader(cls, fn, br): return BAM_Writer(filename=fn, header=br.get_header_dict()) def write(self, alnmt): - #self.sf.write( alnmt.to_pysam_AlignedRead( self.sf ) ) self.sf.write(alnmt.to_pysam_AlignedSegment(self.sf)) def close(self): @@ -1100,13 +1194,21 @@ raise ValueError("BED file line contains less than 3 fields") if len(fields) > 9: raise ValueError("BED file line contains more than 9 fields") - iv = GenomicInterval(fields[0], int(fields[1]), int( - fields[2]), fields[5] if len(fields) > 5 else ".") - f = GenomicFeature(fields[3] if len( - fields) > 3 else "unnamed", "BED line", iv) + iv = GenomicInterval( + fields[0], + int(fields[1]), + int(fields[2]), + fields[5] if len(fields) > 5 else ".") + f = GenomicFeature( + fields[3] if len(fields) > 3 else "unnamed", + "BED line", + iv) f.score = float(fields[4]) if len(fields) > 4 else None - f.thick = GenomicInterval(iv.chrom, int(fields[6]), int( - fields[7]), iv.strand) if len(fields) > 7 else None + f.thick = GenomicInterval( + iv.chrom, + int(fields[6]), + int(fields[7]), + iv.strand) if len(fields) > 7 else None f.itemRgb = [int(a) for a in fields[8].split(",") ] if len(fields) > 8 else None yield(f) diff -Nru htseq-0.10.0/python3/HTSeq/scripts/count.py htseq-0.11.2/python3/HTSeq/scripts/count.py --- htseq-0.10.0/python3/HTSeq/scripts/count.py 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python3/HTSeq/scripts/count.py 2019-01-08 02:36:23.000000000 +0000 @@ -41,10 +41,10 @@ r = (r,) for read in r: if read is not None: - samoutfile.write(read.original_sam_line.rstrip() + - "\tXF:Z:" + assignment + "\n") + read.optional_fields.append(('XF', assignment)) + samoutfile.write(read.get_sam_line() + "\n") - if samouts != "": + if samouts != []: if len(samouts) != len(sam_filenames): raise ValueError('Select the same number of SAM input and output files') # Try to open samout files early in case any of them has issues @@ -116,22 +116,28 @@ lowqual_all = [] nonunique_all = [] for isam, (sam_filename) in enumerate(sam_filenames): - if samouts != '': + if samouts != []: samoutfile = open(samouts[isam], 'w') else: samoutfile = None try: - if sam_filename != "-": - read_seq_file = SAM_or_BAM_Reader(sam_filename) - read_seq = read_seq_file - first_read = next(iter(read_seq)) - else: + if sam_filename == "-": read_seq_file = SAM_or_BAM_Reader(sys.stdin) - read_seq_iter = iter(read_seq_file) + else: + read_seq_file = SAM_or_BAM_Reader(sam_filename) + read_seq_iter = iter(read_seq_file) + # Catch empty BAM files + try: first_read = next(read_seq_iter) + pe_mode = first_read.paired_end + except: + first_read = None + pe_mode = False + if first_read is not None: read_seq = itertools.chain([first_read], read_seq_iter) - pe_mode = first_read.paired_end + else: + read_seq = [] except: sys.stderr.write( "Error occured when reading beginning of SAM/BAM file.\n") @@ -139,12 +145,20 @@ try: if pe_mode: + if ((supplementary_alignment_mode == 'ignore') and + (secondary_alignment_mode == 'ignore')): + primary_only = True + else: + primary_only = False if order == "name": - read_seq = HTSeq.pair_SAM_alignments(read_seq) + read_seq = HTSeq.pair_SAM_alignments( + read_seq, + primary_only=primary_only) elif order == "pos": read_seq = HTSeq.pair_SAM_alignments_with_buffer( read_seq, - max_buffer_size=max_buffer_size) + max_buffer_size=max_buffer_size, + primary_only=primary_only) else: raise ValueError("Illegal order specified.") empty = 0 @@ -396,9 +410,11 @@ "suitable for Ensembl GTF files: gene_id)") pa.add_argument( - "--additional-attr", type=str, nargs='+', - default=(), help="Additional feature attributes (default: none, " + - "suitable for Ensembl GTF files: gene_name)") + "--additional-attr", type=str, + action='append', + default=[], help="Additional feature attributes (default: none, " + + "suitable for Ensembl GTF files: gene_name). Use multiple times " + + "for each different attribute") pa.add_argument( "-m", "--mode", dest="mode", @@ -414,19 +430,20 @@ pa.add_argument( "--secondary-alignments", dest="secondary_alignments", type=str, - choices=("score", "ignore"), default="score", + choices=("score", "ignore"), default="ignore", help="Whether to score secondary alignments (0x100 flag)") pa.add_argument( "--supplementary-alignments", dest="supplementary_alignments", type=str, - choices=("score", "ignore"), default="score", + choices=("score", "ignore"), default="ignore", help="Whether to score supplementary alignments (0x800 flag)") pa.add_argument( - "-o", "--samout", type=str, dest="samouts", nargs='+', - default="", help="write out all SAM alignment records into an output " + - "SAM file called SAMOUT, annotating each line with its feature assignment " + - "(as an optional field with tag 'XF')") + "-o", "--samout", type=str, dest="samouts", + action='append', + default=[], help="write out all SAM alignment records into " + + "SAM files (one per input file needed), annotating each line " + + "with its feature assignment (as an optional field with tag 'XF')") pa.add_argument( "-q", "--quiet", action="store_true", dest="quiet", diff -Nru htseq-0.10.0/python3/HTSeq/scripts/qa.py htseq-0.11.2/python3/HTSeq/scripts/qa.py --- htseq-0.10.0/python3/HTSeq/scripts/qa.py 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python3/HTSeq/scripts/qa.py 2019-01-08 02:36:23.000000000 +0000 @@ -5,18 +5,21 @@ # (c) Simon Anders, European Molecular Biology Laboratory, 2010 # released under GNU General Public License -import sys, time, os.path, optparse +import sys +import os.path +import optparse from itertools import * import numpy import HTSeq + def main(): try: import matplotlib except ImportError: sys.stderr.write("This script needs the 'matplotlib' library, which ") - sys.stderr.write("was not found. Please install it." ) + sys.stderr.write("was not found. Please install it.") matplotlib.use('PDF') from matplotlib import pyplot @@ -26,10 +29,10 @@ except ImportError: from matplotlib.pyplot import normalize as Normalize - # **** Parse command line **** - optParser = optparse.OptionParser( usage = "%prog [options] read_file", + optParser = optparse.OptionParser( + usage="%prog [options] read_file", description= "This script take a file with high-throughput sequencing reads " + "(supported formats: SAM, Solexa _export.txt, FASTQ, Solexa " + @@ -40,62 +43,68 @@ epilog = "Written by Simon Anders (sanders@fs.tum.de), European Molecular Biology " + " Laboratory (EMBL). (c) 2010. Released under the terms of the GNU General " + - " Public License v3. Part of the 'HTSeq' framework, version %s." % HTSeq.__version__ ) - optParser.add_option( "-t", "--type", type="choice", dest="type", - choices = ("sam", "bam", "solexa-export", "fastq", "solexa-fastq"), - default = "sam", help="type of read_file (one of: sam [default], bam, " + - "solexa-export, fastq, solexa-fastq)" ) - optParser.add_option( "-o", "--outfile", type="string", dest="outfile", - help="output filename (default is .pdf)" ) - optParser.add_option( "-r", "--readlength", type="int", dest="readlen", - help="the maximum read length (when not specified, the script guesses from the file" ) - optParser.add_option( "-g", "--gamma", type="float", dest="gamma", - default = 0.3, - help="the gamma factor for the contrast adjustment of the quality score plot" ) - optParser.add_option( "-n", "--nosplit", action="store_true", dest="nosplit", - help="do not split reads in unaligned and aligned ones" ) - optParser.add_option( "-m", "--maxqual", type="int", dest="maxqual", default=41, - help="the maximum quality score that appears in the data (default: 41)" ) + " Public License v3. Part of the 'HTSeq' framework, version %s." % HTSeq.__version__) + optParser.add_option( + "-t", "--type", type="choice", dest="type", + choices=("sam", "bam", "solexa-export", "fastq", "solexa-fastq"), + default="sam", help="type of read_file (one of: sam [default], bam, " + + "solexa-export, fastq, solexa-fastq)") + optParser.add_option( + "-o", "--outfile", type="string", dest="outfile", + help="output filename (default is .pdf)") + optParser.add_option( + "-r", "--readlength", type="int", dest="readlen", + help="the maximum read length (when not specified, the script guesses from the file") + optParser.add_option( + "-g", "--gamma", type="float", dest="gamma", + default=0.3, + help="the gamma factor for the contrast adjustment of the quality score plot") + optParser.add_option( + "-n", "--nosplit", action="store_true", dest="nosplit", + help="do not split reads in unaligned and aligned ones") + optParser.add_option( + "-m", "--maxqual", type="int", dest="maxqual", default=41, + help="the maximum quality score that appears in the data (default: 41)") - if len( sys.argv ) == 1: + if len(sys.argv) == 1: optParser.print_help() sys.exit(1) (opts, args) = optParser.parse_args() - if len( args ) != 1: - sys.stderr.write( sys.argv[0] + ": Error: Please provide one argument (the read_file).\n" ) - sys.stderr.write( " Call with '-h' to get usage information.\n" ) - sys.exit( 1 ) + if len(args) != 1: + sys.stderr.write( + sys.argv[0] + ": Error: Please provide one argument (the read_file).\n") + sys.stderr.write(" Call with '-h' to get usage information.\n") + sys.exit(1) readfilename = args[0] if opts.type == "sam": - readfile = HTSeq.SAM_Reader( readfilename ) + readfile = HTSeq.SAM_Reader(readfilename) isAlnmntFile = True elif opts.type == "bam": - readfile = HTSeq.BAM_Reader( readfilename ) + readfile = HTSeq.BAM_Reader(readfilename) isAlnmntFile = True elif opts.type == "solexa-export": - readfile = HTSeq.SolexaExportReader( readfilename ) + readfile = HTSeq.SolexaExportReader(readfilename) isAlnmntFile = True elif opts.type == "fastq": - readfile = HTSeq.FastqReader( readfilename ) + readfile = HTSeq.FastqReader(readfilename) isAlnmntFile = False elif opts.type == "solexa-fastq": - readfile = HTSeq.FastqReader( readfilename, "solexa" ) + readfile = HTSeq.FastqReader(readfilename, "solexa") isAlnmntFile = False else: - sys.error( "Oops." ) + sys.error("Oops.") twoColumns = isAlnmntFile and not opts.nosplit if opts.outfile is None: - outfilename = os.path.basename( readfilename ) + ".pdf" + outfilename = os.path.basename(readfilename) + ".pdf" else: outfilename = opts.outfile - # **** Get read length **** if opts.readlen is not None: @@ -103,25 +112,23 @@ else: readlen = 0 if isAlnmntFile: - reads = ( a.read for a in readfile ) + reads = (a.read for a in readfile) else: reads = readfile - for r in islice( reads, 10000 ): - if len( r ) > readlen: - readlen = len( r ) + for r in islice(reads, 10000): + if len(r) > readlen: + readlen = len(r) max_qual = opts.maxqual gamma = opts.gamma - # **** Initialize count arrays **** - base_arr_U = numpy.zeros( ( readlen, 5 ), numpy.int ) - qual_arr_U = numpy.zeros( ( readlen, max_qual+1 ), numpy.int ) + base_arr_U = numpy.zeros((readlen, 5), numpy.int) + qual_arr_U = numpy.zeros((readlen, max_qual+1), numpy.int) if twoColumns: - base_arr_A = numpy.zeros( ( readlen, 5 ), numpy.int ) - qual_arr_A = numpy.zeros( ( readlen, max_qual+1 ), numpy.int ) - + base_arr_A = numpy.zeros((readlen, 5), numpy.int) + qual_arr_A = numpy.zeros((readlen, max_qual+1), numpy.int) # **** Main counting loop **** @@ -130,110 +137,107 @@ for a in readfile: if isAlnmntFile: r = a.read - else: - r = a - if twoColumns and (isAlnmntFile and a.aligned): - r.add_bases_to_count_array( base_arr_A ) - r.add_qual_to_count_array( qual_arr_A ) - else: - r.add_bases_to_count_array( base_arr_U ) - r.add_qual_to_count_array( qual_arr_U ) - i += 1 - if (i % 200000) == 0: - print(i, "reads processed") + else: + r = a + if twoColumns and (isAlnmntFile and a.aligned): + r.add_bases_to_count_array(base_arr_A) + r.add_qual_to_count_array(qual_arr_A) + else: + r.add_bases_to_count_array(base_arr_U) + r.add_qual_to_count_array(qual_arr_U) + i += 1 + if (i % 200000) == 0: + print(i, "reads processed") except: - sys.stderr.write( "Error occured in: %s\n" % - readfile.get_line_number_string() ) + sys.stderr.write("Error occured in: %s\n" % + readfile.get_line_number_string()) raise print(i, "reads processed") - # **** Normalize result **** - def norm_by_pos( arr ): - arr = numpy.array( arr, numpy.float ) - arr_n = ( arr.T / arr.sum( 1 ) ).T - arr_n[ arr == 0 ] = 0 + def norm_by_pos(arr): + arr = numpy.array(arr, numpy.float) + arr_n = (arr.T / arr.sum(1)).T + arr_n[arr == 0] = 0 return arr_n - def norm_by_start( arr ): - arr = numpy.array( arr, numpy.float ) - arr_n = ( arr.T / arr.sum( 1 )[ 0 ] ).T - arr_n[ arr == 0 ] = 0 + def norm_by_start(arr): + arr = numpy.array(arr, numpy.float) + arr_n = (arr.T / arr.sum(1)[0]).T + arr_n[arr == 0] = 0 return arr_n - - base_arr_U_n = norm_by_pos( base_arr_U ) - qual_arr_U_n = norm_by_start( qual_arr_U ) - nreads_U = base_arr_U[0,:].sum() + base_arr_U_n = norm_by_pos(base_arr_U) + qual_arr_U_n = norm_by_start(qual_arr_U) + nreads_U = base_arr_U[0, :].sum() if twoColumns: - base_arr_A_n = norm_by_pos( base_arr_A ) - qual_arr_A_n = norm_by_start( qual_arr_A ) - nreads_A = base_arr_A[0,:].sum() - + base_arr_A_n = norm_by_pos(base_arr_A) + qual_arr_A_n = norm_by_start(qual_arr_A) + nreads_A = base_arr_A[0, :].sum() # **** Make plot **** - def plot_bases( arr ): - xg = numpy.arange( readlen ) - pyplot.plot( xg, arr[ : , 0 ], marker='.', color='red') - pyplot.plot( xg, arr[ : , 1 ], marker='.', color='darkgreen') - pyplot.plot( xg, arr[ : , 2 ], marker='.',color='lightgreen') - pyplot.plot( xg, arr[ : , 3 ], marker='.',color='orange') - pyplot.plot( xg, arr[ : , 4 ], marker='.',color='grey') - pyplot.axis( (0, readlen-1, 0, 1 ) ) - pyplot.text( readlen*.70, .9, "A", color="red" ) - pyplot.text( readlen*.75, .9, "C", color="darkgreen" ) - pyplot.text( readlen*.80, .9, "G", color="lightgreen" ) - pyplot.text( readlen*.85, .9, "T", color="orange" ) - pyplot.text( readlen*.90, .9, "N", color="grey" ) + def plot_bases(arr): + xg = numpy.arange(readlen) + pyplot.plot(xg, arr[:, 0], marker='.', color='red') + pyplot.plot(xg, arr[:, 1], marker='.', color='darkgreen') + pyplot.plot(xg, arr[:, 2], marker='.', color='lightgreen') + pyplot.plot(xg, arr[:, 3], marker='.', color='orange') + pyplot.plot(xg, arr[:, 4], marker='.', color='grey') + pyplot.axis((0, readlen-1, 0, 1)) + pyplot.text(readlen*.70, .9, "A", color="red") + pyplot.text(readlen*.75, .9, "C", color="darkgreen") + pyplot.text(readlen*.80, .9, "G", color="lightgreen") + pyplot.text(readlen*.85, .9, "T", color="orange") + pyplot.text(readlen*.90, .9, "N", color="grey") pyplot.figure() - pyplot.subplots_adjust( top=.85 ) - pyplot.suptitle( os.path.basename(readfilename), fontweight='bold' ) + pyplot.subplots_adjust(top=.85) + pyplot.suptitle(os.path.basename(readfilename), fontweight='bold') if twoColumns: - pyplot.subplot( 221 ) - plot_bases( base_arr_U_n ) - pyplot.ylabel( "proportion of base" ) - pyplot.title( "non-aligned reads\n%.0f%% (%.3f million)" % - ( 100. * nreads_U / (nreads_U+nreads_A), nreads_U / 1e6 ) ) - - pyplot.subplot( 222 ) - plot_bases( base_arr_A_n ) - pyplot.title( "aligned reads\n%.0f%% (%.3f million)" % - ( 100. * nreads_A / (nreads_U+nreads_A), nreads_A / 1e6 ) ) - - pyplot.subplot( 223 ) - pyplot.pcolor( qual_arr_U_n.T ** gamma, cmap=pyplot.cm.Greens, - norm=Normalize( 0, 1 ) ) - pyplot.axis( (0, readlen-1, 0, max_qual+1 ) ) - pyplot.xlabel( "position in read" ) - pyplot.ylabel( "base-call quality score" ) - - pyplot.subplot( 224 ) - pyplot.pcolor( qual_arr_A_n.T ** gamma, cmap=pyplot.cm.Greens, - norm=Normalize( 0, 1 ) ) - pyplot.axis( (0, readlen-1, 0, max_qual+1 ) ) - pyplot.xlabel( "position in read" ) + pyplot.subplot(221) + plot_bases(base_arr_U_n) + pyplot.ylabel("proportion of base") + pyplot.title("non-aligned reads\n%.0f%% (%.4f million)" % + (100. * nreads_U / (nreads_U+nreads_A), nreads_U / 1e6)) + + pyplot.subplot(222) + plot_bases(base_arr_A_n) + pyplot.title("aligned reads\n%.0f%% (%.4f million)" % + (100. * nreads_A / (nreads_U+nreads_A), nreads_A / 1e6)) + + pyplot.subplot(223) + pyplot.pcolor(qual_arr_U_n.T ** gamma, cmap=pyplot.cm.Greens, + norm=Normalize(0, 1)) + pyplot.axis((0, readlen-1, 0, max_qual+1)) + pyplot.xlabel("position in read") + pyplot.ylabel("base-call quality score") + + pyplot.subplot(224) + pyplot.pcolor(qual_arr_A_n.T ** gamma, cmap=pyplot.cm.Greens, + norm=Normalize(0, 1)) + pyplot.axis((0, readlen-1, 0, max_qual+1)) + pyplot.xlabel("position in read") else: - pyplot.subplot( 211 ) - plot_bases( base_arr_U_n ) - pyplot.ylabel( "proportion of base" ) - pyplot.title( "%.3f million reads" % ( nreads_U / 1e6 ) ) - - pyplot.subplot( 212 ) - pyplot.pcolor( qual_arr_U_n.T ** gamma, cmap=pyplot.cm.Greens, - norm=Normalize( 0, 1 ) ) - pyplot.axis( (0, readlen-1, 0, max_qual+1 ) ) - pyplot.xlabel( "position in read" ) - pyplot.ylabel( "base-call quality score" ) + pyplot.subplot(211) + plot_bases(base_arr_U_n) + pyplot.ylabel("proportion of base") + pyplot.title("%.3f million reads" % (nreads_U / 1e6)) + + pyplot.subplot(212) + pyplot.pcolor(qual_arr_U_n.T ** gamma, cmap=pyplot.cm.Greens, + norm=Normalize(0, 1)) + pyplot.axis((0, readlen-1, 0, max_qual+1)) + pyplot.xlabel("position in read") + pyplot.ylabel("base-call quality score") + pyplot.savefig(outfilename) - pyplot.savefig( outfilename ) if __name__ == "__main__": main() diff -Nru htseq-0.10.0/python3/HTSeq/_version.py htseq-0.11.2/python3/HTSeq/_version.py --- htseq-0.10.0/python3/HTSeq/_version.py 2018-05-11 04:57:40.000000000 +0000 +++ htseq-0.11.2/python3/HTSeq/_version.py 2019-01-08 02:42:19.000000000 +0000 @@ -1 +1 @@ -__version__ = "0.10.0" \ No newline at end of file +__version__ = "0.11.2" \ No newline at end of file diff -Nru htseq-0.10.0/python3/src/HTSeq/_HTSeq.pxd htseq-0.11.2/python3/src/HTSeq/_HTSeq.pxd --- htseq-0.10.0/python3/src/HTSeq/_HTSeq.pxd 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python3/src/HTSeq/_HTSeq.pxd 2019-01-08 02:36:23.000000000 +0000 @@ -7,47 +7,47 @@ cdef public long end cdef str _strand - cpdef is_contained_in( self, GenomicInterval iv ) - cpdef contains( self, GenomicInterval iv ) - cpdef overlaps( self, GenomicInterval iv ) - cpdef extend_to_include( GenomicInterval self, GenomicInterval iv ) + cpdef is_contained_in(self, GenomicInterval iv) + cpdef contains(self, GenomicInterval iv) + cpdef overlaps(self, GenomicInterval iv) + cpdef extend_to_include(GenomicInterval self, GenomicInterval iv) cdef class GenomicPosition( GenomicInterval ): pass -cdef class Sequence( object ): +cdef class Sequence(object): cdef public bytes seq cdef public str name cdef public str descr - cpdef Sequence get_reverse_complement( self ) - cpdef object add_bases_to_count_array( Sequence self, numpy.ndarray count_array_ ) - cpdef Sequence trim_left_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) - cpdef Sequence trim_right_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) + cpdef Sequence get_reverse_complement(self, bint rename=?) + cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) + cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=?) + cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=?) -cdef class SequenceWithQualities( Sequence ): +cdef class SequenceWithQualities(Sequence): cdef readonly bytes _qualstr cdef readonly bytes _qualstr_phred cdef readonly str _qualscale cdef readonly object _qualarr - cdef _fill_qual_arr( SequenceWithQualities self ) - cpdef object add_qual_to_count_array( SequenceWithQualities self, numpy.ndarray count_array_ ) - cpdef SequenceWithQualities trim_left_end_with_quals( SequenceWithQualities self, - Sequence pattern, int max_mm_qual = ? ) - cpdef SequenceWithQualities trim_right_end_with_quals( SequenceWithQualities self, - Sequence pattern, int max_mm_qual = ? ) + cdef _fill_qual_arr(SequenceWithQualities self) + cpdef object add_qual_to_count_array(SequenceWithQualities self, numpy.ndarray count_array_) + cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, + Sequence pattern, int max_mm_qual=?) + cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, + Sequence pattern, int max_mm_qual=?) -cdef class Alignment( object ): +cdef class Alignment(object): cdef public SequenceWithQualities _read cdef public GenomicInterval iv -cdef class AlignmentWithSequenceReversal( Alignment ): +cdef class AlignmentWithSequenceReversal(Alignment): cdef public SequenceWithQualities read_as_aligned cdef public SequenceWithQualities _read_as_sequenced -cdef class SAM_Alignment( AlignmentWithSequenceReversal ): +cdef class SAM_Alignment(AlignmentWithSequenceReversal): cdef public list cigar cdef public int aQual cdef public GenomicPosition mate_start diff -Nru htseq-0.10.0/python3/src/HTSeq/_HTSeq.pyx htseq-0.11.2/python3/src/HTSeq/_HTSeq.pyx --- htseq-0.10.0/python3/src/HTSeq/_HTSeq.pyx 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python3/src/HTSeq/_HTSeq.pyx 2019-01-08 02:36:23.000000000 +0000 @@ -645,10 +645,15 @@ self.name = name self.descr = None - cpdef Sequence get_reverse_complement(self): - return Sequence( - reverse_complement(self.seq), - "revcomp_of_" + self.name) + cpdef Sequence get_reverse_complement(self, bint rename=True): + if rename: + return Sequence( + reverse_complement(self.seq), + "revcomp_of_" + self.name) + else: + return Sequence( + reverse_complement(self.seq), + self.name) def __str__(self): return self.seq.decode() @@ -898,13 +903,20 @@ self.write_to_fastq_file(sio, convert_to_phred) return sio.getvalue() - cpdef SequenceWithQualities get_reverse_complement(self): + cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): cdef SequenceWithQualities res - res = SequenceWithQualities( - reverse_complement(self.seq), - "revcomp_of_" + self.name, - self._qualstr[::-1], - self._qualscale) + if rename: + res = SequenceWithQualities( + reverse_complement(self.seq), + "revcomp_of_" + self.name, + self._qualstr[::-1], + self._qualscale) + else: + res = SequenceWithQualities( + reverse_complement(self.seq), + self.name, + self._qualstr[::-1], + self._qualscale) if self._qualarr is not None: res._qualarr = self._qualarr[::-1] return res diff -Nru htseq-0.10.0/python3/src/_HTSeq.c htseq-0.11.2/python3/src/_HTSeq.c --- htseq-0.10.0/python3/src/_HTSeq.c 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/python3/src/_HTSeq.c 2019-01-08 02:36:23.000000000 +0000 @@ -1,4 +1,4 @@ -/* Generated by Cython 0.28.2 */ +/* Generated by Cython 0.29.2 */ #define PY_SSIZE_T_CLEAN #include "Python.h" @@ -7,7 +7,8 @@ #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000) #error Cython requires Python 2.6+ or Python 3.3+. #else -#define CYTHON_ABI "0_28_2" +#define CYTHON_ABI "0_29_2" +#define CYTHON_HEX_VERSION 0x001D02F0 #define CYTHON_FUTURE_DIVISION 1 #include #ifndef offsetof @@ -78,6 +79,10 @@ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #elif defined(PYSTON_VERSION) #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 1 @@ -115,6 +120,10 @@ #define CYTHON_PEP489_MULTI_PHASE_INIT 0 #undef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE 0 + #undef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS 0 + #undef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK 0 #else #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_PYSTON 0 @@ -168,11 +177,17 @@ #define CYTHON_FAST_PYCALL 1 #endif #ifndef CYTHON_PEP489_MULTI_PHASE_INIT - #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000) + #define CYTHON_PEP489_MULTI_PHASE_INIT (PY_VERSION_HEX >= 0x03050000) #endif #ifndef CYTHON_USE_TP_FINALIZE #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1) #endif + #ifndef CYTHON_USE_DICT_VERSIONS + #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX >= 0x030600B1) + #endif + #ifndef CYTHON_USE_EXC_INFO_STACK + #define CYTHON_USE_EXC_INFO_STACK (PY_VERSION_HEX >= 0x030700A3) + #endif #endif #if !defined(CYTHON_FAST_PYCCALL) #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1) @@ -182,6 +197,9 @@ #undef SHIFT #undef BASE #undef MASK + #ifdef SIZEOF_VOID_P + enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) }; + #endif #endif #ifndef __has_attribute #define __has_attribute(x) 0 @@ -308,6 +326,9 @@ #ifndef Py_TPFLAGS_HAVE_FINALIZE #define Py_TPFLAGS_HAVE_FINALIZE 0 #endif +#ifndef METH_STACKLESS + #define METH_STACKLESS 0 +#endif #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL) #ifndef METH_FASTCALL #define METH_FASTCALL 0x80 @@ -321,15 +342,40 @@ #endif #if CYTHON_FAST_PYCCALL #define __Pyx_PyFastCFunction_Check(func)\ - ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))))) + ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))))) #else #define __Pyx_PyFastCFunction_Check(func) 0 #endif +#if CYTHON_USE_DICT_VERSIONS +#define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\ + (version_var) = __PYX_GET_DICT_VERSION(dict);\ + (cache_var) = (value); +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\ + (VAR) = __pyx_dict_cached_value;\ + } else {\ + (VAR) = __pyx_dict_cached_value = (LOOKUP);\ + __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\ + }\ + } +#else +#define __PYX_GET_DICT_VERSION(dict) (0) +#define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var) +#define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP); +#endif #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc) #define PyObject_Malloc(s) PyMem_Malloc(s) #define PyObject_Free(p) PyMem_Free(p) #define PyObject_Realloc(p) PyMem_Realloc(p) #endif +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030400A1 + #define PyMem_RawMalloc(n) PyMem_Malloc(n) + #define PyMem_RawRealloc(p, n) PyMem_Realloc(p, n) + #define PyMem_RawFree(p) PyMem_Free(p) +#endif #if CYTHON_COMPILING_IN_PYSTON #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co) #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno) @@ -437,8 +483,8 @@ #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format) #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt) #endif -#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) -#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) #else @@ -453,6 +499,7 @@ #define PyString_Type PyUnicode_Type #define PyString_Check PyUnicode_Check #define PyString_CheckExact PyUnicode_CheckExact + #define PyObject_Unicode PyObject_Str #endif #if PY_MAJOR_VERSION >= 3 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) @@ -593,6 +640,9 @@ (sizeof(type) == sizeof(Py_ssize_t) &&\ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\ v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) { + return (size_t) i < (size_t) limit; +} #if defined (__cplusplus) && __cplusplus >= 201103L #include #define __Pyx_sst_abs(value) std::abs(value) @@ -649,8 +699,9 @@ #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj) #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None) -#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False)) +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b); static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x); #define __Pyx_PySequence_Tuple(obj)\ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj)) @@ -731,7 +782,7 @@ if (!default_encoding) goto bad; default_encoding_c = PyBytes_AsString(default_encoding); if (!default_encoding_c) goto bad; - __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1); if (!__PYX_DEFAULT_STRING_ENCODING) goto bad; strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); Py_DECREF(default_encoding); @@ -757,7 +808,7 @@ static PyObject *__pyx_m = NULL; static PyObject *__pyx_d; static PyObject *__pyx_b; -static PyObject *__pyx_cython_runtime; +static PyObject *__pyx_cython_runtime = NULL; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; static PyObject *__pyx_empty_unicode; @@ -833,7 +884,7 @@ } __Pyx_BufFmt_Context; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":730 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":776 * # in Cython to enable them only on the right systems. * * ctypedef npy_int8 int8_t # <<<<<<<<<<<<<< @@ -842,7 +893,7 @@ */ typedef npy_int8 __pyx_t_5numpy_int8_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":731 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":777 * * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t # <<<<<<<<<<<<<< @@ -851,7 +902,7 @@ */ typedef npy_int16 __pyx_t_5numpy_int16_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":732 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":778 * ctypedef npy_int8 int8_t * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t # <<<<<<<<<<<<<< @@ -860,7 +911,7 @@ */ typedef npy_int32 __pyx_t_5numpy_int32_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":733 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":779 * ctypedef npy_int16 int16_t * ctypedef npy_int32 int32_t * ctypedef npy_int64 int64_t # <<<<<<<<<<<<<< @@ -869,7 +920,7 @@ */ typedef npy_int64 __pyx_t_5numpy_int64_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":737 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":783 * #ctypedef npy_int128 int128_t * * ctypedef npy_uint8 uint8_t # <<<<<<<<<<<<<< @@ -878,7 +929,7 @@ */ typedef npy_uint8 __pyx_t_5numpy_uint8_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":738 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":784 * * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t # <<<<<<<<<<<<<< @@ -887,7 +938,7 @@ */ typedef npy_uint16 __pyx_t_5numpy_uint16_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":739 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":785 * ctypedef npy_uint8 uint8_t * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t # <<<<<<<<<<<<<< @@ -896,7 +947,7 @@ */ typedef npy_uint32 __pyx_t_5numpy_uint32_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":740 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":786 * ctypedef npy_uint16 uint16_t * ctypedef npy_uint32 uint32_t * ctypedef npy_uint64 uint64_t # <<<<<<<<<<<<<< @@ -905,7 +956,7 @@ */ typedef npy_uint64 __pyx_t_5numpy_uint64_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":744 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":790 * #ctypedef npy_uint128 uint128_t * * ctypedef npy_float32 float32_t # <<<<<<<<<<<<<< @@ -914,7 +965,7 @@ */ typedef npy_float32 __pyx_t_5numpy_float32_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":745 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":791 * * ctypedef npy_float32 float32_t * ctypedef npy_float64 float64_t # <<<<<<<<<<<<<< @@ -923,7 +974,7 @@ */ typedef npy_float64 __pyx_t_5numpy_float64_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":754 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":800 * # The int types are mapped a bit surprising -- * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t # <<<<<<<<<<<<<< @@ -932,7 +983,7 @@ */ typedef npy_long __pyx_t_5numpy_int_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":755 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":801 * # numpy.int corresponds to 'l' and numpy.long to 'q' * ctypedef npy_long int_t * ctypedef npy_longlong long_t # <<<<<<<<<<<<<< @@ -941,7 +992,7 @@ */ typedef npy_longlong __pyx_t_5numpy_long_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":756 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":802 * ctypedef npy_long int_t * ctypedef npy_longlong long_t * ctypedef npy_longlong longlong_t # <<<<<<<<<<<<<< @@ -950,7 +1001,7 @@ */ typedef npy_longlong __pyx_t_5numpy_longlong_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":758 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":804 * ctypedef npy_longlong longlong_t * * ctypedef npy_ulong uint_t # <<<<<<<<<<<<<< @@ -959,7 +1010,7 @@ */ typedef npy_ulong __pyx_t_5numpy_uint_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":759 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":805 * * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t # <<<<<<<<<<<<<< @@ -968,7 +1019,7 @@ */ typedef npy_ulonglong __pyx_t_5numpy_ulong_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":760 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":806 * ctypedef npy_ulong uint_t * ctypedef npy_ulonglong ulong_t * ctypedef npy_ulonglong ulonglong_t # <<<<<<<<<<<<<< @@ -977,7 +1028,7 @@ */ typedef npy_ulonglong __pyx_t_5numpy_ulonglong_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":762 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":808 * ctypedef npy_ulonglong ulonglong_t * * ctypedef npy_intp intp_t # <<<<<<<<<<<<<< @@ -986,7 +1037,7 @@ */ typedef npy_intp __pyx_t_5numpy_intp_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":763 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":809 * * ctypedef npy_intp intp_t * ctypedef npy_uintp uintp_t # <<<<<<<<<<<<<< @@ -995,7 +1046,7 @@ */ typedef npy_uintp __pyx_t_5numpy_uintp_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":765 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":811 * ctypedef npy_uintp uintp_t * * ctypedef npy_double float_t # <<<<<<<<<<<<<< @@ -1004,7 +1055,7 @@ */ typedef npy_double __pyx_t_5numpy_float_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":766 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":812 * * ctypedef npy_double float_t * ctypedef npy_double double_t # <<<<<<<<<<<<<< @@ -1013,7 +1064,7 @@ */ typedef npy_double __pyx_t_5numpy_double_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":767 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":813 * ctypedef npy_double float_t * ctypedef npy_double double_t * ctypedef npy_longdouble longdouble_t # <<<<<<<<<<<<<< @@ -1060,7 +1111,7 @@ struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation; struct __pyx_obj_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":769 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":815 * ctypedef npy_longdouble longdouble_t * * ctypedef npy_cfloat cfloat_t # <<<<<<<<<<<<<< @@ -1069,7 +1120,7 @@ */ typedef npy_cfloat __pyx_t_5numpy_cfloat_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":770 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":816 * * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t # <<<<<<<<<<<<<< @@ -1078,7 +1129,7 @@ */ typedef npy_cdouble __pyx_t_5numpy_cdouble_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":771 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":817 * ctypedef npy_cfloat cfloat_t * ctypedef npy_cdouble cdouble_t * ctypedef npy_clongdouble clongdouble_t # <<<<<<<<<<<<<< @@ -1087,7 +1138,7 @@ */ typedef npy_clongdouble __pyx_t_5numpy_clongdouble_t; -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":773 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":819 * ctypedef npy_clongdouble clongdouble_t * * ctypedef npy_cdouble complex_t # <<<<<<<<<<<<<< @@ -1095,19 +1146,33 @@ * cdef inline object PyArray_MultiIterNew1(a): */ typedef npy_cdouble __pyx_t_5numpy_complex_t; +struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement; struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end; struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_right_end; struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals; struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals; +struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement; struct __pyx_opt_args_5HTSeq_6_HTSeq_parse_cigar; struct __pyx_opt_args_5HTSeq_6_HTSeq_build_cigar_list; struct __pyx_opt_args_5HTSeq_6_HTSeq_quotesafe_split; +/* "HTSeq/_HTSeq.pxd":23 + * cdef public str name + * cdef public str descr + * cpdef Sequence get_reverse_complement(self, bint rename=?) # <<<<<<<<<<<<<< + * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) + * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=?) + */ +struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement { + int __pyx_n; + int rename; +}; + /* "HTSeq/_HTSeq.pxd":25 - * cpdef Sequence get_reverse_complement( self ) - * cpdef object add_bases_to_count_array( Sequence self, numpy.ndarray count_array_ ) - * cpdef Sequence trim_left_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) # <<<<<<<<<<<<<< - * cpdef Sequence trim_right_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) + * cpdef Sequence get_reverse_complement(self, bint rename=?) + * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) + * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=?) # <<<<<<<<<<<<<< + * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=?) * */ struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end { @@ -1116,9 +1181,9 @@ }; /* "HTSeq/_HTSeq.pxd":26 - * cpdef object add_bases_to_count_array( Sequence self, numpy.ndarray count_array_ ) - * cpdef Sequence trim_left_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) - * cpdef Sequence trim_right_end( Sequence self, Sequence pattern, float mismatch_prop = ? ) # <<<<<<<<<<<<<< + * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) + * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=?) + * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=?) # <<<<<<<<<<<<<< * * */ @@ -1128,11 +1193,11 @@ }; /* "HTSeq/_HTSeq.pxd":36 - * cdef _fill_qual_arr( SequenceWithQualities self ) - * cpdef object add_qual_to_count_array( SequenceWithQualities self, numpy.ndarray count_array_ ) - * cpdef SequenceWithQualities trim_left_end_with_quals( SequenceWithQualities self, # <<<<<<<<<<<<<< - * Sequence pattern, int max_mm_qual = ? ) - * cpdef SequenceWithQualities trim_right_end_with_quals( SequenceWithQualities self, + * cdef _fill_qual_arr(SequenceWithQualities self) + * cpdef object add_qual_to_count_array(SequenceWithQualities self, numpy.ndarray count_array_) + * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< + * Sequence pattern, int max_mm_qual=?) + * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, */ struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals { int __pyx_n; @@ -1140,10 +1205,10 @@ }; /* "HTSeq/_HTSeq.pxd":38 - * cpdef SequenceWithQualities trim_left_end_with_quals( SequenceWithQualities self, - * Sequence pattern, int max_mm_qual = ? ) - * cpdef SequenceWithQualities trim_right_end_with_quals( SequenceWithQualities self, # <<<<<<<<<<<<<< - * Sequence pattern, int max_mm_qual = ? ) + * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, + * Sequence pattern, int max_mm_qual=?) + * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< + * Sequence pattern, int max_mm_qual=?) * */ struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals { @@ -1151,7 +1216,19 @@ int max_mm_qual; }; -/* "HTSeq/_HTSeq.pyx":1150 +/* "HTSeq/_HTSeq.pyx":906 + * return sio.getvalue() + * + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< + * cdef SequenceWithQualities res + * if rename: + */ +struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement { + int __pyx_n; + int rename; +}; + +/* "HTSeq/_HTSeq.pyx":1162 * _re_cigar_codes = re.compile('([MIDNSHP=X])') * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -1165,7 +1242,7 @@ PyObject *strand; }; -/* "HTSeq/_HTSeq.pyx":1167 +/* "HTSeq/_HTSeq.pyx":1179 * return build_cigar_list(cl, ref_left, chrom, strand) * * cpdef list build_cigar_list(list cigar_pairs, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -1179,7 +1256,7 @@ PyObject *strand; }; -/* "HTSeq/_HTSeq.pyx":1564 +/* "HTSeq/_HTSeq.pyx":1576 * ########################### * * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): # <<<<<<<<<<<<<< @@ -1210,7 +1287,7 @@ /* "HTSeq/_HTSeq.pxd":15 - * cpdef extend_to_include( GenomicInterval self, GenomicInterval iv ) + * cpdef extend_to_include(GenomicInterval self, GenomicInterval iv) * * cdef class GenomicPosition( GenomicInterval ): # <<<<<<<<<<<<<< * pass @@ -1224,7 +1301,7 @@ /* "HTSeq/_HTSeq.pxd":19 * * - * cdef class Sequence( object ): # <<<<<<<<<<<<<< + * cdef class Sequence(object): # <<<<<<<<<<<<<< * cdef public bytes seq * cdef public str name */ @@ -1240,7 +1317,7 @@ /* "HTSeq/_HTSeq.pxd":29 * * - * cdef class SequenceWithQualities( Sequence ): # <<<<<<<<<<<<<< + * cdef class SequenceWithQualities(Sequence): # <<<<<<<<<<<<<< * cdef readonly bytes _qualstr * cdef readonly bytes _qualstr_phred */ @@ -1256,7 +1333,7 @@ /* "HTSeq/_HTSeq.pxd":42 * * - * cdef class Alignment( object ): # <<<<<<<<<<<<<< + * cdef class Alignment(object): # <<<<<<<<<<<<<< * cdef public SequenceWithQualities _read * cdef public GenomicInterval iv */ @@ -1270,7 +1347,7 @@ /* "HTSeq/_HTSeq.pxd":46 * cdef public GenomicInterval iv * - * cdef class AlignmentWithSequenceReversal( Alignment ): # <<<<<<<<<<<<<< + * cdef class AlignmentWithSequenceReversal(Alignment): # <<<<<<<<<<<<<< * cdef public SequenceWithQualities read_as_aligned * cdef public SequenceWithQualities _read_as_sequenced */ @@ -1284,7 +1361,7 @@ /* "HTSeq/_HTSeq.pxd":50 * cdef public SequenceWithQualities _read_as_sequenced * - * cdef class SAM_Alignment( AlignmentWithSequenceReversal ): # <<<<<<<<<<<<<< + * cdef class SAM_Alignment(AlignmentWithSequenceReversal): # <<<<<<<<<<<<<< * cdef public list cigar * cdef public int aQual */ @@ -1341,7 +1418,7 @@ }; -/* "HTSeq/_HTSeq.pyx":1070 +/* "HTSeq/_HTSeq.pyx":1082 * * * cdef class BowtieAlignment(AlignmentWithSequenceReversal): # <<<<<<<<<<<<<< @@ -1355,7 +1432,7 @@ }; -/* "HTSeq/_HTSeq.pyx":1106 +/* "HTSeq/_HTSeq.pyx":1118 * 'X': 'sequence-mismatched'} * * cdef class CigarOperation(object): # <<<<<<<<<<<<<< @@ -1426,7 +1503,7 @@ */ struct __pyx_vtabstruct_5HTSeq_6_HTSeq_Sequence { - struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*get_reverse_complement)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch); + struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*get_reverse_complement)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args); PyObject *(*add_bases_to_count_array)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, PyArrayObject *, int __pyx_skip_dispatch); struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*trim_left_end)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end *__pyx_optional_args); struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*trim_right_end)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_right_end *__pyx_optional_args); @@ -1434,7 +1511,7 @@ static struct __pyx_vtabstruct_5HTSeq_6_HTSeq_Sequence *__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence; -/* "HTSeq/_HTSeq.pyx":784 +/* "HTSeq/_HTSeq.pyx":789 * * * cdef class SequenceWithQualities(Sequence): # <<<<<<<<<<<<<< @@ -1448,7 +1525,7 @@ PyObject *(*add_qual_to_count_array)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, PyArrayObject *, int __pyx_skip_dispatch); struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*trim_left_end_with_quals)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals *__pyx_optional_args); struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*trim_right_end_with_quals)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals *__pyx_optional_args); - struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*get_reverse_complement)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, int __pyx_skip_dispatch); + struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*get_reverse_complement)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args); }; static struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities; @@ -1595,13 +1672,6 @@ /* RaiseException.proto */ static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); -/* PyCFunctionFastCall.proto */ -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); -#else -#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) -#endif - /* PyFunctionFastCall.proto */ #if CYTHON_FAST_PYCALL #define __Pyx_PyFunction_FastCall(func, args, nargs)\ @@ -1611,6 +1681,18 @@ #else #define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs) #endif +#define __Pyx_BUILD_ASSERT_EXPR(cond)\ + (sizeof(char [1 - 2*!(cond)]) - 1) +#ifndef Py_MEMBER_SIZE +#define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member) +#endif + static size_t __pyx_pyframe_localsplus_offset = 0; + #include "frameobject.h" + #define __Pxy_PyFrame_Initialize_Offsets()\ + ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\ + (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus))) + #define __Pyx_PyFrame_GetLocalsplus(frame)\ + (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset)) #endif /* PyObjectCall.proto */ @@ -1625,9 +1707,6 @@ static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg); #endif -/* PyObjectCallOneArg.proto */ -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); - /* PyObjectCallNoArg.proto */ #if CYTHON_COMPILING_IN_CPYTHON static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func); @@ -1635,6 +1714,16 @@ #define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL) #endif +/* PyCFunctionFastCall.proto */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs); +#else +#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL) +#endif + +/* PyObjectCallOneArg.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg); + /* RaiseTooManyValuesToUnpack.proto */ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); @@ -1662,7 +1751,25 @@ static CYTHON_INLINE PyObject* __Pyx_PyUnicode_From_long(long value, Py_ssize_t width, char padding_char, char format_char); /* GetModuleGlobalName.proto */ -static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); +#if CYTHON_USE_DICT_VERSIONS +#define __Pyx_GetModuleGlobalName(var, name) {\ + static PY_UINT64_T __pyx_dict_version = 0;\ + static PyObject *__pyx_dict_cached_value = NULL;\ + (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\ + (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\ + __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +#define __Pyx_GetModuleGlobalNameUncached(var, name) {\ + PY_UINT64_T __pyx_dict_version;\ + PyObject *__pyx_dict_cached_value;\ + (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\ +} +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value); +#else +#define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name) +#define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name) +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name); +#endif /* IncludeStringH.proto */ #include @@ -1671,6 +1778,9 @@ static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, Py_UCS4 max_char); +/* PyObjectCall2Args.proto */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2); + /* BytesEquals.proto */ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); @@ -1692,13 +1802,8 @@ PyObject** py_start, PyObject** py_stop, PyObject** py_slice, int has_cstart, int has_cstop, int wraparound); -/* PyIntBinop.proto */ -#if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace); -#else -#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\ - PyObject_RichCompare(op1, op2, Py_EQ) - #endif +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, long inplace); /* GetItemInt.proto */ #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\ @@ -1775,6 +1880,7 @@ PyObject *func_annotations; } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; +#define __Pyx_CyFunction_Check(obj) (__Pyx_TypeCheck(obj, __pyx_CyFunctionType)) #define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, @@ -1840,6 +1946,9 @@ /* HasAttr.proto */ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *); +/* PyObjectGetMethod.proto */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method); + /* PyObjectCallMethod0.proto */ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name); @@ -1969,6 +2078,11 @@ /* None.proto */ static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t, Py_ssize_t); +/* GetTopmostException.proto */ +#if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate); +#endif + /* SaveResetException.proto */ #if CYTHON_FAST_THREAD_STATE #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb) @@ -2020,6 +2134,9 @@ /* Import.proto */ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); +/* PyIntCompare.proto */ +static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, long intval, long inplace); + /* bytes_index.proto */ static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds); @@ -2052,12 +2169,24 @@ /* SetupReduce.proto */ static int __Pyx_setup_reduce(PyObject* type_obj); +/* TypeImport.proto */ +#ifndef __PYX_HAVE_RT_ImportType_proto +#define __PYX_HAVE_RT_ImportType_proto +enum __Pyx_ImportType_CheckSize { + __Pyx_ImportType_CheckSize_Error = 0, + __Pyx_ImportType_CheckSize_Warn = 1, + __Pyx_ImportType_CheckSize_Ignore = 2 +}; +static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name, const char *class_name, size_t size, enum __Pyx_ImportType_CheckSize check_size); +#endif + /* ClassMethod.proto */ #include "descrobject.h" static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /* GetNameInClass.proto */ -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); +#define __Pyx_GetNameInClass(var, nmspace, name) (var) = __Pyx__GetNameInClass(nmspace, name) +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name); /* CLineInTraceback.proto */ #ifdef CYTHON_CLINE_IN_TRACEBACK @@ -2252,21 +2381,6 @@ /* CheckBinaryVersion.proto */ static int __Pyx_check_binary_version(void); -/* PyIdentifierFromString.proto */ -#if !defined(__Pyx_PyIdentifier_FromString) -#if PY_MAJOR_VERSION < 3 - #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s) -#else - #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s) -#endif -#endif - -/* ModuleImport.proto */ -static PyObject *__Pyx_ImportModule(const char *name); - -/* TypeImport.proto */ -static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict); - /* InitStrings.proto */ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); @@ -2274,13 +2388,13 @@ static PyObject *__pyx_f_5HTSeq_6_HTSeq_15GenomicInterval_contains(struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_iv, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_15GenomicInterval_overlaps(struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_iv, int __pyx_skip_dispatch); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_15GenomicInterval_extend_to_include(struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *__pyx_v_iv, int __pyx_skip_dispatch); /* proto*/ -static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_8Sequence_add_bases_to_count_array(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, PyArrayObject *__pyx_v_count_array_, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_trim_left_end(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end *__pyx_optional_args); /* proto*/ static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_trim_right_end(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_right_end *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities__fill_qual_arr(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self); /* proto*/ -struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ -struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/ +struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args); /* proto*/ +struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args); /* proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_add_qual_to_count_array(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, PyArrayObject *__pyx_v_count_array_, int __pyx_skip_dispatch); /* proto*/ static struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals *__pyx_optional_args); /* proto*/ static struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals *__pyx_optional_args); /* proto*/ @@ -2404,20 +2518,20 @@ static const char __pyx_k__17[] = ">"; static const char __pyx_k__19[] = "+"; static const char __pyx_k__20[] = "-"; -static const char __pyx_k__22[] = "\t"; -static const char __pyx_k__23[] = "\n"; -static const char __pyx_k__26[] = ")>"; -static const char __pyx_k__27[] = " "; -static const char __pyx_k__28[] = "@"; -static const char __pyx_k__29[] = "+\n"; -static const char __pyx_k__33[] = " '"; -static const char __pyx_k__35[] = "< "; -static const char __pyx_k__36[] = ": "; -static const char __pyx_k__37[] = ") >"; -static const char __pyx_k__38[] = "="; -static const char __pyx_k__41[] = "*"; -static const char __pyx_k__48[] = ";"; -static const char __pyx_k__49[] = "\""; +static const char __pyx_k__21[] = "\t"; +static const char __pyx_k__22[] = "\n"; +static const char __pyx_k__25[] = ")>"; +static const char __pyx_k__26[] = " "; +static const char __pyx_k__27[] = "@"; +static const char __pyx_k__28[] = "+\n"; +static const char __pyx_k__29[] = " '"; +static const char __pyx_k__30[] = "< "; +static const char __pyx_k__31[] = ": "; +static const char __pyx_k__32[] = ") >"; +static const char __pyx_k__33[] = "="; +static const char __pyx_k__34[] = "*"; +static const char __pyx_k__39[] = ";"; +static const char __pyx_k__40[] = "\""; static const char __pyx_k_add[] = "add"; static const char __pyx_k_csv[] = "csv"; static const char __pyx_k_end[] = "end"; @@ -2512,6 +2626,7 @@ static const char __pyx_k_pickle[] = "pickle"; static const char __pyx_k_reduce[] = "__reduce__"; static const char __pyx_k_ref_iv[] = "ref_iv"; +static const char __pyx_k_rename[] = "rename"; static const char __pyx_k_rstrip[] = "rstrip"; static const char __pyx_k_second[] = "second"; static const char __pyx_k_solexa[] = "solexa"; @@ -2538,6 +2653,7 @@ static const char __pyx_k_unnamed[] = "unnamed"; static const char __pyx_k_ACGTacgt[] = "ACGTacgt"; static const char __pyx_k_KeyError[] = "KeyError"; +static const char __pyx_k_Sequence[] = "Sequence"; static const char __pyx_k_StringIO[] = "StringIO"; static const char __pyx_k_TGCAtgca[] = "TGCAtgca"; static const char __pyx_k_contains[] = "contains"; @@ -2561,6 +2677,7 @@ static const char __pyx_k_stranded[] = "stranded"; static const char __pyx_k_typecode[] = "typecode"; static const char __pyx_k_warnings[] = "warnings"; +static const char __pyx_k_Alignment[] = "Alignment"; static const char __pyx_k_MIDNSHP_X[] = "([MIDNSHP=X])"; static const char __pyx_k_TypeError[] = "TypeError"; static const char __pyx_k_add_chrom[] = "add_chrom"; @@ -2590,6 +2707,7 @@ static const char __pyx_k_revcomp_of[] = "revcomp_of_"; static const char __pyx_k_solexa_old[] = "solexa-old"; static const char __pyx_k_AlignedRead[] = "AlignedRead"; +static const char __pyx_k_ChromVector[] = "ChromVector"; static const char __pyx_k_ImportError[] = "ImportError"; static const char __pyx_k_PickleError[] = "PickleError"; static const char __pyx_k_bowtie_line[] = "bowtie_line"; @@ -2601,6 +2719,7 @@ static const char __pyx_k_max_mm_qual[] = "max_mm_qual"; static const char __pyx_k_not_aligned[] = "', not aligned>"; static const char __pyx_k_start_index[] = "start_index"; +static const char __pyx_k_GenomicArray[] = "GenomicArray"; static const char __pyx_k_HTSeq__HTSeq[] = "HTSeq._HTSeq"; static const char __pyx_k_RuntimeError[] = "RuntimeError"; static const char __pyx_k_cigar_string[] = "cigar_string"; @@ -2612,6 +2731,7 @@ static const char __pyx_k_reference_id[] = "reference_id"; static const char __pyx_k_soft_clipped[] = "soft-clipped"; static const char __pyx_k_stringsource[] = "stringsource"; +static const char __pyx_k_SAM_Alignment[] = "SAM_Alignment"; static const char __pyx_k_chrom_vectors[] = "chrom_vectors"; static const char __pyx_k_from_SAM_line[] = "from_SAM_line"; static const char __pyx_k_mismatch_prop[] = "mismatch_prop"; @@ -2620,6 +2740,7 @@ static const char __pyx_k_track_options[] = "track_options"; static const char __pyx_k_trim_left_end[] = "trim_left_end"; static const char __pyx_k_AlignedSegment[] = "AlignedSegment"; +static const char __pyx_k_CigarOperation[] = "CigarOperation"; static const char __pyx_k_HTSeq_internal[] = "_HTSeq_internal"; static const char __pyx_k_base_to_column[] = "base_to_column"; static const char __pyx_k_is_proper_pair[] = "is_proper_pair"; @@ -2628,6 +2749,9 @@ static const char __pyx_k_re_cigar_codes[] = "_re_cigar_codes"; static const char __pyx_k_stop_too_large[] = "stop too large"; static const char __pyx_k_trim_right_end[] = "trim_right_end"; +static const char __pyx_k_BowtieAlignment[] = "BowtieAlignment"; +static const char __pyx_k_GenomicInterval[] = "GenomicInterval"; +static const char __pyx_k_GenomicPosition[] = "GenomicPosition"; static const char __pyx_k_Paired_end_read[] = "Paired-end read"; static const char __pyx_k_Strand_mismatch[] = "Strand mismatch."; static const char __pyx_k_is_contained_in[] = "is_contained_in"; @@ -2667,6 +2791,7 @@ static const char __pyx_k_next_reference_start[] = "next_reference_start"; static const char __pyx_k_GenomicArray_unpickle[] = "_GenomicArray_unpickle"; static const char __pyx_k_GenomicInterval_range[] = "GenomicInterval_range"; +static const char __pyx_k_SequenceWithQualities[] = "SequenceWithQualities"; static const char __pyx_k_cigar_operation_codes[] = "cigar_operation_codes"; static const char __pyx_k_cigar_operation_names[] = "cigar_operation_names"; static const char __pyx_k_track_type_bedGraph_s[] = "track type=bedGraph %s\n"; @@ -2694,6 +2819,7 @@ static const char __pyx_k_Inconsistent_CIGAR_operation[] = "Inconsistent CIGAR operation."; static const char __pyx_k_python3_src_HTSeq__HTSeq_pyx[] = "python3/src/HTSeq/_HTSeq.pyx"; static const char __pyx_k_pyx_unpickle_BowtieAlignment[] = "__pyx_unpickle_BowtieAlignment"; +static const char __pyx_k_AlignmentWithSequenceReversal[] = "AlignmentWithSequenceReversal"; static const char __pyx_k_pyx_unpickle_AlignmentWithSequ[] = "__pyx_unpickle_AlignmentWithSequenceReversal"; static const char __pyx_k_Automatic_adding_of_chromosomes[] = "Automatic adding of chromosomes can only be used with storage type 'StepVector'."; static const char __pyx_k_Illegal_base_letter_encountered[] = "Illegal base letter encountered."; @@ -2745,25 +2871,33 @@ static PyObject *__pyx_n_b_ACGTacgt; static PyObject *__pyx_n_s_AlignedRead; static PyObject *__pyx_n_s_AlignedSegment; +static PyObject *__pyx_n_s_Alignment; +static PyObject *__pyx_n_s_AlignmentWithSequenceReversal; static PyObject *__pyx_kp_u_Automatic_adding_of_chromosomes; +static PyObject *__pyx_n_s_BowtieAlignment; static PyObject *__pyx_n_u_C; static PyObject *__pyx_kp_u_Cannot_assign_to_zero_length_int; static PyObject *__pyx_kp_u_Cannot_extend_an_interval_to_inc; static PyObject *__pyx_kp_u_Cannot_extend_an_interval_to_inc_2; static PyObject *__pyx_kp_u_Cannot_extend_an_interval_to_inc_3; static PyObject *__pyx_kp_u_Cannot_subset_to_zero_length_int; +static PyObject *__pyx_n_s_ChromVector; static PyObject *__pyx_n_s_ChromVector_steps; static PyObject *__pyx_n_s_ChromVector_unpickle; static PyObject *__pyx_kp_u_Chromosome_name_mismatch; +static PyObject *__pyx_n_s_CigarOperation; static PyObject *__pyx_n_u_D; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor; static PyObject *__pyx_kp_u_Format_string_allocated_too_shor_2; static PyObject *__pyx_n_u_G; +static PyObject *__pyx_n_s_GenomicArray; static PyObject *__pyx_n_s_GenomicArray_steps; static PyObject *__pyx_n_s_GenomicArray_unpickle; +static PyObject *__pyx_n_s_GenomicInterval; static PyObject *__pyx_n_s_GenomicInterval_from_directional; static PyObject *__pyx_n_s_GenomicInterval_range; static PyObject *__pyx_n_s_GenomicInterval_ranged; +static PyObject *__pyx_n_s_GenomicPosition; static PyObject *__pyx_n_u_H; static PyObject *__pyx_n_s_HTSeq; static PyObject *__pyx_n_s_HTSeq__HTSeq; @@ -2808,10 +2942,13 @@ static PyObject *__pyx_kp_u_Required_assignment_signature_no; static PyObject *__pyx_n_s_RuntimeError; static PyObject *__pyx_n_u_S; +static PyObject *__pyx_n_s_SAM_Alignment; static PyObject *__pyx_kp_u_SAM_line_does_not_contain_at_lea; static PyObject *__pyx_kp_u_SAM_optional_field_tag_s_not_fou; static PyObject *__pyx_kp_u_SAM_optional_field_tag_s_not_uni; static PyObject *__pyx_kp_u_SAM_optional_field_with_illegal; +static PyObject *__pyx_n_s_Sequence; +static PyObject *__pyx_n_s_SequenceWithQualities; static PyObject *__pyx_kp_u_Sequence_in_SAM_file_contains_wh; static PyObject *__pyx_kp_u_Sequence_in_SAM_file_contains_wh_2; static PyObject *__pyx_kp_u_Start_of_interval_is_after_its_e; @@ -2838,24 +2975,24 @@ static PyObject *__pyx_kp_u__19; static PyObject *__pyx_kp_u__2; static PyObject *__pyx_kp_u__20; +static PyObject *__pyx_kp_u__21; static PyObject *__pyx_kp_u__22; -static PyObject *__pyx_kp_u__23; +static PyObject *__pyx_kp_u__25; +static PyObject *__pyx_kp_b__26; static PyObject *__pyx_kp_u__26; -static PyObject *__pyx_kp_b__27; static PyObject *__pyx_kp_u__27; static PyObject *__pyx_kp_u__28; static PyObject *__pyx_kp_u__29; static PyObject *__pyx_kp_u__3; +static PyObject *__pyx_kp_u__30; +static PyObject *__pyx_kp_u__31; +static PyObject *__pyx_kp_u__32; static PyObject *__pyx_kp_u__33; -static PyObject *__pyx_kp_u__35; -static PyObject *__pyx_kp_u__36; -static PyObject *__pyx_kp_u__37; -static PyObject *__pyx_kp_u__38; +static PyObject *__pyx_kp_b__34; +static PyObject *__pyx_kp_u__34; +static PyObject *__pyx_kp_b__39; static PyObject *__pyx_kp_u__4; -static PyObject *__pyx_kp_b__41; -static PyObject *__pyx_kp_u__41; -static PyObject *__pyx_kp_b__48; -static PyObject *__pyx_kp_b__49; +static PyObject *__pyx_kp_b__40; static PyObject *__pyx_kp_u__5; static PyObject *__pyx_kp_u__6; static PyObject *__pyx_kp_u__7; @@ -3053,6 +3190,7 @@ static PyObject *__pyx_n_s_reference_end; static PyObject *__pyx_n_s_reference_id; static PyObject *__pyx_n_s_reference_start; +static PyObject *__pyx_n_s_rename; static PyObject *__pyx_n_u_revcomp_of; static PyObject *__pyx_n_s_rfrom; static PyObject *__pyx_n_s_rstrip; @@ -3218,7 +3356,7 @@ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_6_make_translation_table_for_complementation(CYTHON_UNUSED PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8reverse_complement(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_seq); /* proto */ static int __pyx_pf_5HTSeq_6_HTSeq_8Sequence___init__(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, PyObject *__pyx_v_seq, PyObject *__pyx_v_name); /* proto */ -static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_v_rename); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_4__str__(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_6__repr__(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self); /* proto */ static Py_ssize_t __pyx_pf_5HTSeq_6_HTSeq_8Sequence_8__len__(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self); /* proto */ @@ -3247,7 +3385,7 @@ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_7qualstr___get__(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_6write_to_fastq_file(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, PyObject *__pyx_v_fastq_file); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_8get_fastq_str(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_v_convert_to_phred); /* proto */ -static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self); /* proto */ +static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_v_rename); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_12add_qual_to_count_array(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, PyArrayObject *__pyx_v_count_array_); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_14trim_left_end_with_quals(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_v_max_mm_qual); /* proto */ static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_16trim_right_end_with_quals(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_pattern, int __pyx_v_max_mm_qual); /* proto */ @@ -3385,50 +3523,39 @@ static PyObject *__pyx_k_; static PyObject *__pyx_k__18; static PyObject *__pyx_slice__13; -static PyObject *__pyx_slice__25; -static PyObject *__pyx_slice__31; -static PyObject *__pyx_slice__32; -static PyObject *__pyx_slice__43; -static PyObject *__pyx_slice__44; -static PyObject *__pyx_slice__45; +static PyObject *__pyx_slice__24; +static PyObject *__pyx_slice__35; +static PyObject *__pyx_slice__36; +static PyObject *__pyx_slice__37; static PyObject *__pyx_tuple__14; -static PyObject *__pyx_tuple__21; -static PyObject *__pyx_tuple__24; -static PyObject *__pyx_tuple__30; -static PyObject *__pyx_tuple__34; -static PyObject *__pyx_tuple__39; -static PyObject *__pyx_tuple__40; +static PyObject *__pyx_tuple__23; +static PyObject *__pyx_tuple__38; +static PyObject *__pyx_tuple__41; static PyObject *__pyx_tuple__42; +static PyObject *__pyx_tuple__43; +static PyObject *__pyx_tuple__44; +static PyObject *__pyx_tuple__45; static PyObject *__pyx_tuple__46; static PyObject *__pyx_tuple__47; +static PyObject *__pyx_tuple__48; static PyObject *__pyx_tuple__50; -static PyObject *__pyx_tuple__51; static PyObject *__pyx_tuple__52; -static PyObject *__pyx_tuple__53; -static PyObject *__pyx_tuple__54; static PyObject *__pyx_tuple__55; static PyObject *__pyx_tuple__56; -static PyObject *__pyx_tuple__57; static PyObject *__pyx_tuple__58; -static PyObject *__pyx_tuple__59; -static PyObject *__pyx_tuple__61; -static PyObject *__pyx_tuple__63; -static PyObject *__pyx_tuple__66; -static PyObject *__pyx_tuple__67; -static PyObject *__pyx_tuple__69; -static PyObject *__pyx_tuple__71; -static PyObject *__pyx_tuple__73; -static PyObject *__pyx_tuple__75; +static PyObject *__pyx_tuple__60; +static PyObject *__pyx_tuple__62; +static PyObject *__pyx_tuple__64; static PyObject *__pyx_codeobj__15; -static PyObject *__pyx_codeobj__60; -static PyObject *__pyx_codeobj__62; -static PyObject *__pyx_codeobj__64; +static PyObject *__pyx_codeobj__49; +static PyObject *__pyx_codeobj__51; +static PyObject *__pyx_codeobj__53; +static PyObject *__pyx_codeobj__54; +static PyObject *__pyx_codeobj__57; +static PyObject *__pyx_codeobj__59; +static PyObject *__pyx_codeobj__61; +static PyObject *__pyx_codeobj__63; static PyObject *__pyx_codeobj__65; -static PyObject *__pyx_codeobj__68; -static PyObject *__pyx_codeobj__70; -static PyObject *__pyx_codeobj__72; -static PyObject *__pyx_codeobj__74; -static PyObject *__pyx_codeobj__76; /* Late includes */ /* "HTSeq/_HTSeq.pyx":56 @@ -3991,12 +4118,9 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error) - } + __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, 85, __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))) { @@ -4154,7 +4278,7 @@ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 90, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -4197,7 +4321,7 @@ */ __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_self->end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -4233,7 +4357,7 @@ PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u_strand_2); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_7), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_7), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 91, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -4368,7 +4492,7 @@ */ __pyx_t_5 = __Pyx_PyInt_From_long(__pyx_v_self->end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -4420,7 +4544,7 @@ */ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_7), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_7), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 96, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -5409,14 +5533,6 @@ * return False */ break; - - /* "HTSeq/_HTSeq.pyx":163 - * return self._strand is other._strand and \ - * self.start == other.start and self.end == other.end - * elif op == 3: # != # <<<<<<<<<<<<<< - * return not (self == other) - * else: - */ case 3: /* "HTSeq/_HTSeq.pyx":164 @@ -5579,69 +5695,56 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; - int __pyx_t_8; __Pyx_RefNannySetupContext("is_contained_in", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_contained_in); 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)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_15is_contained_in)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_contained_in); 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_5HTSeq_6_HTSeq_15GenomicInterval_15is_contained_in)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_iv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_iv)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":182 @@ -5652,9 +5755,9 @@ * if self.chrom != iv.chrom: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 182, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "HTSeq/_HTSeq.pyx":183 * """ @@ -5684,9 +5787,9 @@ * return False * if self._strand is not strand_nostrand and iv.strand is not strand_nostrand and \ */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 184, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":185 * return False @@ -5716,21 +5819,21 @@ * self.strand is not iv._strand: * return False */ - __pyx_t_6 = (__pyx_v_self->_strand != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); - __pyx_t_8 = (__pyx_t_6 != 0); - if (__pyx_t_8) { + __pyx_t_5 = (__pyx_v_self->_strand != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { } else { - __pyx_t_7 = __pyx_t_8; + __pyx_t_6 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_7 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = (__pyx_t_8 != 0); - if (__pyx_t_6) { + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { } else { - __pyx_t_7 = __pyx_t_6; + __pyx_t_6 = __pyx_t_5; goto __pyx_L6_bool_binop_done; } @@ -5743,10 +5846,10 @@ */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (__pyx_t_1 != __pyx_v_iv->_strand); + __pyx_t_5 = (__pyx_t_1 != __pyx_v_iv->_strand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = (__pyx_t_6 != 0); - __pyx_t_7 = __pyx_t_8; + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_6 = __pyx_t_7; __pyx_L6_bool_binop_done:; /* "HTSeq/_HTSeq.pyx":186 @@ -5756,7 +5859,7 @@ * self.strand is not iv._strand: * return False */ - if (__pyx_t_7) { + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":188 * if self._strand is not strand_nostrand and iv.strand is not strand_nostrand and \ @@ -5786,16 +5889,16 @@ * return False * return True */ - __pyx_t_8 = ((__pyx_v_self->start < __pyx_v_iv->start) != 0); - if (!__pyx_t_8) { + __pyx_t_7 = ((__pyx_v_self->start < __pyx_v_iv->start) != 0); + if (!__pyx_t_7) { } else { - __pyx_t_7 = __pyx_t_8; + __pyx_t_6 = __pyx_t_7; goto __pyx_L10_bool_binop_done; } - __pyx_t_8 = ((__pyx_v_self->end > __pyx_v_iv->end) != 0); - __pyx_t_7 = __pyx_t_8; + __pyx_t_7 = ((__pyx_v_self->end > __pyx_v_iv->end) != 0); + __pyx_t_6 = __pyx_t_7; __pyx_L10_bool_binop_done:; - if (__pyx_t_7) { + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":190 * return False @@ -5844,7 +5947,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicInterval.is_contained_in", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -5911,67 +6013,54 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - int __pyx_t_6; + int __pyx_t_5; __Pyx_RefNannySetupContext("contains", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_17contains)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_contains); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 193, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_17contains)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_iv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 193, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_iv)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":199 @@ -5982,9 +6071,9 @@ * return iv.is_contained_in(self) */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 199, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 199, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "HTSeq/_HTSeq.pyx":200 * """ @@ -6035,7 +6124,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicInterval.contains", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -6102,69 +6190,56 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; - int __pyx_t_8; __Pyx_RefNannySetupContext("overlaps", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_19overlaps)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_overlaps); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 203, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_19overlaps)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_iv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_iv)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 203, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":213 @@ -6175,9 +6250,9 @@ * if self.chrom != iv.chrom: */ __pyx_t_1 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 213, __pyx_L1_error) - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 213, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 213, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_6) { + if (__pyx_t_5) { /* "HTSeq/_HTSeq.pyx":214 * """ @@ -6207,9 +6282,9 @@ * return False * if self.strand is not strand_nostrand and iv.strand is not strand_nostrand and \ */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 215, __pyx_L1_error) - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 215, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":216 * return False @@ -6241,22 +6316,22 @@ */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_5 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = (__pyx_t_6 != 0); - if (__pyx_t_8) { + __pyx_t_7 = (__pyx_t_5 != 0); + if (__pyx_t_7) { } else { - __pyx_t_7 = __pyx_t_8; + __pyx_t_6 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_7 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_6 = (__pyx_t_8 != 0); - if (__pyx_t_6) { + __pyx_t_5 = (__pyx_t_7 != 0); + if (__pyx_t_5) { } else { - __pyx_t_7 = __pyx_t_6; + __pyx_t_6 = __pyx_t_5; goto __pyx_L6_bool_binop_done; } @@ -6271,11 +6346,11 @@ __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = (__pyx_t_1 != __pyx_t_2); + __pyx_t_5 = (__pyx_t_1 != __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = (__pyx_t_6 != 0); - __pyx_t_7 = __pyx_t_8; + __pyx_t_7 = (__pyx_t_5 != 0); + __pyx_t_6 = __pyx_t_7; __pyx_L6_bool_binop_done:; /* "HTSeq/_HTSeq.pyx":217 @@ -6285,7 +6360,7 @@ * self.strand is not iv.strand: * return False */ - if (__pyx_t_7) { + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":219 * if self.strand is not strand_nostrand and iv.strand is not strand_nostrand and \ @@ -6315,8 +6390,8 @@ * return self.end > iv.start * else: */ - __pyx_t_7 = ((__pyx_v_self->start <= __pyx_v_iv->start) != 0); - if (__pyx_t_7) { + __pyx_t_6 = ((__pyx_v_self->start <= __pyx_v_iv->start) != 0); + if (__pyx_t_6) { /* "HTSeq/_HTSeq.pyx":221 * return False @@ -6371,7 +6446,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicInterval.overlaps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -6509,7 +6583,7 @@ * def range_d(GenomicInterval self, long int step=1): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GenomicInterval_range); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -6677,7 +6751,7 @@ * cpdef extend_to_include(GenomicInterval self, GenomicInterval iv): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GenomicInterval_ranged); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -6774,72 +6848,59 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; int __pyx_t_7; - int __pyx_t_8; + long __pyx_t_8; long __pyx_t_9; long __pyx_t_10; - long __pyx_t_11; __Pyx_RefNannySetupContext("extend_to_include", 0); /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend_to_include); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_25extend_to_include)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend_to_include); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 237, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_25extend_to_include)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_iv)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_iv)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_iv)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 237, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_iv)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 237, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":239 @@ -6849,9 +6910,9 @@ * raise TypeError, "Cannot extend an interval to include None." * if self.chrom != iv.chrom: */ - __pyx_t_6 = (((PyObject *)__pyx_v_iv) == Py_None); - __pyx_t_7 = (__pyx_t_6 != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_5 = (((PyObject *)__pyx_v_iv) == Py_None); + __pyx_t_6 = (__pyx_t_5 != 0); + if (unlikely(__pyx_t_6)) { /* "HTSeq/_HTSeq.pyx":240 * """Extend the interval such that it includes iv.""" @@ -6879,9 +6940,9 @@ * raise ValueError, "Cannot extend an interval to include an interval on another chromosome." * if self.strand is not strand_nostrand and iv.strand is not strand_nostrand and \ */ - __pyx_t_7 = (__Pyx_PyUnicode_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 241, __pyx_L1_error) - __pyx_t_6 = (__pyx_t_7 != 0); - if (unlikely(__pyx_t_6)) { + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_self->chrom, __pyx_v_iv->chrom, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 241, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_6 != 0); + if (unlikely(__pyx_t_5)) { /* "HTSeq/_HTSeq.pyx":242 * raise TypeError, "Cannot extend an interval to include None." @@ -6911,22 +6972,22 @@ */ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_6 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_8 = (__pyx_t_7 != 0); - if (__pyx_t_8) { + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { } else { - __pyx_t_6 = __pyx_t_8; + __pyx_t_5 = __pyx_t_7; goto __pyx_L6_bool_binop_done; } __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); + __pyx_t_7 = (__pyx_t_1 != __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_7 = (__pyx_t_8 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_7 != 0); + if (__pyx_t_6) { } else { - __pyx_t_6 = __pyx_t_7; + __pyx_t_5 = __pyx_t_6; goto __pyx_L6_bool_binop_done; } @@ -6941,11 +7002,11 @@ __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = (__pyx_t_1 != __pyx_t_2); + __pyx_t_6 = (__pyx_t_1 != __pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_8 = (__pyx_t_7 != 0); - __pyx_t_6 = __pyx_t_8; + __pyx_t_7 = (__pyx_t_6 != 0); + __pyx_t_5 = __pyx_t_7; __pyx_L6_bool_binop_done:; /* "HTSeq/_HTSeq.pyx":243 @@ -6955,7 +7016,7 @@ * self.strand is not iv.strand: * raise ValueError, "Cannot extend an interval to include an interval on another strand." */ - if (unlikely(__pyx_t_6)) { + if (unlikely(__pyx_t_5)) { /* "HTSeq/_HTSeq.pyx":245 * if self.strand is not strand_nostrand and iv.strand is not strand_nostrand and \ @@ -6983,14 +7044,14 @@ * self.end = max(self.end, iv.end) * */ - __pyx_t_9 = __pyx_v_iv->start; - __pyx_t_10 = __pyx_v_self->start; - if (((__pyx_t_9 < __pyx_t_10) != 0)) { - __pyx_t_11 = __pyx_t_9; + __pyx_t_8 = __pyx_v_iv->start; + __pyx_t_9 = __pyx_v_self->start; + if (((__pyx_t_8 < __pyx_t_9) != 0)) { + __pyx_t_10 = __pyx_t_8; } else { - __pyx_t_11 = __pyx_t_10; + __pyx_t_10 = __pyx_t_9; } - __pyx_v_self->start = __pyx_t_11; + __pyx_v_self->start = __pyx_t_10; /* "HTSeq/_HTSeq.pyx":247 * raise ValueError, "Cannot extend an interval to include an interval on another strand." @@ -6999,14 +7060,14 @@ * * def copy(self): */ - __pyx_t_11 = __pyx_v_iv->end; - __pyx_t_9 = __pyx_v_self->end; - if (((__pyx_t_11 > __pyx_t_9) != 0)) { - __pyx_t_10 = __pyx_t_11; + __pyx_t_10 = __pyx_v_iv->end; + __pyx_t_8 = __pyx_v_self->end; + if (((__pyx_t_10 > __pyx_t_8) != 0)) { + __pyx_t_9 = __pyx_t_10; } else { - __pyx_t_10 = __pyx_t_9; + __pyx_t_9 = __pyx_t_8; } - __pyx_v_self->end = __pyx_t_10; + __pyx_v_self->end = __pyx_t_9; /* "HTSeq/_HTSeq.pyx":237 * return _HTSeq_internal.GenomicInterval_ranged(self, step) @@ -7024,7 +7085,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicInterval.extend_to_include", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -7429,7 +7489,7 @@ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_1GenomicInterval_from_directional(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_1GenomicInterval_from_directional = {"GenomicInterval_from_directional", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_1GenomicInterval_from_directional, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_1GenomicInterval_from_directional = {"GenomicInterval_from_directional", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_1GenomicInterval_from_directional, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_1GenomicInterval_from_directional(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_chrom = 0; long __pyx_v_start_d; @@ -8160,7 +8220,7 @@ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -8199,7 +8259,7 @@ PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_strand_3); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -8317,7 +8377,7 @@ PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__11); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_strand); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -8687,7 +8747,7 @@ * else: * ncv.array = numpy.empty(shape=(iv.length, ), dtype=typecode) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_zeros); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 332, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); @@ -8729,7 +8789,7 @@ * elif storage == "memmap": */ /*else*/ { - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_empty); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -8795,7 +8855,7 @@ * filename=os.path.join(memmap_dir, iv.chrom + iv.strand + ".nmm"), mode='w+') * elif storage == "step": */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_memmap); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 337, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); @@ -8820,7 +8880,7 @@ * elif storage == "step": * ncv.array = StepVector.StepVector.create(typecode=typecode) */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_os); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 338, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); @@ -8929,7 +8989,7 @@ * else: * raise ValueError, "Illegal storage mode." */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_StepVector); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_StepVector); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_StepVector); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 340, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -9791,12 +9851,9 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error) - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 394, __pyx_L1_error) @@ -10678,7 +10735,6 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("addval", 0); __pyx_outer_scope = (struct __pyx_obj_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__ *) __Pyx_CyFunction_GetClosure(__pyx_self); __pyx_cur_scope = __pyx_outer_scope; @@ -10702,12 +10758,9 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 448, __pyx_L1_error) - } + __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, 448, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_y = __pyx_t_1; @@ -10733,38 +10786,10 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 449, __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 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_cur_scope->__pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_cur_scope->__pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_value); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __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; @@ -10793,7 +10818,6 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("HTSeq._HTSeq.ChromVector.__iadd__.addval", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -10820,7 +10844,6 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__iadd__", 0); __pyx_cur_scope = (struct __pyx_obj_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__ *)__pyx_tp_new_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__(__pyx_ptype_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { @@ -10874,38 +10897,10 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_3) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_value}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_value}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 445, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_cur_scope->__pyx_v_value); - __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_value); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_cur_scope->__pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_cur_scope->__pyx_v_value); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 445, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -10941,48 +10936,20 @@ */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_apply); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = NULL; + __pyx_t_3 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_3)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_addval); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_addval}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_addval}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 451, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_INCREF(__pyx_v_addval); - __Pyx_GIVEREF(__pyx_v_addval); - PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_addval); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } - } + __pyx_t_2 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_3, __pyx_v_addval) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_addval); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } @@ -11013,7 +10980,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.ChromVector.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -11073,12 +11039,9 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 455, __pyx_L1_error) - } + __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, 455, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; @@ -11198,7 +11161,6 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("steps", 0); /* "HTSeq/_HTSeq.pyx":461 @@ -11209,7 +11171,7 @@ * def apply(self, fun): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ChromVector_steps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 461, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -11224,38 +11186,10 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 461, __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 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __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; @@ -11274,7 +11208,6 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("HTSeq._HTSeq.ChromVector.steps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -11339,12 +11272,9 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error) - } + __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, 464, __pyx_L1_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)) { @@ -11456,38 +11386,10 @@ __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (!__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { - PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_value}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 466, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL; - __Pyx_INCREF(__pyx_v_value); - __Pyx_GIVEREF(__pyx_v_value); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_value); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_3, __pyx_v_value) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_value); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; /* "HTSeq/_HTSeq.pyx":465 @@ -11499,14 +11401,14 @@ */ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyInt_From_int(__pyx_v_self->offset); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 465, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_3 = PyNumber_Subtract(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_t_7 = PyNumber_Subtract(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); /* "HTSeq/_HTSeq.pyx":466 * for iv, value in self.steps(): @@ -11525,12 +11427,12 @@ * self.offset] = fun(value) * */ - __pyx_t_9 = PyNumber_Subtract(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 465, __pyx_L1_error) + __pyx_t_9 = PyNumber_Subtract(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_PyObject_SetSlice(__pyx_v_self->array, __pyx_t_1, 0, 0, &__pyx_t_3, &__pyx_t_9, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 465, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (__Pyx_PyObject_SetSlice(__pyx_v_self->array, __pyx_t_1, 0, 0, &__pyx_t_7, &__pyx_t_9, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 465, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -11624,7 +11526,7 @@ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 469, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -11745,7 +11647,7 @@ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ChromVector_unpickle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_ChromVector_unpickle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "HTSeq/_HTSeq.pyx":474 @@ -12285,7 +12187,7 @@ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_3_ChromVector_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_3_ChromVector_unpickle = {"_ChromVector_unpickle", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_3_ChromVector_unpickle, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_3_ChromVector_unpickle = {"_ChromVector_unpickle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_3_ChromVector_unpickle, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_3_ChromVector_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_array = 0; PyObject *__pyx_v_iv = 0; @@ -12840,7 +12742,7 @@ } __Pyx_XDECREF_SET(__pyx_7genexpr__pyx_v_c, __pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L8_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 510, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_8); @@ -13115,7 +13017,6 @@ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); /* "HTSeq/_HTSeq.pyx":520 @@ -13225,41 +13126,11 @@ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 524, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __pyx_t_3 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 524, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -13312,15 +13183,15 @@ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 527, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 527, __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 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 527, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; @@ -13358,12 +13229,12 @@ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_pos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 529, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 529, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 529, __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_r = __pyx_t_8; - __pyx_t_8 = 0; + __pyx_r = __pyx_t_6; + __pyx_t_6 = 0; goto __pyx_L0; } @@ -13399,28 +13270,28 @@ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 532, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_chrom); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 532, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_strand); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 532, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 532, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, &__pyx_t_8, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_t_5, 0, 0, &__pyx_t_6, &__pyx_t_3, NULL, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 532, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_6; - __pyx_t_6 = 0; + __pyx_r = __pyx_t_7; + __pyx_t_7 = 0; goto __pyx_L0; /* "HTSeq/_HTSeq.pyx":531 @@ -13445,23 +13316,23 @@ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 534, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_chrom); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Dict_GetItem(__pyx_t_3, __pyx_v_5HTSeq_6_HTSeq_strand_nostrand); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 534, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_6, 0, 0, &__pyx_t_3, &__pyx_t_8, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyObject_GetSlice(__pyx_t_7, 0, 0, &__pyx_t_3, &__pyx_t_6, NULL, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; @@ -13511,7 +13382,6 @@ __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicArray.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -13552,7 +13422,6 @@ PyObject *__pyx_t_5 = NULL; int __pyx_t_6; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("__setitem__", 0); /* "HTSeq/_HTSeq.pyx":540 @@ -13615,12 +13484,9 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 543, __pyx_L1_error) - } + __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, 543, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 543, __pyx_L1_error) @@ -13843,41 +13709,11 @@ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_7) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 553, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __pyx_t_4 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_7, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 553, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -13918,8 +13754,8 @@ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_strand); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 555, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; @@ -13934,8 +13770,8 @@ __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_PyObject_SetSlice(__pyx_t_8, __pyx_v_value, 0, 0, &__pyx_t_4, &__pyx_t_5, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 555, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_PyObject_SetSlice(__pyx_t_3, __pyx_v_value, 0, 0, &__pyx_t_4, &__pyx_t_5, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 555, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -13987,12 +13823,12 @@ */ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_start); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 559, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 559, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - if (__Pyx_PyObject_SetSlice(__pyx_t_5, __pyx_v_value, 0, 0, &__pyx_t_4, &__pyx_t_8, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 558, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_index, __pyx_n_s_end); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 559, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + if (__Pyx_PyObject_SetSlice(__pyx_t_5, __pyx_v_value, 0, 0, &__pyx_t_4, &__pyx_t_3, NULL, 0, 0, 1) < 0) __PYX_ERR(0, 558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } __pyx_L18:; @@ -14035,7 +13871,6 @@ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicArray.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -14150,7 +13985,7 @@ * iv = GenomicInterval(chrom, start_index, sys.maxsize, ".") * else: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -14168,7 +14003,7 @@ * else: * iv = GenomicInterval(chrom, start_index, start_index + length, ".") */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 566, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -14375,12 +14210,9 @@ __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_6) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error) - } + __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, 575, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 575, __pyx_L1_error) @@ -14645,7 +14477,7 @@ * def write_bedgraph_file(self, file_or_filename, strand=".", track_options=""): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GenomicArray_unpickle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_GenomicArray_unpickle); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_self->stranded); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 587, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); @@ -14793,13 +14625,13 @@ PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; - PyObject *__pyx_t_8 = NULL; + Py_ssize_t __pyx_t_8; Py_ssize_t __pyx_t_9; - Py_ssize_t __pyx_t_10; + int __pyx_t_10; int __pyx_t_11; - int __pyx_t_12; - Py_ssize_t __pyx_t_13; - PyObject *(*__pyx_t_14)(PyObject *); + Py_ssize_t __pyx_t_12; + PyObject *(*__pyx_t_13)(PyObject *); + PyObject *__pyx_t_14 = NULL; PyObject *__pyx_t_15 = NULL; PyObject *(*__pyx_t_16)(PyObject *); Py_ssize_t __pyx_t_17; @@ -14965,12 +14797,24 @@ * else: * f.write("track type=bedGraph %s\n" % track_options) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 599, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_3, function); + } + } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_6, __pyx_kp_u_track_type_bedGraph) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u_track_type_bedGraph); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "HTSeq/_HTSeq.pyx":598 * else: @@ -14990,57 +14834,27 @@ * for iv, value in self.chrom_vectors[chrom][strand].steps(): */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyUnicode_Format(__pyx_kp_u_track_type_bedGraph_s, __pyx_v_track_options); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_track_type_bedGraph_s, __pyx_v_track_options); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 601, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3); if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - } - } - if (!__pyx_t_7) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 601, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_7, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 601, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; } __pyx_L12:; @@ -15051,23 +14865,23 @@ * for iv, value in self.chrom_vectors[chrom][strand].steps(): * if iv.start == -sys.maxsize - 1 or iv.end == sys.maxsize: */ - __pyx_t_9 = 0; + __pyx_t_8 = 0; if (unlikely(__pyx_v_self->chrom_vectors == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); __PYX_ERR(0, 602, __pyx_L1_error) } - __pyx_t_5 = __Pyx_dict_iterator(__pyx_v_self->chrom_vectors, 1, ((PyObject *)NULL), (&__pyx_t_10), (&__pyx_t_11)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_3); - __pyx_t_3 = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_dict_iterator(__pyx_v_self->chrom_vectors, 1, ((PyObject *)NULL), (&__pyx_t_9), (&__pyx_t_10)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); + __pyx_t_5 = __pyx_t_3; + __pyx_t_3 = 0; while (1) { - __pyx_t_12 = __Pyx_dict_iter_next(__pyx_t_3, __pyx_t_10, &__pyx_t_9, &__pyx_t_5, NULL, NULL, __pyx_t_11); - if (unlikely(__pyx_t_12 == 0)) break; - if (unlikely(__pyx_t_12 == -1)) __PYX_ERR(0, 602, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_XDECREF_SET(__pyx_v_chrom, __pyx_t_5); - __pyx_t_5 = 0; + __pyx_t_11 = __Pyx_dict_iter_next(__pyx_t_5, __pyx_t_9, &__pyx_t_8, &__pyx_t_3, NULL, NULL, __pyx_t_10); + if (unlikely(__pyx_t_11 == 0)) break; + if (unlikely(__pyx_t_11 == -1)) __PYX_ERR(0, 602, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_XDECREF_SET(__pyx_v_chrom, __pyx_t_3); + __pyx_t_3 = 0; /* "HTSeq/_HTSeq.pyx":603 * f.write("track type=bedGraph %s\n" % track_options) @@ -15080,63 +14894,60 @@ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); __PYX_ERR(0, 603, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_v_chrom); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = __Pyx_PyObject_GetItem(__pyx_t_8, __pyx_v_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyDict_GetItem(__pyx_v_self->chrom_vectors, __pyx_v_chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_steps); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_7 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_v_strand); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_steps); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_6) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) { - __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_13 = 0; - __pyx_t_14 = NULL; + __pyx_t_3 = (__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_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) { + __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0; + __pyx_t_13 = NULL; } else { - __pyx_t_13 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_14 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 603, __pyx_L1_error) } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(!__pyx_t_14)) { - if (likely(PyList_CheckExact(__pyx_t_8))) { - if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_8)) break; + if (likely(!__pyx_t_13)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 603, __pyx_L1_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, 603, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_8)) break; + if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_13); __Pyx_INCREF(__pyx_t_5); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_3); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 603, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_5 = __pyx_t_14(__pyx_t_8); - if (unlikely(!__pyx_t_5)) { + __pyx_t_3 = __pyx_t_13(__pyx_t_6); + if (unlikely(!__pyx_t_3)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); @@ -15144,10 +14955,10 @@ } break; } - __Pyx_GOTREF(__pyx_t_5); + __Pyx_GOTREF(__pyx_t_3); } - if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) { - PyObject* sequence = __pyx_t_5; + 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); @@ -15156,31 +14967,31 @@ } #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); + __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_14 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_6 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_7 = PyList_GET_ITEM(sequence, 0); + __pyx_t_14 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_14); #else - __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); + __pyx_t_14 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 603, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); #endif - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_15 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 603, __pyx_L1_error) + __pyx_t_15 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 603, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext; - index = 0; __pyx_t_6 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_6)) goto __pyx_L17_unpacking_failed; - __Pyx_GOTREF(__pyx_t_6); - index = 1; __pyx_t_7 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed; + index = 0; __pyx_t_7 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_7)) goto __pyx_L17_unpacking_failed; __Pyx_GOTREF(__pyx_t_7); + index = 1; __pyx_t_14 = __pyx_t_16(__pyx_t_15); if (unlikely(!__pyx_t_14)) goto __pyx_L17_unpacking_failed; + __Pyx_GOTREF(__pyx_t_14); if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 2) < 0) __PYX_ERR(0, 603, __pyx_L1_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; @@ -15192,10 +15003,10 @@ __PYX_ERR(0, 603, __pyx_L1_error) __pyx_L18_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_v_iv, __pyx_t_6); - __pyx_t_6 = 0; - __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_7); + __Pyx_XDECREF_SET(__pyx_v_iv, __pyx_t_7); __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_value, __pyx_t_14); + __pyx_t_14 = 0; /* "HTSeq/_HTSeq.pyx":604 * for chrom in self.chrom_vectors: @@ -15204,41 +15015,41 @@ * continue * f.write("%s\t%d\t%d\t%f\n" % */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_start); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_start); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GetModuleGlobalName(__pyx_t_14, __pyx_n_s_sys); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = PyNumber_Negative(__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyInt_SubtractObjC(__pyx_t_14, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyInt_SubtractObjC(__pyx_t_7, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = PyObject_RichCompare(__pyx_t_3, __pyx_t_7, Py_EQ); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; if (!__pyx_t_1) { } else { __pyx_t_4 = __pyx_t_1; goto __pyx_L20_bool_binop_done; } - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_sys); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_7, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = PyObject_RichCompare(__pyx_t_14, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 604, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 604, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_1; __pyx_L20_bool_binop_done:; if (__pyx_t_4) { @@ -15268,10 +15079,10 @@ * (iv.chrom, iv.start, iv.end, value)) * if not hasattr(file_or_filename, "write"): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyTuple_New(8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_14 = PyTuple_New(8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_14); __pyx_t_17 = 0; __pyx_t_18 = 127; @@ -15284,18 +15095,18 @@ */ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_chrom); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); - __pyx_t_19 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_15), __pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 607, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_15), __pyx_empty_unicode); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_18 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) > __pyx_t_18) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) : __pyx_t_18; __pyx_t_17 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_19); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_19); __pyx_t_19 = 0; - __Pyx_INCREF(__pyx_kp_u__22); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_17 += 1; - __Pyx_GIVEREF(__pyx_kp_u__22); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_kp_u__22); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_kp_u__21); __pyx_t_19 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_start); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_15 = __Pyx_PyObject_Format(__pyx_t_19, __pyx_n_u_d); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 607, __pyx_L1_error) @@ -15304,12 +15115,12 @@ __pyx_t_18 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) > __pyx_t_18) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_15) : __pyx_t_18; __pyx_t_17 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15); __Pyx_GIVEREF(__pyx_t_15); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_15); + PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_15); __pyx_t_15 = 0; - __Pyx_INCREF(__pyx_kp_u__22); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_17 += 1; - __Pyx_GIVEREF(__pyx_kp_u__22); - PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_kp_u__22); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_14, 3, __pyx_kp_u__21); __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_iv, __pyx_n_s_end); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __pyx_t_19 = __Pyx_PyObject_Format(__pyx_t_15, __pyx_n_u_d); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 607, __pyx_L1_error) @@ -15318,23 +15129,23 @@ __pyx_t_18 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) > __pyx_t_18) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) : __pyx_t_18; __pyx_t_17 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); - PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_t_19); + PyTuple_SET_ITEM(__pyx_t_14, 4, __pyx_t_19); __pyx_t_19 = 0; - __Pyx_INCREF(__pyx_kp_u__22); + __Pyx_INCREF(__pyx_kp_u__21); __pyx_t_17 += 1; - __Pyx_GIVEREF(__pyx_kp_u__22); - PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_kp_u__22); + __Pyx_GIVEREF(__pyx_kp_u__21); + PyTuple_SET_ITEM(__pyx_t_14, 5, __pyx_kp_u__21); __pyx_t_19 = __Pyx_PyObject_Format(__pyx_v_value, __pyx_n_u_f); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 607, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); __pyx_t_18 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) > __pyx_t_18) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_19) : __pyx_t_18; __pyx_t_17 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_19); __Pyx_GIVEREF(__pyx_t_19); - PyTuple_SET_ITEM(__pyx_t_7, 6, __pyx_t_19); + PyTuple_SET_ITEM(__pyx_t_14, 6, __pyx_t_19); __pyx_t_19 = 0; - __Pyx_INCREF(__pyx_kp_u__23); + __Pyx_INCREF(__pyx_kp_u__22); __pyx_t_17 += 1; - __Pyx_GIVEREF(__pyx_kp_u__23); - PyTuple_SET_ITEM(__pyx_t_7, 7, __pyx_kp_u__23); + __Pyx_GIVEREF(__pyx_kp_u__22); + PyTuple_SET_ITEM(__pyx_t_14, 7, __pyx_kp_u__22); /* "HTSeq/_HTSeq.pyx":606 * if iv.start == -sys.maxsize - 1 or iv.end == sys.maxsize: @@ -15343,56 +15154,26 @@ * (iv.chrom, iv.start, iv.end, value)) * if not hasattr(file_or_filename, "write"): */ - __pyx_t_19 = __Pyx_PyUnicode_Join(__pyx_t_7, 8, __pyx_t_17, __pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 606, __pyx_L1_error) + __pyx_t_19 = __Pyx_PyUnicode_Join(__pyx_t_14, 8, __pyx_t_17, __pyx_t_18); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 606, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_19); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_7)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __pyx_t_14 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { + __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3); + if (likely(__pyx_t_14)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3); + __Pyx_INCREF(__pyx_t_14); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - } - } - if (!__pyx_t_7) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_19); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_19}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_19}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; - } else - #endif - { - __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_15); - __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_7); __pyx_t_7 = NULL; - __Pyx_GIVEREF(__pyx_t_19); - PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_19); - __pyx_t_19 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; + __Pyx_DECREF_SET(__pyx_t_3, function); } } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = (__pyx_t_14) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_14, __pyx_t_19) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_19); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 606, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; /* "HTSeq/_HTSeq.pyx":603 * f.write("track type=bedGraph %s\n" % track_options) @@ -15403,9 +15184,9 @@ */ __pyx_L15_continue:; } - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "HTSeq/_HTSeq.pyx":608 * f.write("%s\t%d\t%d\t%f\n" % @@ -15425,27 +15206,24 @@ * * def steps(self): */ - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 609, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); - __Pyx_INCREF(__pyx_t_6); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_f, __pyx_n_s_close); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_7)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_8, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 609, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __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, 609, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "HTSeq/_HTSeq.pyx":608 * f.write("%s\t%d\t%d\t%f\n" % @@ -15472,7 +15250,7 @@ __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); - __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_14); __Pyx_XDECREF(__pyx_t_15); __Pyx_XDECREF(__pyx_t_19); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicArray.write_bedgraph_file", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -15514,7 +15292,6 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("steps", 0); /* "HTSeq/_HTSeq.pyx":612 @@ -15525,7 +15302,7 @@ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_HTSeq_internal); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_GenomicArray_steps); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 612, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -15540,38 +15317,10 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)__pyx_v_self)}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 612, __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 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_self)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, ((PyObject *)__pyx_v_self)); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, ((PyObject *)__pyx_v_self)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_self)); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __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; @@ -15590,7 +15339,6 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("HTSeq._HTSeq.GenomicArray.steps", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -15945,7 +15693,7 @@ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_5_GenomicArray_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_5_GenomicArray_unpickle = {"_GenomicArray_unpickle", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_5_GenomicArray_unpickle, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_5_GenomicArray_unpickle = {"_GenomicArray_unpickle", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_5_GenomicArray_unpickle, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_5_GenomicArray_unpickle(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stranded = 0; PyObject *__pyx_v_typecode = 0; @@ -16138,7 +15886,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyBytes_Type)), __pyx_n_s_maketrans); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 627, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; @@ -16180,7 +15928,6 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("reverse_complement", 0); /* "HTSeq/_HTSeq.pyx":635 @@ -16191,7 +15938,7 @@ * base_to_column = {'A': 0, 'C': 1, 'G': 2, 'T': 3, 'N': 4} */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_seq, __pyx_slice__25); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_seq, __pyx_slice__24); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_translate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 635, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); @@ -16206,38 +15953,10 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 635, __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 = NULL; - __Pyx_INCREF(__pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); - __Pyx_GIVEREF(__pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_5HTSeq_6_HTSeq__translation_table_for_complementation); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 635, __pyx_L1_error) __pyx_r = ((PyObject*)__pyx_t_1); @@ -16257,7 +15976,6 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("HTSeq._HTSeq.reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -16423,7 +16141,7 @@ * self.name = name * self.descr = None # <<<<<<<<<<<<<< * - * cpdef Sequence get_reverse_complement(self): + * cpdef Sequence get_reverse_complement(self, bint rename=True): */ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); @@ -16448,116 +16166,205 @@ /* "HTSeq/_HTSeq.pyx":648 * self.descr = None * - * cpdef Sequence get_reverse_complement(self): # <<<<<<<<<<<<<< - * return Sequence( - * reverse_complement(self.seq), + * cpdef Sequence get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< + * if rename: + * return Sequence( */ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_skip_dispatch) { +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args) { + int __pyx_v_rename = ((int)1); struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; + PyObject *__pyx_t_5 = NULL; + int __pyx_t_6; __Pyx_RefNannySetupContext("get_reverse_complement", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_rename = __pyx_optional_args->rename; + } + } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_rename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } } - } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 648, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } /* "HTSeq/_HTSeq.pyx":649 * - * cpdef Sequence get_reverse_complement(self): - * return Sequence( # <<<<<<<<<<<<<< - * reverse_complement(self.seq), - * "revcomp_of_" + self.name) + * cpdef Sequence get_reverse_complement(self, bint rename=True): + * if rename: # <<<<<<<<<<<<<< + * return Sequence( + * reverse_complement(self.seq), */ - __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_6 = (__pyx_v_rename != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":650 - * cpdef Sequence get_reverse_complement(self): - * return Sequence( - * reverse_complement(self.seq), # <<<<<<<<<<<<<< - * "revcomp_of_" + self.name) - * + /* "HTSeq/_HTSeq.pyx":650 + * cpdef Sequence get_reverse_complement(self, bint rename=True): + * if rename: + * return Sequence( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * "revcomp_of_" + self.name) + */ + __Pyx_XDECREF(((PyObject *)__pyx_r)); + + /* "HTSeq/_HTSeq.pyx":651 + * if rename: + * return Sequence( + * reverse_complement(self.seq), # <<<<<<<<<<<<<< + * "revcomp_of_" + self.name) + * else: */ - __pyx_t_1 = __pyx_v_self->seq; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __pyx_v_self->seq; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "HTSeq/_HTSeq.pyx":652 + * return Sequence( + * reverse_complement(self.seq), + * "revcomp_of_" + self.name) # <<<<<<<<<<<<<< + * else: + * return Sequence( + */ + __pyx_t_1 = __Pyx_PyUnicode_ConcatSafe(__pyx_n_u_revcomp_of, __pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + + /* "HTSeq/_HTSeq.pyx":650 + * cpdef Sequence get_reverse_complement(self, bint rename=True): + * if rename: + * return Sequence( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * "revcomp_of_" + self.name) + */ + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_1); + __pyx_t_1 = 0; + goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":651 - * return Sequence( - * reverse_complement(self.seq), - * "revcomp_of_" + self.name) # <<<<<<<<<<<<<< + /* "HTSeq/_HTSeq.pyx":649 * - * def __str__(self): + * cpdef Sequence get_reverse_complement(self, bint rename=True): + * if rename: # <<<<<<<<<<<<<< + * return Sequence( + * reverse_complement(self.seq), */ - __pyx_t_1 = __Pyx_PyUnicode_ConcatSafe(__pyx_n_u_revcomp_of, __pyx_v_self->name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 651, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + } - /* "HTSeq/_HTSeq.pyx":649 + /* "HTSeq/_HTSeq.pyx":654 + * "revcomp_of_" + self.name) + * else: + * return Sequence( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * self.name) + */ + /*else*/ { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + + /* "HTSeq/_HTSeq.pyx":655 + * else: + * return Sequence( + * reverse_complement(self.seq), # <<<<<<<<<<<<<< + * self.name) * - * cpdef Sequence get_reverse_complement(self): - * return Sequence( # <<<<<<<<<<<<<< - * reverse_complement(self.seq), - * "revcomp_of_" + self.name) */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 649, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); - __pyx_t_2 = 0; - __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 649, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_1); - __pyx_t_1 = 0; - goto __pyx_L0; + __pyx_t_1 = __pyx_v_self->seq; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 655, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "HTSeq/_HTSeq.pyx":654 + * "revcomp_of_" + self.name) + * else: + * return Sequence( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * self.name) + */ + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __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_v_self->name); + __Pyx_GIVEREF(__pyx_v_self->name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 654, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_4); + __pyx_t_4 = 0; + goto __pyx_L0; + } /* "HTSeq/_HTSeq.pyx":648 * self.descr = None * - * cpdef Sequence get_reverse_complement(self): # <<<<<<<<<<<<<< - * return Sequence( - * reverse_complement(self.seq), + * cpdef Sequence get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< + * if rename: + * return Sequence( */ /* function exit code */ @@ -16566,6 +16373,7 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.get_reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -16575,25 +16383,74 @@ } /* Python wrapper */ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_rename; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_reverse_complement (wrapper)", 0); - __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self)); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rename,0}; + PyObject* values[1] = {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 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 (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rename); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reverse_complement") < 0)) __PYX_ERR(0, 648, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_rename = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_rename == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 648, __pyx_L3_error) + } else { + __pyx_v_rename = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_reverse_complement", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 648, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.get_reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self), __pyx_v_rename); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self) { +static PyObject *__pyx_pf_5HTSeq_6_HTSeq_8Sequence_2get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *__pyx_v_self, int __pyx_v_rename) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement __pyx_t_2; __Pyx_RefNannySetupContext("get_reverse_complement", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.rename = __pyx_v_rename; + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->get_reverse_complement(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -16610,8 +16467,8 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":653 - * "revcomp_of_" + self.name) +/* "HTSeq/_HTSeq.pyx":658 + * self.name) * * def __str__(self): # <<<<<<<<<<<<<< * return self.seq.decode() @@ -16637,7 +16494,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__str__", 0); - /* "HTSeq/_HTSeq.pyx":654 + /* "HTSeq/_HTSeq.pyx":659 * * def __str__(self): * return self.seq.decode() # <<<<<<<<<<<<<< @@ -16647,16 +16504,16 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 654, __pyx_L1_error) + __PYX_ERR(0, 659, __pyx_L1_error) } - __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_self->seq, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error) + __pyx_t_1 = __Pyx_decode_bytes(__pyx_v_self->seq, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":653 - * "revcomp_of_" + self.name) + /* "HTSeq/_HTSeq.pyx":658 + * self.name) * * def __str__(self): # <<<<<<<<<<<<<< * return self.seq.decode() @@ -16674,7 +16531,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":656 +/* "HTSeq/_HTSeq.pyx":661 * return self.seq.decode() * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16706,7 +16563,7 @@ Py_ssize_t __pyx_t_6; __Pyx_RefNannySetupContext("__repr__", 0); - /* "HTSeq/_HTSeq.pyx":657 + /* "HTSeq/_HTSeq.pyx":662 * * def __repr__(self): * return "<%s object '%s' (length %d)>" % ( # <<<<<<<<<<<<<< @@ -16714,7 +16571,7 @@ * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -16723,19 +16580,19 @@ __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2); - /* "HTSeq/_HTSeq.pyx":658 + /* "HTSeq/_HTSeq.pyx":663 * def __repr__(self): * return "<%s object '%s' (length %d)>" % ( * self.__class__.__name__, self.name, len(self.seq)) # <<<<<<<<<<<<<< * * def __len__(self): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -16747,7 +16604,7 @@ __pyx_t_2 += 9; __Pyx_GIVEREF(__pyx_kp_u_object); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_object); - __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_v_self->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_v_self->name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); @@ -16762,36 +16619,36 @@ __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 658, __pyx_L1_error) + __PYX_ERR(0, 663, __pyx_L1_error) } - __pyx_t_6 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_6 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 658, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_From_Py_ssize_t(__pyx_t_6, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 663, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__26); + __Pyx_INCREF(__pyx_kp_u__25); __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__26); - PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__26); + __Pyx_GIVEREF(__pyx_kp_u__25); + PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u__25); - /* "HTSeq/_HTSeq.pyx":657 + /* "HTSeq/_HTSeq.pyx":662 * * def __repr__(self): * return "<%s object '%s' (length %d)>" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, self.name, len(self.seq)) * */ - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 657, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 662, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":656 + /* "HTSeq/_HTSeq.pyx":661 * return self.seq.decode() * * def __repr__(self): # <<<<<<<<<<<<<< @@ -16812,7 +16669,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":660 +/* "HTSeq/_HTSeq.pyx":665 * self.__class__.__name__, self.name, len(self.seq)) * * def __len__(self): # <<<<<<<<<<<<<< @@ -16840,7 +16697,7 @@ Py_ssize_t __pyx_t_2; __Pyx_RefNannySetupContext("__len__", 0); - /* "HTSeq/_HTSeq.pyx":661 + /* "HTSeq/_HTSeq.pyx":666 * * def __len__(self): * return len(self.seq) # <<<<<<<<<<<<<< @@ -16851,14 +16708,14 @@ __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, 661, __pyx_L1_error) + __PYX_ERR(0, 666, __pyx_L1_error) } - __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 661, __pyx_L1_error) + __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 666, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":660 + /* "HTSeq/_HTSeq.pyx":665 * self.__class__.__name__, self.name, len(self.seq)) * * def __len__(self): # <<<<<<<<<<<<<< @@ -16876,7 +16733,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":663 +/* "HTSeq/_HTSeq.pyx":668 * return len(self.seq) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -16906,7 +16763,7 @@ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "HTSeq/_HTSeq.pyx":664 + /* "HTSeq/_HTSeq.pyx":669 * * def __getitem__(self, item): * if self.name.endswith("[part]"): # <<<<<<<<<<<<<< @@ -16915,12 +16772,12 @@ */ if (unlikely(__pyx_v_self->name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "endswith"); - __PYX_ERR(0, 664, __pyx_L1_error) + __PYX_ERR(0, 669, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyUnicode_Tailmatch(__pyx_v_self->name, __pyx_kp_u_part, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 664, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Tailmatch(__pyx_v_self->name, __pyx_kp_u_part, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 669, __pyx_L1_error) if ((__pyx_t_1 != 0)) { - /* "HTSeq/_HTSeq.pyx":665 + /* "HTSeq/_HTSeq.pyx":670 * def __getitem__(self, item): * if self.name.endswith("[part]"): * new_name = self.name # <<<<<<<<<<<<<< @@ -16932,7 +16789,7 @@ __pyx_v_new_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":664 + /* "HTSeq/_HTSeq.pyx":669 * * def __getitem__(self, item): * if self.name.endswith("[part]"): # <<<<<<<<<<<<<< @@ -16942,7 +16799,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":667 + /* "HTSeq/_HTSeq.pyx":672 * new_name = self.name * else: * new_name = self.name + "[part]" # <<<<<<<<<<<<<< @@ -16950,14 +16807,14 @@ * */ /*else*/ { - __pyx_t_2 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_self->name, __pyx_kp_u_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_self->name, __pyx_kp_u_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_new_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":668 + /* "HTSeq/_HTSeq.pyx":673 * else: * new_name = self.name + "[part]" * return Sequence(self.seq[item], new_name) # <<<<<<<<<<<<<< @@ -16965,9 +16822,9 @@ * def __getstate__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->seq, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->seq, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 668, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -16975,14 +16832,14 @@ __Pyx_GIVEREF(__pyx_v_new_name); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_new_name); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 673, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":663 + /* "HTSeq/_HTSeq.pyx":668 * return len(self.seq) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -17003,7 +16860,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":670 +/* "HTSeq/_HTSeq.pyx":675 * return Sequence(self.seq[item], new_name) * * def __getstate__(self): # <<<<<<<<<<<<<< @@ -17030,7 +16887,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__getstate__", 0); - /* "HTSeq/_HTSeq.pyx":671 + /* "HTSeq/_HTSeq.pyx":676 * * def __getstate__(self): * return {'seq': self.seq, # <<<<<<<<<<<<<< @@ -17038,32 +16895,32 @@ * 'descr': self.descr} */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_seq, __pyx_v_self->seq) < 0) __PYX_ERR(0, 671, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_seq, __pyx_v_self->seq) < 0) __PYX_ERR(0, 676, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":672 + /* "HTSeq/_HTSeq.pyx":677 * def __getstate__(self): * return {'seq': self.seq, * 'name': self.name, # <<<<<<<<<<<<<< * 'descr': self.descr} * */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_name_2, __pyx_v_self->name) < 0) __PYX_ERR(0, 671, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_name_2, __pyx_v_self->name) < 0) __PYX_ERR(0, 676, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":673 + /* "HTSeq/_HTSeq.pyx":678 * return {'seq': self.seq, * 'name': self.name, * 'descr': self.descr} # <<<<<<<<<<<<<< * * def __setstate__(self, state): */ - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_descr, __pyx_v_self->descr) < 0) __PYX_ERR(0, 671, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_descr, __pyx_v_self->descr) < 0) __PYX_ERR(0, 676, __pyx_L1_error) __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":670 + /* "HTSeq/_HTSeq.pyx":675 * return Sequence(self.seq[item], new_name) * * def __getstate__(self): # <<<<<<<<<<<<<< @@ -17082,7 +16939,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":675 +/* "HTSeq/_HTSeq.pyx":680 * 'descr': self.descr} * * def __setstate__(self, state): # <<<<<<<<<<<<<< @@ -17109,55 +16966,55 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate__", 0); - /* "HTSeq/_HTSeq.pyx":676 + /* "HTSeq/_HTSeq.pyx":681 * * def __setstate__(self, state): * self.seq = state['seq'] # <<<<<<<<<<<<<< * self.name = state['name'] * self.descr = state['descr'] */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_seq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 676, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_1)->tp_name), 0))) __PYX_ERR(0, 681, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->seq); __Pyx_DECREF(__pyx_v_self->seq); __pyx_v_self->seq = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":677 + /* "HTSeq/_HTSeq.pyx":682 * def __setstate__(self, state): * self.seq = state['seq'] * self.name = state['name'] # <<<<<<<<<<<<<< * self.descr = state['descr'] * */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 677, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 682, __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, 677, __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, 682, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->name); __Pyx_DECREF(__pyx_v_self->name); __pyx_v_self->name = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":678 + /* "HTSeq/_HTSeq.pyx":683 * self.seq = state['seq'] * self.name = state['name'] * self.descr = state['descr'] # <<<<<<<<<<<<<< * * def __reduce__(self): */ - __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_descr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Dict_GetItem(__pyx_v_state, __pyx_n_u_descr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __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, 678, __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, 683, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->descr); __Pyx_DECREF(__pyx_v_self->descr); __pyx_v_self->descr = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":675 + /* "HTSeq/_HTSeq.pyx":680 * 'descr': self.descr} * * def __setstate__(self, state): # <<<<<<<<<<<<<< @@ -17178,7 +17035,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":680 +/* "HTSeq/_HTSeq.pyx":685 * self.descr = state['descr'] * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -17209,7 +17066,7 @@ PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__reduce__", 0); - /* "HTSeq/_HTSeq.pyx":681 + /* "HTSeq/_HTSeq.pyx":686 * * def __reduce__(self): * return (self.__class__, (self.seq, self.name), self.__getstate__()) # <<<<<<<<<<<<<< @@ -17217,9 +17074,9 @@ * def write_to_fasta_file(self, fasta_file, characters_per_line=70): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_v_self->seq); __Pyx_GIVEREF(__pyx_v_self->seq); @@ -17227,7 +17084,7 @@ __Pyx_INCREF(__pyx_v_self->name); __Pyx_GIVEREF(__pyx_v_self->name); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self->name); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_getstate); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { @@ -17239,15 +17096,12 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error) - } + __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, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 681, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -17262,7 +17116,7 @@ __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":680 + /* "HTSeq/_HTSeq.pyx":685 * self.descr = state['descr'] * * def __reduce__(self): # <<<<<<<<<<<<<< @@ -17285,7 +17139,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":683 +/* "HTSeq/_HTSeq.pyx":688 * return (self.__class__, (self.seq, self.name), self.__getstate__()) * * def write_to_fasta_file(self, fasta_file, characters_per_line=70): # <<<<<<<<<<<<<< @@ -17330,7 +17184,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_to_fasta_file") < 0)) __PYX_ERR(0, 683, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "write_to_fasta_file") < 0)) __PYX_ERR(0, 688, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -17346,7 +17200,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("write_to_fasta_file", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 683, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("write_to_fasta_file", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 688, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.write_to_fasta_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -17371,11 +17225,11 @@ Py_ssize_t __pyx_t_6; Py_UCS4 __pyx_t_7; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; + Py_ssize_t __pyx_t_9; Py_ssize_t __pyx_t_10; __Pyx_RefNannySetupContext("write_to_fasta_file", 0); - /* "HTSeq/_HTSeq.pyx":691 + /* "HTSeq/_HTSeq.pyx":696 * * """ * if self.descr is not None: # <<<<<<<<<<<<<< @@ -17386,16 +17240,16 @@ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":692 + /* "HTSeq/_HTSeq.pyx":697 * """ * if self.descr is not None: * fasta_file.write(">%s %s\n" % (self.name, self.descr)) # <<<<<<<<<<<<<< * else: * fasta_file.write(">%s\n" % self.name) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = 0; __pyx_t_7 = 127; @@ -17403,29 +17257,29 @@ __pyx_t_6 += 1; __Pyx_GIVEREF(__pyx_kp_u__17); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__17); - __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_self->name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_self->name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7; __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_8); __pyx_t_8 = 0; - __Pyx_INCREF(__pyx_kp_u__27); + __Pyx_INCREF(__pyx_kp_u__26); __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__27); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__27); - __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_self->descr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__26); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_u__26); + __pyx_t_8 = __Pyx_PyUnicode_Unicode(__pyx_v_self->descr); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) > __pyx_t_7) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_8) : __pyx_t_7; __pyx_t_6 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_8); __pyx_t_8 = 0; - __Pyx_INCREF(__pyx_kp_u__23); + __Pyx_INCREF(__pyx_kp_u__22); __pyx_t_6 += 1; - __Pyx_GIVEREF(__pyx_kp_u__23); - PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__23); - __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 692, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__22); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__22); + __pyx_t_8 = __Pyx_PyUnicode_Join(__pyx_t_5, 5, __pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -17438,45 +17292,15 @@ __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8); - __pyx_t_8 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 692, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + 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(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":691 + /* "HTSeq/_HTSeq.pyx":696 * * """ * if self.descr is not None: # <<<<<<<<<<<<<< @@ -17486,7 +17310,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":694 + /* "HTSeq/_HTSeq.pyx":699 * fasta_file.write(">%s %s\n" % (self.name, self.descr)) * else: * fasta_file.write(">%s\n" % self.name) # <<<<<<<<<<<<<< @@ -17494,140 +17318,80 @@ * if characters_per_line == 0: */ /*else*/ { - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 694, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 699, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = PyUnicode_Format(__pyx_kp_u_s, __pyx_v_self->name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = NULL; + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_s, __pyx_v_self->name); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 699, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_8)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_8); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_8) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_9}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_9}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_9); - __pyx_t_9 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_8) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_8); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 699, __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; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":696 + /* "HTSeq/_HTSeq.pyx":701 * fasta_file.write(">%s\n" % self.name) * * if characters_per_line == 0: # <<<<<<<<<<<<<< * fasta_file.write(self.seq.decode() + "\n") * else: */ - __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_characters_per_line, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_characters_per_line, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 696, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 701, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":697 + /* "HTSeq/_HTSeq.pyx":702 * * if characters_per_line == 0: * fasta_file.write(self.seq.decode() + "\n") # <<<<<<<<<<<<<< * else: * i = 0 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 697, __pyx_L1_error) + __PYX_ERR(0, 702, __pyx_L1_error) } - __pyx_t_5 = __Pyx_decode_bytes(__pyx_v_self->seq, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 697, __pyx_L1_error) + __pyx_t_8 = __Pyx_decode_bytes(__pyx_v_self->seq, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 702, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_5 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u__22); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 702, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_9 = __Pyx_PyUnicode_Concat(__pyx_t_5, __pyx_kp_u__23); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_9}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_9}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - { - __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_9); - __pyx_t_9 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 697, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - } - } + __pyx_t_3 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __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; - /* "HTSeq/_HTSeq.pyx":696 + /* "HTSeq/_HTSeq.pyx":701 * fasta_file.write(">%s\n" % self.name) * * if characters_per_line == 0: # <<<<<<<<<<<<<< @@ -17637,7 +17401,7 @@ goto __pyx_L4; } - /* "HTSeq/_HTSeq.pyx":699 + /* "HTSeq/_HTSeq.pyx":704 * fasta_file.write(self.seq.decode() + "\n") * else: * i = 0 # <<<<<<<<<<<<<< @@ -17648,7 +17412,7 @@ __Pyx_INCREF(__pyx_int_0); __pyx_v_i = __pyx_int_0; - /* "HTSeq/_HTSeq.pyx":700 + /* "HTSeq/_HTSeq.pyx":705 * else: * i = 0 * while i * characters_per_line < len(self.seq): # <<<<<<<<<<<<<< @@ -17656,36 +17420,36 @@ * self.seq[i * characters_per_line: (i + 1) * characters_per_line].decode() + "\n") */ while (1) { - __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_4 = __pyx_v_self->seq; __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 700, __pyx_L1_error) + __PYX_ERR(0, 705, __pyx_L1_error) } - __pyx_t_6 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_6 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_4 = PyInt_FromSsize_t(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_8 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 700, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, __pyx_t_4, Py_LT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 705, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 700, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 705, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (!__pyx_t_2) break; - /* "HTSeq/_HTSeq.pyx":701 + /* "HTSeq/_HTSeq.pyx":706 * i = 0 * while i * characters_per_line < len(self.seq): * fasta_file.write( # <<<<<<<<<<<<<< * self.seq[i * characters_per_line: (i + 1) * characters_per_line].decode() + "\n") * i += 1 */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 701, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fasta_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 706, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "HTSeq/_HTSeq.pyx":702 + /* "HTSeq/_HTSeq.pyx":707 * while i * characters_per_line < len(self.seq): * fasta_file.write( * self.seq[i * characters_per_line: (i + 1) * characters_per_line].decode() + "\n") # <<<<<<<<<<<<<< @@ -17694,88 +17458,70 @@ */ if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 702, __pyx_L1_error) + __PYX_ERR(0, 707, __pyx_L1_error) } - __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_v_i, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_6 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_3 == Py_None); + if (__pyx_t_2) { + __pyx_t_6 = 0; + } else { + __pyx_t_9 = __Pyx_PyIndex_AsSsize_t(__pyx_t_3); if (unlikely((__pyx_t_9 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error) + __pyx_t_6 = __pyx_t_9; + } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_9 = PyNumber_Multiply(__pyx_t_3, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 702, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = PyNumber_Multiply(__pyx_t_3, __pyx_v_characters_per_line); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_9); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 702, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_decode_bytes(__pyx_v_self->seq, __pyx_t_6, __pyx_t_10, NULL, NULL, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 702, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_9, __pyx_kp_u__23); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 702, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_8 == Py_None); + if (__pyx_t_2) { + __pyx_t_9 = PY_SSIZE_T_MAX; + } else { + __pyx_t_10 = __Pyx_PyIndex_AsSsize_t(__pyx_t_8); if (unlikely((__pyx_t_10 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 707, __pyx_L1_error) + __pyx_t_9 = __pyx_t_10; + } + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_decode_bytes(__pyx_v_self->seq, __pyx_t_6, __pyx_t_9, NULL, NULL, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 707, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_3 = __Pyx_PyUnicode_Concat(__pyx_t_8, __pyx_kp_u__22); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 707, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_9)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_4, function); } } - if (!__pyx_t_9) { - __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_GOTREF(__pyx_t_8); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_3}; - __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_3}; - __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 701, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } - } + __pyx_t_5 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_8, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 706, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":703 + /* "HTSeq/_HTSeq.pyx":708 * fasta_file.write( * self.seq[i * characters_per_line: (i + 1) * characters_per_line].decode() + "\n") * i += 1 # <<<<<<<<<<<<<< * * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_): */ - __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 703, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_8); - __pyx_t_8 = 0; + __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 708, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_5); + __pyx_t_5 = 0; } } __pyx_L4:; - /* "HTSeq/_HTSeq.pyx":683 + /* "HTSeq/_HTSeq.pyx":688 * return (self.__class__, (self.seq, self.name), self.__getstate__()) * * def write_to_fasta_file(self, fasta_file, characters_per_line=70): # <<<<<<<<<<<<<< @@ -17791,7 +17537,6 @@ __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.write_to_fasta_file", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -17801,7 +17546,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":705 +/* "HTSeq/_HTSeq.pyx":710 * i += 1 * * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_): # <<<<<<<<<<<<<< @@ -17824,16 +17569,16 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; - Py_ssize_t __pyx_t_6; - int __pyx_t_7; - char *__pyx_t_8; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; + char *__pyx_t_7; + int __pyx_t_8; int __pyx_t_9; - int __pyx_t_10; - npy_intp __pyx_t_11; + npy_intp __pyx_t_10; + Py_ssize_t __pyx_t_11; Py_ssize_t __pyx_t_12; - Py_ssize_t __pyx_t_13; - int __pyx_t_14; + int __pyx_t_13; + Py_ssize_t __pyx_t_14; Py_ssize_t __pyx_t_15; Py_ssize_t __pyx_t_16; Py_ssize_t __pyx_t_17; @@ -17841,7 +17586,6 @@ Py_ssize_t __pyx_t_19; Py_ssize_t __pyx_t_20; Py_ssize_t __pyx_t_21; - Py_ssize_t __pyx_t_22; __Pyx_RefNannySetupContext("add_bases_to_count_array", 0); __pyx_pybuffer_count_array.pybuffer.buf = NULL; __pyx_pybuffer_count_array.refcount = 0; @@ -17850,64 +17594,52 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_bases_to_count_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_21add_bases_to_count_array)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_bases_to_count_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_21add_bases_to_count_array)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_count_array_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_count_array_)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_count_array_)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_count_array_)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_count_array_)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 705, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_count_array_)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_count_array_)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_count_array_)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":707 + /* "HTSeq/_HTSeq.pyx":712 * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_): * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ # <<<<<<<<<<<<<< @@ -17918,14 +17650,14 @@ __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_count_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_count_array_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_count_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 707, __pyx_L1_error) + __PYX_ERR(0, 712, __pyx_L1_error) } else {__pyx_pybuffernd_count_array.diminfo[0].strides = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_count_array.diminfo[0].shape = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_count_array.diminfo[1].strides = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_count_array.diminfo[1].shape = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.shape[1]; } } __Pyx_INCREF(((PyObject *)__pyx_v_count_array_)); __pyx_v_count_array = ((PyArrayObject *)__pyx_v_count_array_); - /* "HTSeq/_HTSeq.pyx":708 + /* "HTSeq/_HTSeq.pyx":713 * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ * cdef int seq_length = len(self.seq) # <<<<<<<<<<<<<< @@ -17936,23 +17668,23 @@ __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, 708, __pyx_L1_error) + __PYX_ERR(0, 713, __pyx_L1_error) } - __pyx_t_6 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 708, __pyx_L1_error) + __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 713, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_v_seq_length = __pyx_t_6; + __pyx_v_seq_length = __pyx_t_5; - /* "HTSeq/_HTSeq.pyx":710 + /* "HTSeq/_HTSeq.pyx":715 * cdef int seq_length = len(self.seq) * * if numpy.PyArray_DIMS(count_array)[0] < seq_length: # <<<<<<<<<<<<<< * raise ValueError, "'count_array' too small for sequence." * if numpy.PyArray_DIMS(count_array)[1] < 5: */ - __pyx_t_7 = (((PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[0]) < __pyx_v_seq_length) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = (((PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[0]) < __pyx_v_seq_length) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":711 + /* "HTSeq/_HTSeq.pyx":716 * * if numpy.PyArray_DIMS(count_array)[0] < seq_length: * raise ValueError, "'count_array' too small for sequence." # <<<<<<<<<<<<<< @@ -17960,9 +17692,9 @@ * raise ValueError, "'count_array' has too few columns." */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_count_array_too_small_for_seque, 0, 0); - __PYX_ERR(0, 711, __pyx_L1_error) + __PYX_ERR(0, 716, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":710 + /* "HTSeq/_HTSeq.pyx":715 * cdef int seq_length = len(self.seq) * * if numpy.PyArray_DIMS(count_array)[0] < seq_length: # <<<<<<<<<<<<<< @@ -17971,17 +17703,17 @@ */ } - /* "HTSeq/_HTSeq.pyx":712 + /* "HTSeq/_HTSeq.pyx":717 * if numpy.PyArray_DIMS(count_array)[0] < seq_length: * raise ValueError, "'count_array' too small for sequence." * if numpy.PyArray_DIMS(count_array)[1] < 5: # <<<<<<<<<<<<<< * raise ValueError, "'count_array' has too few columns." * */ - __pyx_t_7 = (((PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[1]) < 5) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = (((PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[1]) < 5) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":713 + /* "HTSeq/_HTSeq.pyx":718 * raise ValueError, "'count_array' too small for sequence." * if numpy.PyArray_DIMS(count_array)[1] < 5: * raise ValueError, "'count_array' has too few columns." # <<<<<<<<<<<<<< @@ -17989,9 +17721,9 @@ * cdef numpy.npy_intp i */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_count_array_has_too_few_columns, 0, 0); - __PYX_ERR(0, 713, __pyx_L1_error) + __PYX_ERR(0, 718, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":712 + /* "HTSeq/_HTSeq.pyx":717 * if numpy.PyArray_DIMS(count_array)[0] < seq_length: * raise ValueError, "'count_array' too small for sequence." * if numpy.PyArray_DIMS(count_array)[1] < 5: # <<<<<<<<<<<<<< @@ -18000,7 +17732,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":717 + /* "HTSeq/_HTSeq.pyx":722 * cdef numpy.npy_intp i * cdef char b * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -18009,24 +17741,24 @@ */ if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 717, __pyx_L1_error) + __PYX_ERR(0, 722, __pyx_L1_error) } - __pyx_t_8 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_8) && PyErr_Occurred())) __PYX_ERR(0, 717, __pyx_L1_error) - __pyx_v_seq_cstr = __pyx_t_8; + __pyx_t_7 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_7) && PyErr_Occurred())) __PYX_ERR(0, 722, __pyx_L1_error) + __pyx_v_seq_cstr = __pyx_t_7; - /* "HTSeq/_HTSeq.pyx":718 + /* "HTSeq/_HTSeq.pyx":723 * cdef char b * cdef char * seq_cstr = self.seq * for i in range(seq_length): # <<<<<<<<<<<<<< * b = seq_cstr[i] * if b in [b'A', b'a']: */ - __pyx_t_9 = __pyx_v_seq_length; - __pyx_t_10 = __pyx_t_9; - for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_10; __pyx_t_11+=1) { - __pyx_v_i = __pyx_t_11; + __pyx_t_8 = __pyx_v_seq_length; + __pyx_t_9 = __pyx_t_8; + for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { + __pyx_v_i = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":719 + /* "HTSeq/_HTSeq.pyx":724 * cdef char * seq_cstr = self.seq * for i in range(seq_length): * b = seq_cstr[i] # <<<<<<<<<<<<<< @@ -18035,7 +17767,7 @@ */ __pyx_v_b = (__pyx_v_seq_cstr[__pyx_v_i]); - /* "HTSeq/_HTSeq.pyx":720 + /* "HTSeq/_HTSeq.pyx":725 * for i in range(seq_length): * b = seq_cstr[i] * if b in [b'A', b'a']: # <<<<<<<<<<<<<< @@ -18046,31 +17778,31 @@ case 'A': case 'a': - /* "HTSeq/_HTSeq.pyx":721 + /* "HTSeq/_HTSeq.pyx":726 * b = seq_cstr[i] * if b in [b'A', b'a']: * count_array[i, 0] += 1 # <<<<<<<<<<<<<< * elif b in [b'C', b'c']: * count_array[i, 1] += 1 */ - __pyx_t_12 = __pyx_v_i; - __pyx_t_13 = 0; - __pyx_t_14 = -1; + __pyx_t_11 = __pyx_v_i; + __pyx_t_12 = 0; + __pyx_t_13 = -1; + if (__pyx_t_11 < 0) { + __pyx_t_11 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_11 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_12 < 0) { - __pyx_t_12 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_12 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_13 < 0) { - __pyx_t_13 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_13 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 721, __pyx_L1_error) + __pyx_t_12 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 726, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_12, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":720 + /* "HTSeq/_HTSeq.pyx":725 * for i in range(seq_length): * b = seq_cstr[i] * if b in [b'A', b'a']: # <<<<<<<<<<<<<< @@ -18078,42 +17810,42 @@ * elif b in [b'C', b'c']: */ break; + case 'C': - /* "HTSeq/_HTSeq.pyx":722 + /* "HTSeq/_HTSeq.pyx":727 * if b in [b'A', b'a']: * count_array[i, 0] += 1 * elif b in [b'C', b'c']: # <<<<<<<<<<<<<< * count_array[i, 1] += 1 * elif b in [b'G', b'g']: */ - case 'C': case 'c': - /* "HTSeq/_HTSeq.pyx":723 + /* "HTSeq/_HTSeq.pyx":728 * count_array[i, 0] += 1 * elif b in [b'C', b'c']: * count_array[i, 1] += 1 # <<<<<<<<<<<<<< * elif b in [b'G', b'g']: * count_array[i, 2] += 1 */ - __pyx_t_15 = __pyx_v_i; - __pyx_t_16 = 1; - __pyx_t_14 = -1; + __pyx_t_14 = __pyx_v_i; + __pyx_t_15 = 1; + __pyx_t_13 = -1; + if (__pyx_t_14 < 0) { + __pyx_t_14 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_14 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_15 < 0) { - __pyx_t_15 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_15 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_16 < 0) { - __pyx_t_16 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_16 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_t_15 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_15 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 728, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_16, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_14, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_15, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":722 + /* "HTSeq/_HTSeq.pyx":727 * if b in [b'A', b'a']: * count_array[i, 0] += 1 * elif b in [b'C', b'c']: # <<<<<<<<<<<<<< @@ -18121,42 +17853,42 @@ * elif b in [b'G', b'g']: */ break; + case 'G': - /* "HTSeq/_HTSeq.pyx":724 + /* "HTSeq/_HTSeq.pyx":729 * elif b in [b'C', b'c']: * count_array[i, 1] += 1 * elif b in [b'G', b'g']: # <<<<<<<<<<<<<< * count_array[i, 2] += 1 * elif b in [b'T', b't']: */ - case 'G': case 'g': - /* "HTSeq/_HTSeq.pyx":725 + /* "HTSeq/_HTSeq.pyx":730 * count_array[i, 1] += 1 * elif b in [b'G', b'g']: * count_array[i, 2] += 1 # <<<<<<<<<<<<<< * elif b in [b'T', b't']: * count_array[i, 3] += 1 */ - __pyx_t_17 = __pyx_v_i; - __pyx_t_18 = 2; - __pyx_t_14 = -1; + __pyx_t_16 = __pyx_v_i; + __pyx_t_17 = 2; + __pyx_t_13 = -1; + if (__pyx_t_16 < 0) { + __pyx_t_16 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_16 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_16 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_17 < 0) { - __pyx_t_17 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_17 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_18 < 0) { - __pyx_t_18 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_18 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 725, __pyx_L1_error) + __pyx_t_17 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_17 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 730, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_18, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_16, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_17, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":724 + /* "HTSeq/_HTSeq.pyx":729 * elif b in [b'C', b'c']: * count_array[i, 1] += 1 * elif b in [b'G', b'g']: # <<<<<<<<<<<<<< @@ -18164,42 +17896,42 @@ * elif b in [b'T', b't']: */ break; + case 'T': - /* "HTSeq/_HTSeq.pyx":726 + /* "HTSeq/_HTSeq.pyx":731 * elif b in [b'G', b'g']: * count_array[i, 2] += 1 * elif b in [b'T', b't']: # <<<<<<<<<<<<<< * count_array[i, 3] += 1 * elif b in [b'N', b'n', b'.']: */ - case 'T': case 't': - /* "HTSeq/_HTSeq.pyx":727 + /* "HTSeq/_HTSeq.pyx":732 * count_array[i, 2] += 1 * elif b in [b'T', b't']: * count_array[i, 3] += 1 # <<<<<<<<<<<<<< * elif b in [b'N', b'n', b'.']: * count_array[i, 4] += 1 */ - __pyx_t_19 = __pyx_v_i; - __pyx_t_20 = 3; - __pyx_t_14 = -1; + __pyx_t_18 = __pyx_v_i; + __pyx_t_19 = 3; + __pyx_t_13 = -1; + if (__pyx_t_18 < 0) { + __pyx_t_18 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_18 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_18 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_19 < 0) { - __pyx_t_19 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_19 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_20 < 0) { - __pyx_t_20 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_20 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 727, __pyx_L1_error) + __pyx_t_19 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_19 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 732, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_20, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_18, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_19, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":726 + /* "HTSeq/_HTSeq.pyx":731 * elif b in [b'G', b'g']: * count_array[i, 2] += 1 * elif b in [b'T', b't']: # <<<<<<<<<<<<<< @@ -18207,43 +17939,43 @@ * elif b in [b'N', b'n', b'.']: */ break; + case 'N': - /* "HTSeq/_HTSeq.pyx":728 + /* "HTSeq/_HTSeq.pyx":733 * elif b in [b'T', b't']: * count_array[i, 3] += 1 * elif b in [b'N', b'n', b'.']: # <<<<<<<<<<<<<< * count_array[i, 4] += 1 * else: */ - case 'N': case 'n': case '.': - /* "HTSeq/_HTSeq.pyx":729 + /* "HTSeq/_HTSeq.pyx":734 * count_array[i, 3] += 1 * elif b in [b'N', b'n', b'.']: * count_array[i, 4] += 1 # <<<<<<<<<<<<<< * else: * raise ValueError, "Illegal base letter encountered." */ - __pyx_t_21 = __pyx_v_i; - __pyx_t_22 = 4; - __pyx_t_14 = -1; + __pyx_t_20 = __pyx_v_i; + __pyx_t_21 = 4; + __pyx_t_13 = -1; + if (__pyx_t_20 < 0) { + __pyx_t_20 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_20 < 0)) __pyx_t_13 = 0; + } else if (unlikely(__pyx_t_20 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_13 = 0; if (__pyx_t_21 < 0) { - __pyx_t_21 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_21 < 0)) __pyx_t_14 = 0; - } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_14 = 0; - if (__pyx_t_22 < 0) { - __pyx_t_22 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_22 < 0)) __pyx_t_14 = 1; - } else if (unlikely(__pyx_t_22 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_14 = 1; - if (unlikely(__pyx_t_14 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 729, __pyx_L1_error) + __pyx_t_21 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_21 < 0)) __pyx_t_13 = 1; + } else if (unlikely(__pyx_t_21 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_13 = 1; + if (unlikely(__pyx_t_13 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_13); + __PYX_ERR(0, 734, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_21, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_22, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_20, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_21, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; - /* "HTSeq/_HTSeq.pyx":728 + /* "HTSeq/_HTSeq.pyx":733 * elif b in [b'T', b't']: * count_array[i, 3] += 1 * elif b in [b'N', b'n', b'.']: # <<<<<<<<<<<<<< @@ -18253,7 +17985,7 @@ break; default: - /* "HTSeq/_HTSeq.pyx":731 + /* "HTSeq/_HTSeq.pyx":736 * count_array[i, 4] += 1 * else: * raise ValueError, "Illegal base letter encountered." # <<<<<<<<<<<<<< @@ -18261,12 +17993,12 @@ * return None */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Illegal_base_letter_encountered, 0, 0); - __PYX_ERR(0, 731, __pyx_L1_error) + __PYX_ERR(0, 736, __pyx_L1_error) break; } } - /* "HTSeq/_HTSeq.pyx":733 + /* "HTSeq/_HTSeq.pyx":738 * raise ValueError, "Illegal base letter encountered." * * return None # <<<<<<<<<<<<<< @@ -18277,7 +18009,7 @@ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":705 + /* "HTSeq/_HTSeq.pyx":710 * i += 1 * * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_): # <<<<<<<<<<<<<< @@ -18291,7 +18023,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -18316,7 +18047,7 @@ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_bases_to_count_array (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_count_array_), __pyx_ptype_5numpy_ndarray, 1, "count_array_", 0))) __PYX_ERR(0, 705, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_count_array_), __pyx_ptype_5numpy_ndarray, 1, "count_array_", 0))) __PYX_ERR(0, 710, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_20add_bases_to_count_array(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self), ((PyArrayObject *)__pyx_v_count_array_)); /* function exit code */ @@ -18334,7 +18065,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("add_bases_to_count_array", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_8Sequence_add_bases_to_count_array(__pyx_v_self, __pyx_v_count_array_, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_8Sequence_add_bases_to_count_array(__pyx_v_self, __pyx_v_count_array_, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18351,7 +18082,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":735 +/* "HTSeq/_HTSeq.pyx":740 * return None * * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=0.): # <<<<<<<<<<<<<< @@ -18397,71 +18128,87 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_left_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_23trim_left_end)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mismatch_prop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 735, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 735, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 735, __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 + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 735, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_left_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_23trim_left_end)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mismatch_prop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 740, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } } - __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); - __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, 735, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 740, __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 + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 740, __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, 740, __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; + } + __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); + __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, 740, __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_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 740, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 735, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":736 + /* "HTSeq/_HTSeq.pyx":741 * * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=0.): * cdef int seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -18472,13 +18219,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, 736, __pyx_L1_error) + __PYX_ERR(0, 741, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 736, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 741, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seqlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":737 + /* "HTSeq/_HTSeq.pyx":742 * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=0.): * cdef int seqlen = len(self.seq) * cdef int patlen = len(pattern.seq) # <<<<<<<<<<<<<< @@ -18489,13 +18236,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, 737, __pyx_L1_error) + __PYX_ERR(0, 742, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 737, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 742, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_patlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":739 + /* "HTSeq/_HTSeq.pyx":744 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -18505,7 +18252,7 @@ __pyx_t_9 = ((__pyx_v_seqlen < __pyx_v_patlen) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":740 + /* "HTSeq/_HTSeq.pyx":745 * cdef int minlen * if seqlen < patlen: * minlen = seqlen # <<<<<<<<<<<<<< @@ -18514,7 +18261,7 @@ */ __pyx_v_minlen = __pyx_v_seqlen; - /* "HTSeq/_HTSeq.pyx":739 + /* "HTSeq/_HTSeq.pyx":744 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -18524,7 +18271,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":742 + /* "HTSeq/_HTSeq.pyx":747 * minlen = seqlen * else: * minlen = patlen # <<<<<<<<<<<<<< @@ -18536,7 +18283,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":743 + /* "HTSeq/_HTSeq.pyx":748 * else: * minlen = patlen * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -18545,12 +18292,12 @@ */ if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 743, __pyx_L1_error) + __PYX_ERR(0, 748, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 743, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 748, __pyx_L1_error) __pyx_v_seq_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":744 + /* "HTSeq/_HTSeq.pyx":749 * minlen = patlen * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq # <<<<<<<<<<<<<< @@ -18559,12 +18306,12 @@ */ if (unlikely(__pyx_v_pattern->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 744, __pyx_L1_error) + __PYX_ERR(0, 749, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 744, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 749, __pyx_L1_error) __pyx_v_pat_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":745 + /* "HTSeq/_HTSeq.pyx":750 * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq * cdef int match = 0 # <<<<<<<<<<<<<< @@ -18573,7 +18320,7 @@ */ __pyx_v_match = 0; - /* "HTSeq/_HTSeq.pyx":748 + /* "HTSeq/_HTSeq.pyx":753 * cdef int i, j * cdef int num_mismatches * for i in range(1, minlen + 1): # <<<<<<<<<<<<<< @@ -18585,7 +18332,7 @@ for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "HTSeq/_HTSeq.pyx":749 + /* "HTSeq/_HTSeq.pyx":754 * cdef int num_mismatches * for i in range(1, minlen + 1): * num_mismatches = 0 # <<<<<<<<<<<<<< @@ -18594,7 +18341,7 @@ */ __pyx_v_num_mismatches = 0; - /* "HTSeq/_HTSeq.pyx":750 + /* "HTSeq/_HTSeq.pyx":755 * for i in range(1, minlen + 1): * num_mismatches = 0 * for j in range(i): # <<<<<<<<<<<<<< @@ -18606,7 +18353,7 @@ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; - /* "HTSeq/_HTSeq.pyx":751 + /* "HTSeq/_HTSeq.pyx":756 * num_mismatches = 0 * for j in range(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: # <<<<<<<<<<<<<< @@ -18616,7 +18363,7 @@ __pyx_t_9 = (((__pyx_v_seq_cstr[__pyx_v_j]) != (__pyx_v_pat_cstr[((__pyx_v_patlen - __pyx_v_i) + __pyx_v_j)])) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":752 + /* "HTSeq/_HTSeq.pyx":757 * for j in range(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: * num_mismatches += 1 # <<<<<<<<<<<<<< @@ -18625,7 +18372,7 @@ */ __pyx_v_num_mismatches = (__pyx_v_num_mismatches + 1); - /* "HTSeq/_HTSeq.pyx":753 + /* "HTSeq/_HTSeq.pyx":758 * if seq_cstr[j] != pat_cstr[patlen - i + j]: * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: # <<<<<<<<<<<<<< @@ -18635,7 +18382,7 @@ __pyx_t_9 = ((__pyx_v_num_mismatches > (__pyx_v_mismatch_prop * __pyx_v_i)) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":754 + /* "HTSeq/_HTSeq.pyx":759 * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: * break # <<<<<<<<<<<<<< @@ -18644,7 +18391,7 @@ */ goto __pyx_L7_break; - /* "HTSeq/_HTSeq.pyx":753 + /* "HTSeq/_HTSeq.pyx":758 * if seq_cstr[j] != pat_cstr[patlen - i + j]: * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: # <<<<<<<<<<<<<< @@ -18653,7 +18400,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":751 + /* "HTSeq/_HTSeq.pyx":756 * num_mismatches = 0 * for j in range(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: # <<<<<<<<<<<<<< @@ -18664,7 +18411,7 @@ } /*else*/ { - /* "HTSeq/_HTSeq.pyx":756 + /* "HTSeq/_HTSeq.pyx":761 * break * else: * match = i # <<<<<<<<<<<<<< @@ -18676,7 +18423,7 @@ __pyx_L7_break:; } - /* "HTSeq/_HTSeq.pyx":757 + /* "HTSeq/_HTSeq.pyx":762 * else: * match = i * return self[match: seqlen] # <<<<<<<<<<<<<< @@ -18684,14 +18431,14 @@ * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), __pyx_v_match, __pyx_v_seqlen, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 757, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), __pyx_v_match, __pyx_v_seqlen, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 762, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 757, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 762, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":735 + /* "HTSeq/_HTSeq.pyx":740 * return None * * cpdef Sequence trim_left_end(Sequence self, Sequence pattern, float mismatch_prop=0.): # <<<<<<<<<<<<<< @@ -18750,7 +18497,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_left_end") < 0)) __PYX_ERR(0, 735, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_left_end") < 0)) __PYX_ERR(0, 740, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -18763,20 +18510,20 @@ } __pyx_v_pattern = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)values[0]); if (values[1]) { - __pyx_v_mismatch_prop = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_mismatch_prop == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 735, __pyx_L3_error) + __pyx_v_mismatch_prop = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_mismatch_prop == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 740, __pyx_L3_error) } else { __pyx_v_mismatch_prop = ((float)0.); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trim_left_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 735, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trim_left_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 740, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.trim_left_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 735, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 740, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_22trim_left_end(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self), __pyx_v_pattern, __pyx_v_mismatch_prop); /* function exit code */ @@ -18797,7 +18544,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.mismatch_prop = __pyx_v_mismatch_prop; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->trim_left_end(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->trim_left_end(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -18814,7 +18561,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":759 +/* "HTSeq/_HTSeq.pyx":764 * return self[match: seqlen] * * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): # <<<<<<<<<<<<<< @@ -18860,71 +18607,87 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_right_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_25trim_right_end)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mismatch_prop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 759, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 759, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 759, __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 + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 759, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_right_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_25trim_right_end)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = PyFloat_FromDouble(__pyx_v_mismatch_prop); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 764, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } } - __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); - __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, 759, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 764, __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 + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 764, __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, 764, __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; + } + __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); + __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, 764, __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_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 764, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 759, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":760 + /* "HTSeq/_HTSeq.pyx":765 * * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): * cdef int seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -18935,13 +18698,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, 760, __pyx_L1_error) + __PYX_ERR(0, 765, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 760, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 765, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seqlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":761 + /* "HTSeq/_HTSeq.pyx":766 * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): * cdef int seqlen = len(self.seq) * cdef int patlen = len(pattern.seq) # <<<<<<<<<<<<<< @@ -18952,13 +18715,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, 761, __pyx_L1_error) + __PYX_ERR(0, 766, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 761, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 766, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_patlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":763 + /* "HTSeq/_HTSeq.pyx":768 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -18968,7 +18731,7 @@ __pyx_t_9 = ((__pyx_v_seqlen < __pyx_v_patlen) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":764 + /* "HTSeq/_HTSeq.pyx":769 * cdef int minlen * if seqlen < patlen: * minlen = seqlen # <<<<<<<<<<<<<< @@ -18977,7 +18740,7 @@ */ __pyx_v_minlen = __pyx_v_seqlen; - /* "HTSeq/_HTSeq.pyx":763 + /* "HTSeq/_HTSeq.pyx":768 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -18987,7 +18750,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":766 + /* "HTSeq/_HTSeq.pyx":771 * minlen = seqlen * else: * minlen = patlen # <<<<<<<<<<<<<< @@ -18999,7 +18762,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":767 + /* "HTSeq/_HTSeq.pyx":772 * else: * minlen = patlen * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -19008,12 +18771,12 @@ */ if (unlikely(__pyx_v_self->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 767, __pyx_L1_error) + __PYX_ERR(0, 772, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 767, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 772, __pyx_L1_error) __pyx_v_seq_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":768 + /* "HTSeq/_HTSeq.pyx":773 * minlen = patlen * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq # <<<<<<<<<<<<<< @@ -19022,12 +18785,12 @@ */ if (unlikely(__pyx_v_pattern->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 768, __pyx_L1_error) + __PYX_ERR(0, 773, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 768, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 773, __pyx_L1_error) __pyx_v_pat_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":769 + /* "HTSeq/_HTSeq.pyx":774 * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq * cdef int match = 0 # <<<<<<<<<<<<<< @@ -19036,7 +18799,7 @@ */ __pyx_v_match = 0; - /* "HTSeq/_HTSeq.pyx":772 + /* "HTSeq/_HTSeq.pyx":777 * cdef int i, j * cdef int num_mismatches * for i in range(1, minlen + 1): # <<<<<<<<<<<<<< @@ -19048,7 +18811,7 @@ for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_12; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "HTSeq/_HTSeq.pyx":773 + /* "HTSeq/_HTSeq.pyx":778 * cdef int num_mismatches * for i in range(1, minlen + 1): * num_mismatches = 0 # <<<<<<<<<<<<<< @@ -19057,7 +18820,7 @@ */ __pyx_v_num_mismatches = 0; - /* "HTSeq/_HTSeq.pyx":774 + /* "HTSeq/_HTSeq.pyx":779 * for i in range(1, minlen + 1): * num_mismatches = 0 * for j in range(i): # <<<<<<<<<<<<<< @@ -19069,7 +18832,7 @@ for (__pyx_t_15 = 0; __pyx_t_15 < __pyx_t_14; __pyx_t_15+=1) { __pyx_v_j = __pyx_t_15; - /* "HTSeq/_HTSeq.pyx":775 + /* "HTSeq/_HTSeq.pyx":780 * num_mismatches = 0 * for j in range(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: # <<<<<<<<<<<<<< @@ -19079,7 +18842,7 @@ __pyx_t_9 = (((__pyx_v_seq_cstr[((__pyx_v_seqlen - __pyx_v_i) + __pyx_v_j)]) != (__pyx_v_pat_cstr[__pyx_v_j])) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":776 + /* "HTSeq/_HTSeq.pyx":781 * for j in range(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * num_mismatches += 1 # <<<<<<<<<<<<<< @@ -19088,7 +18851,7 @@ */ __pyx_v_num_mismatches = (__pyx_v_num_mismatches + 1); - /* "HTSeq/_HTSeq.pyx":777 + /* "HTSeq/_HTSeq.pyx":782 * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: # <<<<<<<<<<<<<< @@ -19098,7 +18861,7 @@ __pyx_t_9 = ((__pyx_v_num_mismatches > (__pyx_v_mismatch_prop * __pyx_v_i)) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":778 + /* "HTSeq/_HTSeq.pyx":783 * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: * break # <<<<<<<<<<<<<< @@ -19107,7 +18870,7 @@ */ goto __pyx_L7_break; - /* "HTSeq/_HTSeq.pyx":777 + /* "HTSeq/_HTSeq.pyx":782 * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * num_mismatches += 1 * if num_mismatches > mismatch_prop * i: # <<<<<<<<<<<<<< @@ -19116,7 +18879,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":775 + /* "HTSeq/_HTSeq.pyx":780 * num_mismatches = 0 * for j in range(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: # <<<<<<<<<<<<<< @@ -19127,7 +18890,7 @@ } /*else*/ { - /* "HTSeq/_HTSeq.pyx":780 + /* "HTSeq/_HTSeq.pyx":785 * break * else: * match = i # <<<<<<<<<<<<<< @@ -19139,7 +18902,7 @@ __pyx_L7_break:; } - /* "HTSeq/_HTSeq.pyx":781 + /* "HTSeq/_HTSeq.pyx":786 * else: * match = i * return self[0: seqlen - match] # <<<<<<<<<<<<<< @@ -19147,14 +18910,14 @@ * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), 0, (__pyx_v_seqlen - __pyx_v_match), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), 0, (__pyx_v_seqlen - __pyx_v_match), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 786, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 781, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_Sequence))))) __PYX_ERR(0, 786, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":759 + /* "HTSeq/_HTSeq.pyx":764 * return self[match: seqlen] * * cpdef Sequence trim_right_end(Sequence self, Sequence pattern, float mismatch_prop=0.): # <<<<<<<<<<<<<< @@ -19213,7 +18976,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_right_end") < 0)) __PYX_ERR(0, 759, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_right_end") < 0)) __PYX_ERR(0, 764, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -19226,20 +18989,20 @@ } __pyx_v_pattern = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)values[0]); if (values[1]) { - __pyx_v_mismatch_prop = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_mismatch_prop == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 759, __pyx_L3_error) + __pyx_v_mismatch_prop = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_mismatch_prop == (float)-1) && PyErr_Occurred())) __PYX_ERR(0, 764, __pyx_L3_error) } else { __pyx_v_mismatch_prop = ((float)0.); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trim_right_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 759, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trim_right_end", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 764, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.Sequence.trim_right_end", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 759, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 764, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_8Sequence_24trim_right_end(((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)__pyx_v_self), __pyx_v_pattern, __pyx_v_mismatch_prop); /* function exit code */ @@ -19260,7 +19023,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.mismatch_prop = __pyx_v_mismatch_prop; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->trim_right_end(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 759, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence->trim_right_end(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 764, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -19279,7 +19042,7 @@ /* "HTSeq/_HTSeq.pxd":20 * - * cdef class Sequence( object ): + * cdef class Sequence(object): * cdef public bytes seq # <<<<<<<<<<<<<< * cdef public str name * cdef public str descr @@ -19383,11 +19146,11 @@ } /* "HTSeq/_HTSeq.pxd":21 - * cdef class Sequence( object ): + * cdef class Sequence(object): * cdef public bytes seq * cdef public str name # <<<<<<<<<<<<<< * cdef public str descr - * cpdef Sequence get_reverse_complement( self ) + * cpdef Sequence get_reverse_complement(self, bint rename=?) */ /* Python wrapper */ @@ -19491,8 +19254,8 @@ * cdef public bytes seq * cdef public str name * cdef public str descr # <<<<<<<<<<<<<< - * cpdef Sequence get_reverse_complement( self ) - * cpdef object add_bases_to_count_array( Sequence self, numpy.ndarray count_array_ ) + * cpdef Sequence get_reverse_complement(self, bint rename=?) + * cpdef object add_bases_to_count_array(Sequence self, numpy.ndarray count_array_) */ /* Python wrapper */ @@ -19592,7 +19355,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":790 +/* "HTSeq/_HTSeq.pyx":795 * """ * * def __init__(self, bytes seq, str name, bytes qualstr, str qualscale="phred"): # <<<<<<<<<<<<<< @@ -19642,13 +19405,13 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_name_2)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 790, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 1); __PYX_ERR(0, 795, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qualstr)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 790, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, 2); __PYX_ERR(0, 795, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: @@ -19658,7 +19421,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 790, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 795, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -19678,16 +19441,16 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 790, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 3, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 795, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seq), (&PyBytes_Type), 1, "seq", 1))) __PYX_ERR(0, 790, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 790, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualstr), (&PyBytes_Type), 1, "qualstr", 1))) __PYX_ERR(0, 790, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualscale), (&PyUnicode_Type), 1, "qualscale", 1))) __PYX_ERR(0, 790, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_seq), (&PyBytes_Type), 1, "seq", 1))) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_name), (&PyUnicode_Type), 1, "name", 1))) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualstr), (&PyBytes_Type), 1, "qualstr", 1))) __PYX_ERR(0, 795, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_qualscale), (&PyUnicode_Type), 1, "qualscale", 1))) __PYX_ERR(0, 795, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities___init__(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), __pyx_v_seq, __pyx_v_name, __pyx_v_qualstr, __pyx_v_qualscale); /* function exit code */ @@ -19713,14 +19476,14 @@ Py_ssize_t __pyx_t_9; __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":799 + /* "HTSeq/_HTSeq.pyx":804 * "phred", "solexa", "solexa-old", or "noquals" ) * """ * Sequence.__init__(self, seq, name) # <<<<<<<<<<<<<< * if qualscale != "noquals": * if len(seq) != len(qualstr): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Sequence), __pyx_n_s_init); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = NULL; __pyx_t_4 = 0; @@ -19737,7 +19500,7 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_seq, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else @@ -19745,13 +19508,13 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { PyObject *__pyx_temp[4] = {__pyx_t_3, ((PyObject *)__pyx_v_self), __pyx_v_seq, __pyx_v_name}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 3+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GOTREF(__pyx_t_1); } else #endif { - __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(3+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 804, __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; @@ -19765,25 +19528,25 @@ __Pyx_INCREF(__pyx_v_name); __Pyx_GIVEREF(__pyx_v_name); PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_v_name); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 799, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 804, __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; - /* "HTSeq/_HTSeq.pyx":800 + /* "HTSeq/_HTSeq.pyx":805 * """ * Sequence.__init__(self, seq, name) * if qualscale != "noquals": # <<<<<<<<<<<<<< * if len(seq) != len(qualstr): * raise ValueError, "'seq' and 'qualstr' do not have the same length." */ - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_qualscale, __pyx_n_u_noquals, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 800, __pyx_L1_error) + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_qualscale, __pyx_n_u_noquals, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 805, __pyx_L1_error) __pyx_t_7 = (__pyx_t_6 != 0); if (__pyx_t_7) { - /* "HTSeq/_HTSeq.pyx":801 + /* "HTSeq/_HTSeq.pyx":806 * Sequence.__init__(self, seq, name) * if qualscale != "noquals": * if len(seq) != len(qualstr): # <<<<<<<<<<<<<< @@ -19792,18 +19555,18 @@ */ if (unlikely(__pyx_v_seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 801, __pyx_L1_error) + __PYX_ERR(0, 806, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_seq); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_v_seq); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 806, __pyx_L1_error) if (unlikely(__pyx_v_qualstr == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 801, __pyx_L1_error) + __PYX_ERR(0, 806, __pyx_L1_error) } - __pyx_t_9 = PyBytes_GET_SIZE(__pyx_v_qualstr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 801, __pyx_L1_error) + __pyx_t_9 = PyBytes_GET_SIZE(__pyx_v_qualstr); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 806, __pyx_L1_error) __pyx_t_7 = ((__pyx_t_8 != __pyx_t_9) != 0); if (unlikely(__pyx_t_7)) { - /* "HTSeq/_HTSeq.pyx":802 + /* "HTSeq/_HTSeq.pyx":807 * if qualscale != "noquals": * if len(seq) != len(qualstr): * raise ValueError, "'seq' and 'qualstr' do not have the same length." # <<<<<<<<<<<<<< @@ -19811,9 +19574,9 @@ * else: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_seq_and_qualstr_do_not_have_the, 0, 0); - __PYX_ERR(0, 802, __pyx_L1_error) + __PYX_ERR(0, 807, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":801 + /* "HTSeq/_HTSeq.pyx":806 * Sequence.__init__(self, seq, name) * if qualscale != "noquals": * if len(seq) != len(qualstr): # <<<<<<<<<<<<<< @@ -19822,7 +19585,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":803 + /* "HTSeq/_HTSeq.pyx":808 * if len(seq) != len(qualstr): * raise ValueError, "'seq' and 'qualstr' do not have the same length." * self._qualstr = qualstr # <<<<<<<<<<<<<< @@ -19835,7 +19598,7 @@ __Pyx_DECREF(__pyx_v_self->_qualstr); __pyx_v_self->_qualstr = __pyx_v_qualstr; - /* "HTSeq/_HTSeq.pyx":800 + /* "HTSeq/_HTSeq.pyx":805 * """ * Sequence.__init__(self, seq, name) * if qualscale != "noquals": # <<<<<<<<<<<<<< @@ -19845,7 +19608,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":805 + /* "HTSeq/_HTSeq.pyx":810 * self._qualstr = qualstr * else: * self._qualstr = b'' # <<<<<<<<<<<<<< @@ -19861,7 +19624,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":806 + /* "HTSeq/_HTSeq.pyx":811 * else: * self._qualstr = b'' * self._qualscale = qualscale # <<<<<<<<<<<<<< @@ -19874,7 +19637,7 @@ __Pyx_DECREF(__pyx_v_self->_qualscale); __pyx_v_self->_qualscale = __pyx_v_qualscale; - /* "HTSeq/_HTSeq.pyx":807 + /* "HTSeq/_HTSeq.pyx":812 * self._qualstr = b'' * self._qualscale = qualscale * self._qualarr = None # <<<<<<<<<<<<<< @@ -19887,7 +19650,7 @@ __Pyx_DECREF(__pyx_v_self->_qualarr); __pyx_v_self->_qualarr = Py_None; - /* "HTSeq/_HTSeq.pyx":808 + /* "HTSeq/_HTSeq.pyx":813 * self._qualscale = qualscale * self._qualarr = None * self._qualstr_phred = b'' # <<<<<<<<<<<<<< @@ -19900,7 +19663,7 @@ __Pyx_DECREF(__pyx_v_self->_qualstr_phred); __pyx_v_self->_qualstr_phred = __pyx_kp_b__12; - /* "HTSeq/_HTSeq.pyx":790 + /* "HTSeq/_HTSeq.pyx":795 * """ * * def __init__(self, bytes seq, str name, bytes qualstr, str qualscale="phred"): # <<<<<<<<<<<<<< @@ -19923,7 +19686,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":810 +/* "HTSeq/_HTSeq.pyx":815 * self._qualstr_phred = b'' * * cdef _fill_qual_arr(SequenceWithQualities self): # <<<<<<<<<<<<<< @@ -19965,7 +19728,7 @@ __pyx_pybuffernd_qualarr.data = NULL; __pyx_pybuffernd_qualarr.rcbuffer = &__pyx_pybuffer_qualarr; - /* "HTSeq/_HTSeq.pyx":811 + /* "HTSeq/_HTSeq.pyx":816 * * cdef _fill_qual_arr(SequenceWithQualities self): * cdef int seq_len = len(self.seq) # <<<<<<<<<<<<<< @@ -19976,24 +19739,24 @@ __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, 811, __pyx_L1_error) + __PYX_ERR(0, 816, __pyx_L1_error) } - __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 811, __pyx_L1_error) + __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 816, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seq_len = __pyx_t_2; - /* "HTSeq/_HTSeq.pyx":812 + /* "HTSeq/_HTSeq.pyx":817 * cdef _fill_qual_arr(SequenceWithQualities self): * cdef int seq_len = len(self.seq) * if self._qualscale == "missing": # <<<<<<<<<<<<<< * raise ValueError, "Quality string missing." * if seq_len != len(self._qualstr): */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_missing, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 812, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_missing, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 817, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (unlikely(__pyx_t_4)) { - /* "HTSeq/_HTSeq.pyx":813 + /* "HTSeq/_HTSeq.pyx":818 * cdef int seq_len = len(self.seq) * if self._qualscale == "missing": * raise ValueError, "Quality string missing." # <<<<<<<<<<<<<< @@ -20001,9 +19764,9 @@ * raise ValueError, "Quality string has not the same length as sequence." */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Quality_string_missing, 0, 0); - __PYX_ERR(0, 813, __pyx_L1_error) + __PYX_ERR(0, 818, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":812 + /* "HTSeq/_HTSeq.pyx":817 * cdef _fill_qual_arr(SequenceWithQualities self): * cdef int seq_len = len(self.seq) * if self._qualscale == "missing": # <<<<<<<<<<<<<< @@ -20012,7 +19775,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":814 + /* "HTSeq/_HTSeq.pyx":819 * if self._qualscale == "missing": * raise ValueError, "Quality string missing." * if seq_len != len(self._qualstr): # <<<<<<<<<<<<<< @@ -20023,14 +19786,14 @@ __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, 814, __pyx_L1_error) + __PYX_ERR(0, 819, __pyx_L1_error) } - __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 814, __pyx_L1_error) + __pyx_t_2 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 819, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((__pyx_v_seq_len != __pyx_t_2) != 0); if (unlikely(__pyx_t_4)) { - /* "HTSeq/_HTSeq.pyx":815 + /* "HTSeq/_HTSeq.pyx":820 * raise ValueError, "Quality string missing." * if seq_len != len(self._qualstr): * raise ValueError, "Quality string has not the same length as sequence." # <<<<<<<<<<<<<< @@ -20038,9 +19801,9 @@ * cdef int i */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Quality_string_has_not_the_same, 0, 0); - __PYX_ERR(0, 815, __pyx_L1_error) + __PYX_ERR(0, 820, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":814 + /* "HTSeq/_HTSeq.pyx":819 * if self._qualscale == "missing": * raise ValueError, "Quality string missing." * if seq_len != len(self._qualstr): # <<<<<<<<<<<<<< @@ -20049,28 +19812,28 @@ */ } - /* "HTSeq/_HTSeq.pyx":816 + /* "HTSeq/_HTSeq.pyx":821 * if seq_len != len(self._qualstr): * raise ValueError, "Quality string has not the same length as sequence." * cdef numpy.ndarray[numpy.uint8_t, ndim= 1] qualarr = numpy.empty((seq_len, ), numpy.uint8) # <<<<<<<<<<<<<< * cdef int i * cdef char * qualstr = self._qualstr */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 816, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_empty); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_seq_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_seq_len); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 816, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -20088,7 +19851,7 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -20098,7 +19861,7 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) { PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_t_8}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -20106,7 +19869,7 @@ } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 816, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 821, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -20117,18 +19880,18 @@ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_8); __pyx_t_7 = 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, 816, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __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; - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 816, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 821, __pyx_L1_error) __pyx_t_11 = ((PyArrayObject *)__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_qualarr.rcbuffer->pybuffer, (PyObject*)__pyx_t_11, &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_qualarr = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 816, __pyx_L1_error) + __PYX_ERR(0, 821, __pyx_L1_error) } else {__pyx_pybuffernd_qualarr.diminfo[0].strides = __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qualarr.diminfo[0].shape = __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.shape[0]; } } @@ -20136,7 +19899,7 @@ __pyx_v_qualarr = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":818 + /* "HTSeq/_HTSeq.pyx":823 * cdef numpy.ndarray[numpy.uint8_t, ndim= 1] qualarr = numpy.empty((seq_len, ), numpy.uint8) * cdef int i * cdef char * qualstr = self._qualstr # <<<<<<<<<<<<<< @@ -20145,23 +19908,23 @@ */ if (unlikely(__pyx_v_self->_qualstr == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 818, __pyx_L1_error) + __PYX_ERR(0, 823, __pyx_L1_error) } - __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 818, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr); if (unlikely((!__pyx_t_12) && PyErr_Occurred())) __PYX_ERR(0, 823, __pyx_L1_error) __pyx_v_qualstr = __pyx_t_12; - /* "HTSeq/_HTSeq.pyx":819 + /* "HTSeq/_HTSeq.pyx":824 * cdef int i * cdef char * qualstr = self._qualstr * if self._qualscale == "phred": # <<<<<<<<<<<<<< * for i in range(seq_len): * qualarr[i] = qualstr[i] - 33 */ - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_phred, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 819, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_phred, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 824, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":820 + /* "HTSeq/_HTSeq.pyx":825 * cdef char * qualstr = self._qualstr * if self._qualscale == "phred": * for i in range(seq_len): # <<<<<<<<<<<<<< @@ -20173,7 +19936,7 @@ for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; - /* "HTSeq/_HTSeq.pyx":821 + /* "HTSeq/_HTSeq.pyx":826 * if self._qualscale == "phred": * for i in range(seq_len): * qualarr[i] = qualstr[i] - 33 # <<<<<<<<<<<<<< @@ -20188,12 +19951,12 @@ } else if (unlikely(__pyx_t_15 >= __pyx_pybuffernd_qualarr.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); - __PYX_ERR(0, 821, __pyx_L1_error) + __PYX_ERR(0, 826, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.buf, __pyx_t_15, __pyx_pybuffernd_qualarr.diminfo[0].strides) = ((__pyx_v_qualstr[__pyx_v_i]) - 33); } - /* "HTSeq/_HTSeq.pyx":819 + /* "HTSeq/_HTSeq.pyx":824 * cdef int i * cdef char * qualstr = self._qualstr * if self._qualscale == "phred": # <<<<<<<<<<<<<< @@ -20203,18 +19966,18 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":822 + /* "HTSeq/_HTSeq.pyx":827 * for i in range(seq_len): * qualarr[i] = qualstr[i] - 33 * elif self._qualscale == "solexa": # <<<<<<<<<<<<<< * for i in range(seq_len): * qualarr[i] = qualstr[i] - 64 */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_solexa, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 822, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_solexa, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 827, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":823 + /* "HTSeq/_HTSeq.pyx":828 * qualarr[i] = qualstr[i] - 33 * elif self._qualscale == "solexa": * for i in range(seq_len): # <<<<<<<<<<<<<< @@ -20226,7 +19989,7 @@ for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; - /* "HTSeq/_HTSeq.pyx":824 + /* "HTSeq/_HTSeq.pyx":829 * elif self._qualscale == "solexa": * for i in range(seq_len): * qualarr[i] = qualstr[i] - 64 # <<<<<<<<<<<<<< @@ -20241,12 +20004,12 @@ } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_qualarr.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); - __PYX_ERR(0, 824, __pyx_L1_error) + __PYX_ERR(0, 829, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_qualarr.diminfo[0].strides) = ((__pyx_v_qualstr[__pyx_v_i]) - 64); } - /* "HTSeq/_HTSeq.pyx":822 + /* "HTSeq/_HTSeq.pyx":827 * for i in range(seq_len): * qualarr[i] = qualstr[i] - 33 * elif self._qualscale == "solexa": # <<<<<<<<<<<<<< @@ -20256,18 +20019,18 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":825 + /* "HTSeq/_HTSeq.pyx":830 * for i in range(seq_len): * qualarr[i] = qualstr[i] - 64 * elif self._qualscale == "solexa-old": # <<<<<<<<<<<<<< * for i in range(seq_len): * qualarr[i] = 10 * \ */ - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_kp_u_solexa_old, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 825, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_kp_u_solexa_old, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 830, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); if (likely(__pyx_t_3)) { - /* "HTSeq/_HTSeq.pyx":826 + /* "HTSeq/_HTSeq.pyx":831 * qualarr[i] = qualstr[i] - 64 * elif self._qualscale == "solexa-old": * for i in range(seq_len): # <<<<<<<<<<<<<< @@ -20279,19 +20042,19 @@ for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { __pyx_v_i = __pyx_t_14; - /* "HTSeq/_HTSeq.pyx":828 + /* "HTSeq/_HTSeq.pyx":833 * for i in range(seq_len): * qualarr[i] = 10 * \ * math.log10(1 + 10 ** (qualstr[i] - 64) / 10.0) # <<<<<<<<<<<<<< * else: * raise ValueError, "Illegal quality scale '%s'." % self._qualscale */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 828, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_log10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_log10); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyFloat_FromDouble((1.0 + (((double)__Pyx_pow_long(10, ((__pyx_v_qualstr[__pyx_v_i]) - 64))) / 10.0))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 828, __pyx_L1_error) + __pyx_t_6 = PyFloat_FromDouble((1.0 + (((double)__Pyx_pow_long(10, ((__pyx_v_qualstr[__pyx_v_i]) - 64))) / 10.0))); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 833, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) { @@ -20303,54 +20066,24 @@ __Pyx_DECREF_SET(__pyx_t_10, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 828, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_10, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - /* "HTSeq/_HTSeq.pyx":827 + /* "HTSeq/_HTSeq.pyx":832 * elif self._qualscale == "solexa-old": * for i in range(seq_len): * qualarr[i] = 10 * \ # <<<<<<<<<<<<<< * math.log10(1 + 10 ** (qualstr[i] - 64) / 10.0) * else: */ - __pyx_t_10 = PyNumber_Multiply(__pyx_int_10, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_10 = PyNumber_Multiply(__pyx_int_10, __pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_18 = __Pyx_PyInt_As_npy_uint8(__pyx_t_10); if (unlikely((__pyx_t_18 == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 827, __pyx_L1_error) + __pyx_t_18 = __Pyx_PyInt_As_npy_uint8(__pyx_t_10); if (unlikely((__pyx_t_18 == ((npy_uint8)-1)) && PyErr_Occurred())) __PYX_ERR(0, 832, __pyx_L1_error) __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_19 = __pyx_v_i; __pyx_t_16 = -1; @@ -20360,12 +20093,12 @@ } else if (unlikely(__pyx_t_19 >= __pyx_pybuffernd_qualarr.diminfo[0].shape)) __pyx_t_16 = 0; if (unlikely(__pyx_t_16 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_16); - __PYX_ERR(0, 827, __pyx_L1_error) + __PYX_ERR(0, 832, __pyx_L1_error) } *__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_qualarr.rcbuffer->pybuffer.buf, __pyx_t_19, __pyx_pybuffernd_qualarr.diminfo[0].strides) = __pyx_t_18; } - /* "HTSeq/_HTSeq.pyx":825 + /* "HTSeq/_HTSeq.pyx":830 * for i in range(seq_len): * qualarr[i] = qualstr[i] - 64 * elif self._qualscale == "solexa-old": # <<<<<<<<<<<<<< @@ -20375,7 +20108,7 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":830 + /* "HTSeq/_HTSeq.pyx":835 * math.log10(1 + 10 ** (qualstr[i] - 64) / 10.0) * else: * raise ValueError, "Illegal quality scale '%s'." % self._qualscale # <<<<<<<<<<<<<< @@ -20383,15 +20116,15 @@ * */ /*else*/ { - __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Illegal_quality_scale_s, __pyx_v_self->_qualscale); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 830, __pyx_L1_error) + __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_Illegal_quality_scale_s, __pyx_v_self->_qualscale); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 835, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_10, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 830, __pyx_L1_error) + __PYX_ERR(0, 835, __pyx_L1_error) } __pyx_L5:; - /* "HTSeq/_HTSeq.pyx":831 + /* "HTSeq/_HTSeq.pyx":836 * else: * raise ValueError, "Illegal quality scale '%s'." % self._qualscale * self._qualarr = qualarr # <<<<<<<<<<<<<< @@ -20404,7 +20137,7 @@ __Pyx_DECREF(__pyx_v_self->_qualarr); __pyx_v_self->_qualarr = ((PyObject *)__pyx_v_qualarr); - /* "HTSeq/_HTSeq.pyx":810 + /* "HTSeq/_HTSeq.pyx":815 * self._qualstr_phred = b'' * * cdef _fill_qual_arr(SequenceWithQualities self): # <<<<<<<<<<<<<< @@ -20440,7 +20173,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":834 +/* "HTSeq/_HTSeq.pyx":839 * * property qual: * def __get__(self): # <<<<<<<<<<<<<< @@ -20469,7 +20202,7 @@ PyObject *__pyx_t_3 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":835 + /* "HTSeq/_HTSeq.pyx":840 * property qual: * def __get__(self): * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -20480,18 +20213,18 @@ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":836 + /* "HTSeq/_HTSeq.pyx":841 * def __get__(self): * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * return self._qualarr * */ - __pyx_t_3 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 836, __pyx_L1_error) + __pyx_t_3 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 841, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":835 + /* "HTSeq/_HTSeq.pyx":840 * property qual: * def __get__(self): * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -20500,7 +20233,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":837 + /* "HTSeq/_HTSeq.pyx":842 * if self._qualarr is None: * self._fill_qual_arr() * return self._qualarr # <<<<<<<<<<<<<< @@ -20512,7 +20245,7 @@ __pyx_r = __pyx_v_self->_qualarr; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":834 + /* "HTSeq/_HTSeq.pyx":839 * * property qual: * def __get__(self): # <<<<<<<<<<<<<< @@ -20531,7 +20264,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":839 +/* "HTSeq/_HTSeq.pyx":844 * return self._qualarr * * def __set__(self, newvalue): # <<<<<<<<<<<<<< @@ -20565,7 +20298,7 @@ Py_ssize_t __pyx_t_7; __Pyx_RefNannySetupContext("__set__", 0); - /* "HTSeq/_HTSeq.pyx":840 + /* "HTSeq/_HTSeq.pyx":845 * * def __set__(self, newvalue): * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.uint8): # <<<<<<<<<<<<<< @@ -20579,24 +20312,24 @@ __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_newvalue, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_newvalue, __pyx_n_s_dtype); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 840, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_numpy); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_uint8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_4, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 840, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 845, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; __pyx_t_3 = ((!__pyx_t_1) != 0); if (unlikely(__pyx_t_3)) { - /* "HTSeq/_HTSeq.pyx":841 + /* "HTSeq/_HTSeq.pyx":846 * def __set__(self, newvalue): * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.uint8): * raise TypeError, "qual can only be assigned a numpy array of type numpy.uint8" # <<<<<<<<<<<<<< @@ -20604,9 +20337,9 @@ * raise TypeError, "assignment to qual with illegal shape" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_qual_can_only_be_assigned_a_nump, 0, 0); - __PYX_ERR(0, 841, __pyx_L1_error) + __PYX_ERR(0, 846, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":840 + /* "HTSeq/_HTSeq.pyx":845 * * def __set__(self, newvalue): * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.uint8): # <<<<<<<<<<<<<< @@ -20615,39 +20348,39 @@ */ } - /* "HTSeq/_HTSeq.pyx":842 + /* "HTSeq/_HTSeq.pyx":847 * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.uint8): * raise TypeError, "qual can only be assigned a numpy array of type numpy.uint8" * if not (newvalue.shape == (len(self.seq), )): # <<<<<<<<<<<<<< * raise TypeError, "assignment to qual with illegal shape" * self._qualarr = newvalue */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_newvalue, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_newvalue, __pyx_n_s_shape); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = __pyx_v_self->__pyx_base.seq; __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, 842, __pyx_L1_error) + __PYX_ERR(0, 847, __pyx_L1_error) } - __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_7 = PyBytes_GET_SIZE(__pyx_t_6); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 842, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 847, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_1 = ((!__pyx_t_3) != 0); if (unlikely(__pyx_t_1)) { - /* "HTSeq/_HTSeq.pyx":843 + /* "HTSeq/_HTSeq.pyx":848 * raise TypeError, "qual can only be assigned a numpy array of type numpy.uint8" * if not (newvalue.shape == (len(self.seq), )): * raise TypeError, "assignment to qual with illegal shape" # <<<<<<<<<<<<<< @@ -20655,9 +20388,9 @@ * self._qualstr = b"" */ __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_u_assignment_to_qual_with_illegal, 0, 0); - __PYX_ERR(0, 843, __pyx_L1_error) + __PYX_ERR(0, 848, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":842 + /* "HTSeq/_HTSeq.pyx":847 * if not (isinstance(newvalue, numpy.ndarray) and newvalue.dtype == numpy.uint8): * raise TypeError, "qual can only be assigned a numpy array of type numpy.uint8" * if not (newvalue.shape == (len(self.seq), )): # <<<<<<<<<<<<<< @@ -20666,7 +20399,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":844 + /* "HTSeq/_HTSeq.pyx":849 * if not (newvalue.shape == (len(self.seq), )): * raise TypeError, "assignment to qual with illegal shape" * self._qualarr = newvalue # <<<<<<<<<<<<<< @@ -20679,7 +20412,7 @@ __Pyx_DECREF(__pyx_v_self->_qualarr); __pyx_v_self->_qualarr = __pyx_v_newvalue; - /* "HTSeq/_HTSeq.pyx":845 + /* "HTSeq/_HTSeq.pyx":850 * raise TypeError, "assignment to qual with illegal shape" * self._qualarr = newvalue * self._qualstr = b"" # <<<<<<<<<<<<<< @@ -20692,7 +20425,7 @@ __Pyx_DECREF(__pyx_v_self->_qualstr); __pyx_v_self->_qualstr = __pyx_kp_b__12; - /* "HTSeq/_HTSeq.pyx":846 + /* "HTSeq/_HTSeq.pyx":851 * self._qualarr = newvalue * self._qualstr = b"" * self._qualscale = "none" # <<<<<<<<<<<<<< @@ -20705,7 +20438,7 @@ __Pyx_DECREF(__pyx_v_self->_qualscale); __pyx_v_self->_qualscale = __pyx_n_u_none; - /* "HTSeq/_HTSeq.pyx":847 + /* "HTSeq/_HTSeq.pyx":852 * self._qualstr = b"" * self._qualscale = "none" * self._qualstr_phred = b"" # <<<<<<<<<<<<<< @@ -20718,19 +20451,19 @@ __Pyx_DECREF(__pyx_v_self->_qualstr_phred); __pyx_v_self->_qualstr_phred = __pyx_kp_b__12; - /* "HTSeq/_HTSeq.pyx":850 + /* "HTSeq/_HTSeq.pyx":855 * # Experimentally trying to set qualstr when the array is modified * # directly * tmp = self.qualstr # <<<<<<<<<<<<<< * self._qualstr = self._qualstr_phred * */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 850, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_v_tmp = __pyx_t_6; __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":851 + /* "HTSeq/_HTSeq.pyx":856 * # directly * tmp = self.qualstr * self._qualstr = self._qualstr_phred # <<<<<<<<<<<<<< @@ -20745,7 +20478,7 @@ __pyx_v_self->_qualstr = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":839 + /* "HTSeq/_HTSeq.pyx":844 * return self._qualarr * * def __set__(self, newvalue): # <<<<<<<<<<<<<< @@ -20768,7 +20501,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":853 +/* "HTSeq/_HTSeq.pyx":858 * self._qualstr = self._qualstr_phred * * def __repr__(self): # <<<<<<<<<<<<<< @@ -20799,7 +20532,7 @@ PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "HTSeq/_HTSeq.pyx":854 + /* "HTSeq/_HTSeq.pyx":859 * * def __repr__(self): * return "<%s object '%s'>" % (self.__class__.__name__, self.name) # <<<<<<<<<<<<<< @@ -20807,7 +20540,7 @@ * def __getitem__(self, item): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; @@ -20815,12 +20548,12 @@ __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -20832,7 +20565,7 @@ __pyx_t_2 += 9; __Pyx_GIVEREF(__pyx_kp_u_object); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u_object); - __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Unicode(__pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); @@ -20843,14 +20576,14 @@ __pyx_t_2 += 2; __Pyx_GIVEREF(__pyx_kp_u__5); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__5); - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 5, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 859, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":853 + /* "HTSeq/_HTSeq.pyx":858 * self._qualstr = self._qualstr_phred * * def __repr__(self): # <<<<<<<<<<<<<< @@ -20871,7 +20604,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":856 +/* "HTSeq/_HTSeq.pyx":861 * return "<%s object '%s'>" % (self.__class__.__name__, self.name) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -20902,7 +20635,7 @@ PyObject *__pyx_t_4 = NULL; __Pyx_RefNannySetupContext("__getitem__", 0); - /* "HTSeq/_HTSeq.pyx":857 + /* "HTSeq/_HTSeq.pyx":862 * * def __getitem__(self, item): * if self.name.endswith("[part]"): # <<<<<<<<<<<<<< @@ -20911,12 +20644,12 @@ */ if (unlikely(__pyx_v_self->__pyx_base.name == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "endswith"); - __PYX_ERR(0, 857, __pyx_L1_error) + __PYX_ERR(0, 862, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyUnicode_Tailmatch(__pyx_v_self->__pyx_base.name, __pyx_kp_u_part, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 857, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Tailmatch(__pyx_v_self->__pyx_base.name, __pyx_kp_u_part, 0, PY_SSIZE_T_MAX, 1); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 862, __pyx_L1_error) if ((__pyx_t_1 != 0)) { - /* "HTSeq/_HTSeq.pyx":858 + /* "HTSeq/_HTSeq.pyx":863 * def __getitem__(self, item): * if self.name.endswith("[part]"): * new_name = self.name # <<<<<<<<<<<<<< @@ -20928,7 +20661,7 @@ __pyx_v_new_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":857 + /* "HTSeq/_HTSeq.pyx":862 * * def __getitem__(self, item): * if self.name.endswith("[part]"): # <<<<<<<<<<<<<< @@ -20938,7 +20671,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":860 + /* "HTSeq/_HTSeq.pyx":865 * new_name = self.name * else: * new_name = self.name + "[part]" # <<<<<<<<<<<<<< @@ -20946,14 +20679,14 @@ * self.seq[item], new_name, self.qualstr[item]) */ /*else*/ { - __pyx_t_2 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_self->__pyx_base.name, __pyx_kp_u_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 860, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_ConcatSafe(__pyx_v_self->__pyx_base.name, __pyx_kp_u_part); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 865, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_v_new_name = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":861 + /* "HTSeq/_HTSeq.pyx":866 * else: * new_name = self.name + "[part]" * return SequenceWithQualities( # <<<<<<<<<<<<<< @@ -20962,29 +20695,29 @@ */ __Pyx_XDECREF(__pyx_r); - /* "HTSeq/_HTSeq.pyx":862 + /* "HTSeq/_HTSeq.pyx":867 * new_name = self.name + "[part]" * return SequenceWithQualities( * self.seq[item], new_name, self.qualstr[item]) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.seq, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_self->__pyx_base.seq, __pyx_v_item); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 862, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_t_3, __pyx_v_item); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":861 + /* "HTSeq/_HTSeq.pyx":866 * else: * new_name = self.name + "[part]" * return SequenceWithQualities( # <<<<<<<<<<<<<< * self.seq[item], new_name, self.qualstr[item]) * */ - __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 861, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -20995,14 +20728,14 @@ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); __pyx_t_2 = 0; __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 861, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":856 + /* "HTSeq/_HTSeq.pyx":861 * return "<%s object '%s'>" % (self.__class__.__name__, self.name) * * def __getitem__(self, item): # <<<<<<<<<<<<<< @@ -21024,7 +20757,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":865 +/* "HTSeq/_HTSeq.pyx":870 * * @property * def qualstr(self): # <<<<<<<<<<<<<< @@ -21074,7 +20807,7 @@ __pyx_pybuffernd_qual_array.data = NULL; __pyx_pybuffernd_qual_array.rcbuffer = &__pyx_pybuffer_qual_array; - /* "HTSeq/_HTSeq.pyx":867 + /* "HTSeq/_HTSeq.pyx":872 * def qualstr(self): * cdef int seqlen * cdef char * qualstr_phred_cstr = self._qualstr_phred # <<<<<<<<<<<<<< @@ -21083,12 +20816,12 @@ */ if (unlikely(__pyx_v_self->_qualstr_phred == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 867, __pyx_L1_error) + __PYX_ERR(0, 872, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr_phred); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 867, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr_phred); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 872, __pyx_L1_error) __pyx_v_qualstr_phred_cstr = __pyx_t_1; - /* "HTSeq/_HTSeq.pyx":870 + /* "HTSeq/_HTSeq.pyx":875 * cdef int i * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array * if qualstr_phred_cstr[0] == 0: # <<<<<<<<<<<<<< @@ -21098,18 +20831,18 @@ __pyx_t_2 = (((__pyx_v_qualstr_phred_cstr[0]) == 0) != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":871 + /* "HTSeq/_HTSeq.pyx":876 * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array * if qualstr_phred_cstr[0] == 0: * if self._qualscale == "noquals": # <<<<<<<<<<<<<< * raise ValueError, "Quality string missing" * if self._qualscale == "phred": */ - __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_noquals, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 871, __pyx_L1_error) + __pyx_t_2 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_noquals, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 876, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (unlikely(__pyx_t_3)) { - /* "HTSeq/_HTSeq.pyx":872 + /* "HTSeq/_HTSeq.pyx":877 * if qualstr_phred_cstr[0] == 0: * if self._qualscale == "noquals": * raise ValueError, "Quality string missing" # <<<<<<<<<<<<<< @@ -21117,9 +20850,9 @@ * self._qualstr_phred = self._qualstr */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Quality_string_missing_2, 0, 0); - __PYX_ERR(0, 872, __pyx_L1_error) + __PYX_ERR(0, 877, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":871 + /* "HTSeq/_HTSeq.pyx":876 * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array * if qualstr_phred_cstr[0] == 0: * if self._qualscale == "noquals": # <<<<<<<<<<<<<< @@ -21128,18 +20861,18 @@ */ } - /* "HTSeq/_HTSeq.pyx":873 + /* "HTSeq/_HTSeq.pyx":878 * if self._qualscale == "noquals": * raise ValueError, "Quality string missing" * if self._qualscale == "phred": # <<<<<<<<<<<<<< * self._qualstr_phred = self._qualstr * else: */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_phred, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 873, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->_qualscale, __pyx_n_u_phred, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 878, __pyx_L1_error) __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":874 + /* "HTSeq/_HTSeq.pyx":879 * raise ValueError, "Quality string missing" * if self._qualscale == "phred": * self._qualstr_phred = self._qualstr # <<<<<<<<<<<<<< @@ -21154,7 +20887,7 @@ __pyx_v_self->_qualstr_phred = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":873 + /* "HTSeq/_HTSeq.pyx":878 * if self._qualscale == "noquals": * raise ValueError, "Quality string missing" * if self._qualscale == "phred": # <<<<<<<<<<<<<< @@ -21164,7 +20897,7 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":876 + /* "HTSeq/_HTSeq.pyx":881 * self._qualstr_phred = self._qualstr * else: * seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -21176,32 +20909,32 @@ __Pyx_INCREF(__pyx_t_4); if (unlikely(__pyx_t_4 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 876, __pyx_L1_error) + __PYX_ERR(0, 881, __pyx_L1_error) } - __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 876, __pyx_L1_error) + __pyx_t_5 = PyBytes_GET_SIZE(__pyx_t_4); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 881, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_v_seqlen = __pyx_t_5; - /* "HTSeq/_HTSeq.pyx":878 + /* "HTSeq/_HTSeq.pyx":883 * seqlen = len(self.seq) * # FIXME: is this fixed now? * self._qualstr_phred = b' ' * seqlen # <<<<<<<<<<<<<< * qualstr_phred_cstr = self._qualstr_phred * if self._qualarr is None: */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_seqlen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_seqlen); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = PyNumber_Multiply(__pyx_kp_b__27, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 878, __pyx_L1_error) + __pyx_t_6 = PyNumber_Multiply(__pyx_kp_b__26, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 878, __pyx_L1_error) + if (!(likely(PyBytes_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 883, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_self->_qualstr_phred); __Pyx_DECREF(__pyx_v_self->_qualstr_phred); __pyx_v_self->_qualstr_phred = ((PyObject*)__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":879 + /* "HTSeq/_HTSeq.pyx":884 * # FIXME: is this fixed now? * self._qualstr_phred = b' ' * seqlen * qualstr_phred_cstr = self._qualstr_phred # <<<<<<<<<<<<<< @@ -21210,12 +20943,12 @@ */ if (unlikely(__pyx_v_self->_qualstr_phred == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 879, __pyx_L1_error) + __PYX_ERR(0, 884, __pyx_L1_error) } - __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr_phred); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 879, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->_qualstr_phred); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) __PYX_ERR(0, 884, __pyx_L1_error) __pyx_v_qualstr_phred_cstr = __pyx_t_1; - /* "HTSeq/_HTSeq.pyx":880 + /* "HTSeq/_HTSeq.pyx":885 * self._qualstr_phred = b' ' * seqlen * qualstr_phred_cstr = self._qualstr_phred * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -21226,18 +20959,18 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":881 + /* "HTSeq/_HTSeq.pyx":886 * qualstr_phred_cstr = self._qualstr_phred * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * qual_array = self._qualarr * for i in range(seqlen): */ - __pyx_t_6 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 881, __pyx_L1_error) + __pyx_t_6 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":880 + /* "HTSeq/_HTSeq.pyx":885 * self._qualstr_phred = b' ' * seqlen * qualstr_phred_cstr = self._qualstr_phred * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -21246,14 +20979,14 @@ */ } - /* "HTSeq/_HTSeq.pyx":882 + /* "HTSeq/_HTSeq.pyx":887 * if self._qualarr is None: * self._fill_qual_arr() * qual_array = self._qualarr # <<<<<<<<<<<<<< * for i in range(seqlen): * qualstr_phred_cstr[i] = 33 + qual_array[i] */ - if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 882, __pyx_L1_error) + if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 887, __pyx_L1_error) __pyx_t_6 = __pyx_v_self->_qualarr; __Pyx_INCREF(__pyx_t_6); { @@ -21271,12 +21004,12 @@ __pyx_t_8 = __pyx_t_9 = __pyx_t_10 = 0; } __pyx_pybuffernd_qual_array.diminfo[0].strides = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qual_array.diminfo[0].shape = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.shape[0]; - if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 882, __pyx_L1_error) + if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 887, __pyx_L1_error) } __pyx_v_qual_array = ((PyArrayObject *)__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":883 + /* "HTSeq/_HTSeq.pyx":888 * self._fill_qual_arr() * qual_array = self._qualarr * for i in range(seqlen): # <<<<<<<<<<<<<< @@ -21288,7 +21021,7 @@ for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_11; __pyx_t_12+=1) { __pyx_v_i = __pyx_t_12; - /* "HTSeq/_HTSeq.pyx":884 + /* "HTSeq/_HTSeq.pyx":889 * qual_array = self._qualarr * for i in range(seqlen): * qualstr_phred_cstr[i] = 33 + qual_array[i] # <<<<<<<<<<<<<< @@ -21303,14 +21036,14 @@ } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_14 = 0; if (unlikely(__pyx_t_14 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_14); - __PYX_ERR(0, 884, __pyx_L1_error) + __PYX_ERR(0, 889, __pyx_L1_error) } (__pyx_v_qualstr_phred_cstr[__pyx_v_i]) = (33 + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_qual_array.diminfo[0].strides))); } } __pyx_L5:; - /* "HTSeq/_HTSeq.pyx":870 + /* "HTSeq/_HTSeq.pyx":875 * cdef int i * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array * if qualstr_phred_cstr[0] == 0: # <<<<<<<<<<<<<< @@ -21319,7 +21052,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":885 + /* "HTSeq/_HTSeq.pyx":890 * for i in range(seqlen): * qualstr_phred_cstr[i] = 33 + qual_array[i] * return self._qualstr_phred # <<<<<<<<<<<<<< @@ -21331,7 +21064,7 @@ __pyx_r = __pyx_v_self->_qualstr_phred; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":865 + /* "HTSeq/_HTSeq.pyx":870 * * @property * def qualstr(self): # <<<<<<<<<<<<<< @@ -21361,7 +21094,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":887 +/* "HTSeq/_HTSeq.pyx":892 * return self._qualstr_phred * * def write_to_fastq_file(self, fastq_file): # <<<<<<<<<<<<<< @@ -21397,14 +21130,14 @@ PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("write_to_fastq_file", 0); - /* "HTSeq/_HTSeq.pyx":888 + /* "HTSeq/_HTSeq.pyx":893 * * def write_to_fastq_file(self, fastq_file): * if hasattr(self, "descr") and self.descr is not None: # <<<<<<<<<<<<<< * fastq_file.write("@%s %s\n" % (self.name, self.descr)) * else: */ - __pyx_t_2 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_u_descr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 888, __pyx_L1_error) + __pyx_t_2 = __Pyx_HasAttr(((PyObject *)__pyx_v_self), __pyx_n_u_descr); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 893, __pyx_L1_error) __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { } else { @@ -21417,46 +21150,46 @@ __pyx_L4_bool_binop_done:; if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":889 + /* "HTSeq/_HTSeq.pyx":894 * def write_to_fastq_file(self, fastq_file): * if hasattr(self, "descr") and self.descr is not None: * fastq_file.write("@%s %s\n" % (self.name, self.descr)) # <<<<<<<<<<<<<< * else: * fastq_file.write("@%s\n" % self.name) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 889, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 889, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_7 = 0; __pyx_t_8 = 127; - __Pyx_INCREF(__pyx_kp_u__28); + __Pyx_INCREF(__pyx_kp_u__27); __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__28); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u__28); - __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 889, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__27); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_kp_u__27); + __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_9); __pyx_t_9 = 0; - __Pyx_INCREF(__pyx_kp_u__27); + __Pyx_INCREF(__pyx_kp_u__26); __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__27); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__27); - __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_self->__pyx_base.descr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 889, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__26); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_kp_u__26); + __pyx_t_9 = __Pyx_PyUnicode_Unicode(__pyx_v_self->__pyx_base.descr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_t_8 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) > __pyx_t_8) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_9) : __pyx_t_8; __pyx_t_7 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_t_9); __pyx_t_9 = 0; - __Pyx_INCREF(__pyx_kp_u__23); + __Pyx_INCREF(__pyx_kp_u__22); __pyx_t_7 += 1; - __Pyx_GIVEREF(__pyx_kp_u__23); - PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__23); - __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 889, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__22); + PyTuple_SET_ITEM(__pyx_t_6, 4, __pyx_kp_u__22); + __pyx_t_9 = __Pyx_PyUnicode_Join(__pyx_t_6, 5, __pyx_t_7, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -21469,45 +21202,15 @@ __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_9}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_9}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 889, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9); - __pyx_t_9 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":888 + /* "HTSeq/_HTSeq.pyx":893 * * def write_to_fastq_file(self, fastq_file): * if hasattr(self, "descr") and self.descr is not None: # <<<<<<<<<<<<<< @@ -21517,7 +21220,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":891 + /* "HTSeq/_HTSeq.pyx":896 * fastq_file.write("@%s %s\n" % (self.name, self.descr)) * else: * fastq_file.write("@%s\n" % self.name) # <<<<<<<<<<<<<< @@ -21525,224 +21228,143 @@ * fastq_file.write("+\n") */ /*else*/ { - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_s_2, __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 891, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = NULL; + __pyx_t_9 = PyUnicode_Format(__pyx_kp_u_s_2, __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_9)) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_9) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 891, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_10); - __pyx_t_10 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 891, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_9) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 896, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":892 + /* "HTSeq/_HTSeq.pyx":897 * else: * fastq_file.write("@%s\n" % self.name) * fastq_file.write(self.seq.decode() + "\n") # <<<<<<<<<<<<<< * fastq_file.write("+\n") * fastq_file.write(self.qualstr.decode() + "\n") */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); if (unlikely(__pyx_v_self->__pyx_base.seq == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 892, __pyx_L1_error) + __PYX_ERR(0, 897, __pyx_L1_error) } - __pyx_t_6 = __Pyx_decode_bytes(__pyx_v_self->__pyx_base.seq, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error) + __pyx_t_9 = __Pyx_decode_bytes(__pyx_v_self->__pyx_base.seq, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_t_9, __pyx_kp_u__22); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyUnicode_Concat(__pyx_t_6, __pyx_kp_u__23); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 892, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); - if (likely(__pyx_t_6)) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_9)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_5, function); } } - if (!__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GOTREF(__pyx_t_4); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_10}; - __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_10}; - __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 892, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10); - __pyx_t_10 = 0; - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_4 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_9, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":893 + /* "HTSeq/_HTSeq.pyx":898 * fastq_file.write("@%s\n" % self.name) * fastq_file.write(self.seq.decode() + "\n") * fastq_file.write("+\n") # <<<<<<<<<<<<<< * fastq_file.write(self.qualstr.decode() + "\n") * */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 893, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); + } + } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_kp_u__28) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_kp_u__28); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 898, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":894 + /* "HTSeq/_HTSeq.pyx":899 * fastq_file.write(self.seq.decode() + "\n") * fastq_file.write("+\n") * fastq_file.write(self.qualstr.decode() + "\n") # <<<<<<<<<<<<<< * * def get_fastq_str(self, bint convert_to_phred=False): */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_decode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __pyx_t_10 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_10)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_10); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); - } - } - if (__pyx_t_10) { - __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } else { - __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 894, __pyx_L1_error) - } + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_fastq_file, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_t_9, __pyx_kp_u__23); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_decode); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) { + __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10); if (likely(__pyx_t_9)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10); __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); + __Pyx_DECREF_SET(__pyx_t_10, function); } } - if (!__pyx_t_9) { - __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_5); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_6}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_6}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 894, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_6 = (__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_6)) __PYX_ERR(0, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = PyNumber_Add(__pyx_t_6, __pyx_kp_u__22); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_10); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_5, function); } } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_5, __pyx_t_6, __pyx_t_10) : __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_10); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 899, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":887 + /* "HTSeq/_HTSeq.pyx":892 * return self._qualstr_phred * * def write_to_fastq_file(self, fastq_file): # <<<<<<<<<<<<<< @@ -21767,7 +21389,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":896 +/* "HTSeq/_HTSeq.pyx":901 * fastq_file.write(self.qualstr.decode() + "\n") * * def get_fastq_str(self, bint convert_to_phred=False): # <<<<<<<<<<<<<< @@ -21803,7 +21425,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_fastq_str") < 0)) __PYX_ERR(0, 896, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_fastq_str") < 0)) __PYX_ERR(0, 901, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -21814,14 +21436,14 @@ } } if (values[0]) { - __pyx_v_convert_to_phred = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_convert_to_phred == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 896, __pyx_L3_error) + __pyx_v_convert_to_phred = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_convert_to_phred == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 901, __pyx_L3_error) } else { __pyx_v_convert_to_phred = ((int)0); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("get_fastq_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 896, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("get_fastq_str", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 901, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.get_fastq_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -21846,16 +21468,16 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("get_fastq_str", 0); - /* "HTSeq/_HTSeq.pyx":897 + /* "HTSeq/_HTSeq.pyx":902 * * def get_fastq_str(self, bint convert_to_phred=False): * sio = cStringIO.StringIO() # <<<<<<<<<<<<<< * self.write_to_fastq_file(sio, convert_to_phred) * return sio.getvalue() */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_cStringIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 897, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_cStringIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 897, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -21868,27 +21490,24 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 897, __pyx_L1_error) - } + __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, 902, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_sio = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":898 + /* "HTSeq/_HTSeq.pyx":903 * def get_fastq_str(self, bint convert_to_phred=False): * sio = cStringIO.StringIO() * self.write_to_fastq_file(sio, convert_to_phred) # <<<<<<<<<<<<<< * return sio.getvalue() * */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_fastq_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_write_to_fastq_file); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_convert_to_phred); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_convert_to_phred); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_t_4 = NULL; __pyx_t_5 = 0; @@ -21905,7 +21524,7 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sio, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -21914,14 +21533,14 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_sio, __pyx_t_2}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 903, __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; @@ -21932,22 +21551,22 @@ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_2); __pyx_t_2 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 898, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 903, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":899 + /* "HTSeq/_HTSeq.pyx":904 * sio = cStringIO.StringIO() * self.write_to_fastq_file(sio, convert_to_phred) * return sio.getvalue() # <<<<<<<<<<<<<< * - * cpdef SequenceWithQualities get_reverse_complement(self): + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sio, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 899, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_sio, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 904, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -21959,19 +21578,16 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 899, __pyx_L1_error) - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 904, __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; - /* "HTSeq/_HTSeq.pyx":896 + /* "HTSeq/_HTSeq.pyx":901 * fastq_file.write(self.qualstr.decode() + "\n") * * def get_fastq_str(self, bint convert_to_phred=False): # <<<<<<<<<<<<<< @@ -21995,16 +21611,17 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":901 +/* "HTSeq/_HTSeq.pyx":906 * return sio.getvalue() * - * cpdef SequenceWithQualities get_reverse_complement(self): # <<<<<<<<<<<<<< + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< * cdef SequenceWithQualities res - * res = SequenceWithQualities( + * if rename: */ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch) { +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args) { + int __pyx_v_rename = ((int)1); struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_res = 0; struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -22012,141 +21629,244 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - int __pyx_t_5; + PyObject *__pyx_t_5 = NULL; int __pyx_t_6; + int __pyx_t_7; __Pyx_RefNannySetupContext("get_reverse_complement", 0); + if (__pyx_optional_args) { + if (__pyx_optional_args->__pyx_n > 0) { + __pyx_v_rename = __pyx_optional_args->rename; + } + } /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_rename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + } } - } - if (__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_4, __pyx_t_5, __pyx_t_3) : __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 901, __pyx_L1_error) + if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 906, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 901, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":904 + /* "HTSeq/_HTSeq.pyx":908 + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): * cdef SequenceWithQualities res - * res = SequenceWithQualities( - * reverse_complement(self.seq), # <<<<<<<<<<<<<< - * "revcomp_of_" + self.name, - * self._qualstr[::-1], + * if rename: # <<<<<<<<<<<<<< + * res = SequenceWithQualities( + * reverse_complement(self.seq), */ - __pyx_t_1 = __pyx_v_self->__pyx_base.seq; - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 904, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_6 = (__pyx_v_rename != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":905 - * res = SequenceWithQualities( - * reverse_complement(self.seq), - * "revcomp_of_" + self.name, # <<<<<<<<<<<<<< - * self._qualstr[::-1], - * self._qualscale) + /* "HTSeq/_HTSeq.pyx":910 + * if rename: + * res = SequenceWithQualities( + * reverse_complement(self.seq), # <<<<<<<<<<<<<< + * "revcomp_of_" + self.name, + * self._qualstr[::-1], */ - __pyx_t_1 = __Pyx_PyUnicode_ConcatSafe(__pyx_n_u_revcomp_of, __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 905, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_1 = __pyx_v_self->__pyx_base.seq; + __Pyx_INCREF(__pyx_t_1); + __pyx_t_2 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_1), 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 910, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":906 - * reverse_complement(self.seq), - * "revcomp_of_" + self.name, - * self._qualstr[::-1], # <<<<<<<<<<<<<< - * self._qualscale) - * if self._qualarr is not None: + /* "HTSeq/_HTSeq.pyx":911 + * res = SequenceWithQualities( + * reverse_complement(self.seq), + * "revcomp_of_" + self.name, # <<<<<<<<<<<<<< + * self._qualstr[::-1], + * self._qualscale) */ - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualstr, __pyx_slice__31); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 906, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_1 = __Pyx_PyUnicode_ConcatSafe(__pyx_n_u_revcomp_of, __pyx_v_self->__pyx_base.name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 911, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":903 - * cpdef SequenceWithQualities get_reverse_complement(self): + /* "HTSeq/_HTSeq.pyx":912 + * reverse_complement(self.seq), + * "revcomp_of_" + self.name, + * self._qualstr[::-1], # <<<<<<<<<<<<<< + * self._qualscale) + * else: + */ + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualstr, __pyx_slice__24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 912, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "HTSeq/_HTSeq.pyx":909 * cdef SequenceWithQualities res - * res = SequenceWithQualities( # <<<<<<<<<<<<<< - * reverse_complement(self.seq), - * "revcomp_of_" + self.name, + * if rename: + * res = SequenceWithQualities( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * "revcomp_of_" + self.name, */ - __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 903, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_3); - __Pyx_INCREF(__pyx_v_self->_qualscale); - __Pyx_GIVEREF(__pyx_v_self->_qualscale); - PyTuple_SET_ITEM(__pyx_t_4, 3, __pyx_v_self->_qualscale); - __pyx_t_2 = 0; - __pyx_t_1 = 0; - __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 903, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_v_res = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_t_4); + __Pyx_INCREF(__pyx_v_self->_qualscale); + __Pyx_GIVEREF(__pyx_v_self->_qualscale); + PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_self->_qualscale); + __pyx_t_2 = 0; + __pyx_t_1 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 909, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_v_res = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_4); + __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":908 - * self._qualstr[::-1], - * self._qualscale) + /* "HTSeq/_HTSeq.pyx":908 + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): + * cdef SequenceWithQualities res + * if rename: # <<<<<<<<<<<<<< + * res = SequenceWithQualities( + * reverse_complement(self.seq), + */ + goto __pyx_L3; + } + + /* "HTSeq/_HTSeq.pyx":915 + * self._qualscale) + * else: + * res = SequenceWithQualities( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * self.name, + */ + /*else*/ { + + /* "HTSeq/_HTSeq.pyx":916 + * else: + * res = SequenceWithQualities( + * reverse_complement(self.seq), # <<<<<<<<<<<<<< + * self.name, + * self._qualstr[::-1], + */ + __pyx_t_4 = __pyx_v_self->__pyx_base.seq; + __Pyx_INCREF(__pyx_t_4); + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq_reverse_complement(((PyObject*)__pyx_t_4), 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 916, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "HTSeq/_HTSeq.pyx":918 + * reverse_complement(self.seq), + * self.name, + * self._qualstr[::-1], # <<<<<<<<<<<<<< + * self._qualscale) + * if self._qualarr is not None: + */ + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualstr, __pyx_slice__24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 918, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + + /* "HTSeq/_HTSeq.pyx":915 + * self._qualscale) + * else: + * res = SequenceWithQualities( # <<<<<<<<<<<<<< + * reverse_complement(self.seq), + * self.name, + */ + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); + __Pyx_INCREF(__pyx_v_self->__pyx_base.name); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.name); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->__pyx_base.name); + __Pyx_GIVEREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_4); + __Pyx_INCREF(__pyx_v_self->_qualscale); + __Pyx_GIVEREF(__pyx_v_self->_qualscale); + PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->_qualscale); + __pyx_t_3 = 0; + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 915, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_v_res = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_4); + __pyx_t_4 = 0; + } + __pyx_L3:; + + /* "HTSeq/_HTSeq.pyx":920 + * self._qualstr[::-1], + * self._qualscale) * if self._qualarr is not None: # <<<<<<<<<<<<<< * res._qualarr = self._qualarr[::-1] * return res */ - __pyx_t_5 = (__pyx_v_self->_qualarr != Py_None); - __pyx_t_6 = (__pyx_t_5 != 0); - if (__pyx_t_6) { + __pyx_t_6 = (__pyx_v_self->_qualarr != Py_None); + __pyx_t_7 = (__pyx_t_6 != 0); + if (__pyx_t_7) { - /* "HTSeq/_HTSeq.pyx":909 - * self._qualscale) + /* "HTSeq/_HTSeq.pyx":921 + * self._qualscale) * if self._qualarr is not None: * res._qualarr = self._qualarr[::-1] # <<<<<<<<<<<<<< * return res * */ - __pyx_t_3 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualarr, __pyx_slice__32); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 909, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_self->_qualarr, __pyx_slice__24); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 921, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); __Pyx_GOTREF(__pyx_v_res->_qualarr); __Pyx_DECREF(__pyx_v_res->_qualarr); - __pyx_v_res->_qualarr = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_v_res->_qualarr = __pyx_t_4; + __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":908 - * self._qualstr[::-1], - * self._qualscale) + /* "HTSeq/_HTSeq.pyx":920 + * self._qualstr[::-1], + * self._qualscale) * if self._qualarr is not None: # <<<<<<<<<<<<<< * res._qualarr = self._qualarr[::-1] * return res */ } - /* "HTSeq/_HTSeq.pyx":910 + /* "HTSeq/_HTSeq.pyx":922 * if self._qualarr is not None: * res._qualarr = self._qualarr[::-1] * return res # <<<<<<<<<<<<<< @@ -22158,12 +21878,12 @@ __pyx_r = __pyx_v_res; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":901 + /* "HTSeq/_HTSeq.pyx":906 * return sio.getvalue() * - * cpdef SequenceWithQualities get_reverse_complement(self): # <<<<<<<<<<<<<< + * cpdef SequenceWithQualities get_reverse_complement(self, bint rename=True): # <<<<<<<<<<<<<< * cdef SequenceWithQualities res - * res = SequenceWithQualities( + * if rename: */ /* function exit code */ @@ -22172,6 +21892,7 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.get_reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -22182,25 +21903,74 @@ } /* Python wrapper */ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ -static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + int __pyx_v_rename; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("get_reverse_complement (wrapper)", 0); - __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self)); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rename,0}; + PyObject* values[1] = {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 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 (kw_args > 0) { + PyObject* value = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rename); + if (value) { values[0] = value; kw_args--; } + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "get_reverse_complement") < 0)) __PYX_ERR(0, 906, __pyx_L3_error) + } + } else { + switch (PyTuple_GET_SIZE(__pyx_args)) { + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + CYTHON_FALLTHROUGH; + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + } + if (values[0]) { + __pyx_v_rename = __Pyx_PyObject_IsTrue(values[0]); if (unlikely((__pyx_v_rename == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 906, __pyx_L3_error) + } else { + __pyx_v_rename = ((int)1); + } + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("get_reverse_complement", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 906, __pyx_L3_error) + __pyx_L3_error:; + __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.get_reverse_complement", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), __pyx_v_rename); /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self) { +static PyObject *__pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_10get_reverse_complement(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_v_rename) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; + struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement __pyx_t_2; __Pyx_RefNannySetupContext("get_reverse_complement", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(__pyx_v_self, 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error) + __pyx_t_2.__pyx_n = 1; + __pyx_t_2.rename = __pyx_v_rename; + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->get_reverse_complement(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22217,11 +21987,11 @@ return __pyx_r; } -struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch) { - return __pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(__pyx_v_self, __pyx_skip_dispatch); +struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args) { + return __pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement(__pyx_v_self, __pyx_skip_dispatch, __pyx_optional_args); } -/* "HTSeq/_HTSeq.pyx":912 +/* "HTSeq/_HTSeq.pyx":924 * return res * * cpdef object add_qual_to_count_array(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -22247,16 +22017,15 @@ PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_t_5; int __pyx_t_6; - int __pyx_t_7; + npy_intp __pyx_t_7; npy_intp __pyx_t_8; npy_intp __pyx_t_9; - npy_intp __pyx_t_10; - Py_ssize_t __pyx_t_11; - int __pyx_t_12; + Py_ssize_t __pyx_t_10; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; Py_ssize_t __pyx_t_13; - Py_ssize_t __pyx_t_14; __Pyx_RefNannySetupContext("add_qual_to_count_array", 0); __pyx_pybuffer_count_array.pybuffer.buf = NULL; __pyx_pybuffer_count_array.refcount = 0; @@ -22269,64 +22038,52 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_qual_to_count_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_13add_qual_to_count_array)) { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; - if (CYTHON_UNPACK_METHODS && unlikely(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); + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + #endif + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_add_qual_to_count_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_13add_qual_to_count_array)) { + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL; + if (CYTHON_UNPACK_METHODS && unlikely(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); + } } - } - if (!__pyx_t_4) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_count_array_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_2 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_4, ((PyObject *)__pyx_v_count_array_)) : __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_count_array_)); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_count_array_)}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, ((PyObject *)__pyx_v_count_array_)}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_2); - } else - #endif - { - __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(((PyObject *)__pyx_v_count_array_)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_count_array_)); - PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_count_array_)); - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":915 + /* "HTSeq/_HTSeq.pyx":927 * numpy.ndarray count_array_): * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ # <<<<<<<<<<<<<< @@ -22337,36 +22094,36 @@ __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_count_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_v_count_array_), &__Pyx_TypeInfo_nn___pyx_t_5numpy_int_t, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 2, 0, __pyx_stack) == -1)) { __pyx_v_count_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 915, __pyx_L1_error) + __PYX_ERR(0, 927, __pyx_L1_error) } else {__pyx_pybuffernd_count_array.diminfo[0].strides = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_count_array.diminfo[0].shape = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.shape[0]; __pyx_pybuffernd_count_array.diminfo[1].strides = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.strides[1]; __pyx_pybuffernd_count_array.diminfo[1].shape = __pyx_pybuffernd_count_array.rcbuffer->pybuffer.shape[1]; } } __Pyx_INCREF(((PyObject *)__pyx_v_count_array_)); __pyx_v_count_array = ((PyArrayObject *)__pyx_v_count_array_); - /* "HTSeq/_HTSeq.pyx":916 + /* "HTSeq/_HTSeq.pyx":928 * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ * if self._qualarr is None: # <<<<<<<<<<<<<< * self._fill_qual_arr() * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr */ - __pyx_t_6 = (__pyx_v_self->_qualarr == Py_None); - __pyx_t_7 = (__pyx_t_6 != 0); - if (__pyx_t_7) { + __pyx_t_5 = (__pyx_v_self->_qualarr == Py_None); + __pyx_t_6 = (__pyx_t_5 != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":917 + /* "HTSeq/_HTSeq.pyx":929 * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr * */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":916 + /* "HTSeq/_HTSeq.pyx":928 * * cdef numpy.ndarray[numpy.int_t, ndim = 2] count_array = count_array_ * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -22375,28 +22132,28 @@ */ } - /* "HTSeq/_HTSeq.pyx":918 + /* "HTSeq/_HTSeq.pyx":930 * if self._qualarr is None: * self._fill_qual_arr() * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr # <<<<<<<<<<<<<< * * cdef numpy.npy_intp seq_length = numpy.PyArray_DIMS(qual_array)[0] */ - if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 918, __pyx_L1_error) + if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 930, __pyx_L1_error) __pyx_t_1 = __pyx_v_self->_qualarr; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_qual_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_qual_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 918, __pyx_L1_error) + __PYX_ERR(0, 930, __pyx_L1_error) } else {__pyx_pybuffernd_qual_array.diminfo[0].strides = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qual_array.diminfo[0].shape = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.shape[0]; } } __pyx_v_qual_array = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":920 + /* "HTSeq/_HTSeq.pyx":932 * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr * * cdef numpy.npy_intp seq_length = numpy.PyArray_DIMS(qual_array)[0] # <<<<<<<<<<<<<< @@ -22405,7 +22162,7 @@ */ __pyx_v_seq_length = (PyArray_DIMS(((PyArrayObject *)__pyx_v_qual_array))[0]); - /* "HTSeq/_HTSeq.pyx":921 + /* "HTSeq/_HTSeq.pyx":933 * * cdef numpy.npy_intp seq_length = numpy.PyArray_DIMS(qual_array)[0] * cdef numpy.npy_intp qual_size = numpy.PyArray_DIMS(count_array)[1] # <<<<<<<<<<<<<< @@ -22414,17 +22171,17 @@ */ __pyx_v_qual_size = (PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[1]); - /* "HTSeq/_HTSeq.pyx":923 + /* "HTSeq/_HTSeq.pyx":935 * cdef numpy.npy_intp qual_size = numpy.PyArray_DIMS(count_array)[1] * * if seq_length > numpy.PyArray_DIMS(count_array)[0]: # <<<<<<<<<<<<<< * raise ValueError, "'count_array' too small for sequence." * */ - __pyx_t_7 = ((__pyx_v_seq_length > (PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[0])) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = ((__pyx_v_seq_length > (PyArray_DIMS(((PyArrayObject *)__pyx_v_count_array))[0])) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":924 + /* "HTSeq/_HTSeq.pyx":936 * * if seq_length > numpy.PyArray_DIMS(count_array)[0]: * raise ValueError, "'count_array' too small for sequence." # <<<<<<<<<<<<<< @@ -22432,9 +22189,9 @@ * cdef numpy.npy_intp i */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_count_array_too_small_for_seque, 0, 0); - __PYX_ERR(0, 924, __pyx_L1_error) + __PYX_ERR(0, 936, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":923 + /* "HTSeq/_HTSeq.pyx":935 * cdef numpy.npy_intp qual_size = numpy.PyArray_DIMS(count_array)[1] * * if seq_length > numpy.PyArray_DIMS(count_array)[0]: # <<<<<<<<<<<<<< @@ -22443,48 +22200,48 @@ */ } - /* "HTSeq/_HTSeq.pyx":928 + /* "HTSeq/_HTSeq.pyx":940 * cdef numpy.npy_intp i * cdef numpy.npy_int q * for i in range(seq_length): # <<<<<<<<<<<<<< * q = qual_array[i] * if(q >= qual_size): */ - __pyx_t_8 = __pyx_v_seq_length; - __pyx_t_9 = __pyx_t_8; - for (__pyx_t_10 = 0; __pyx_t_10 < __pyx_t_9; __pyx_t_10+=1) { - __pyx_v_i = __pyx_t_10; + __pyx_t_7 = __pyx_v_seq_length; + __pyx_t_8 = __pyx_t_7; + for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { + __pyx_v_i = __pyx_t_9; - /* "HTSeq/_HTSeq.pyx":929 + /* "HTSeq/_HTSeq.pyx":941 * cdef numpy.npy_int q * for i in range(seq_length): * q = qual_array[i] # <<<<<<<<<<<<<< * if(q >= qual_size): * raise ValueError, "Too large quality value encountered." */ - __pyx_t_11 = __pyx_v_i; - __pyx_t_12 = -1; - if (__pyx_t_11 < 0) { - __pyx_t_11 += __pyx_pybuffernd_qual_array.diminfo[0].shape; - if (unlikely(__pyx_t_11 < 0)) __pyx_t_12 = 0; - } else if (unlikely(__pyx_t_11 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_12 = 0; - if (unlikely(__pyx_t_12 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_12); - __PYX_ERR(0, 929, __pyx_L1_error) + __pyx_t_10 = __pyx_v_i; + __pyx_t_11 = -1; + if (__pyx_t_10 < 0) { + __pyx_t_10 += __pyx_pybuffernd_qual_array.diminfo[0].shape; + if (unlikely(__pyx_t_10 < 0)) __pyx_t_11 = 0; + } else if (unlikely(__pyx_t_10 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_11 = 0; + if (unlikely(__pyx_t_11 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_11); + __PYX_ERR(0, 941, __pyx_L1_error) } - __pyx_v_q = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_11, __pyx_pybuffernd_qual_array.diminfo[0].strides)); + __pyx_v_q = (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_10, __pyx_pybuffernd_qual_array.diminfo[0].strides)); - /* "HTSeq/_HTSeq.pyx":930 + /* "HTSeq/_HTSeq.pyx":942 * for i in range(seq_length): * q = qual_array[i] * if(q >= qual_size): # <<<<<<<<<<<<<< * raise ValueError, "Too large quality value encountered." * count_array[i, q] += 1 */ - __pyx_t_7 = ((__pyx_v_q >= __pyx_v_qual_size) != 0); - if (unlikely(__pyx_t_7)) { + __pyx_t_6 = ((__pyx_v_q >= __pyx_v_qual_size) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":931 + /* "HTSeq/_HTSeq.pyx":943 * q = qual_array[i] * if(q >= qual_size): * raise ValueError, "Too large quality value encountered." # <<<<<<<<<<<<<< @@ -22492,9 +22249,9 @@ * */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Too_large_quality_value_encounte, 0, 0); - __PYX_ERR(0, 931, __pyx_L1_error) + __PYX_ERR(0, 943, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":930 + /* "HTSeq/_HTSeq.pyx":942 * for i in range(seq_length): * q = qual_array[i] * if(q >= qual_size): # <<<<<<<<<<<<<< @@ -22503,32 +22260,32 @@ */ } - /* "HTSeq/_HTSeq.pyx":932 + /* "HTSeq/_HTSeq.pyx":944 * if(q >= qual_size): * raise ValueError, "Too large quality value encountered." * count_array[i, q] += 1 # <<<<<<<<<<<<<< * * return None */ - __pyx_t_13 = __pyx_v_i; - __pyx_t_14 = __pyx_v_q; - __pyx_t_12 = -1; + __pyx_t_12 = __pyx_v_i; + __pyx_t_13 = __pyx_v_q; + __pyx_t_11 = -1; + if (__pyx_t_12 < 0) { + __pyx_t_12 += __pyx_pybuffernd_count_array.diminfo[0].shape; + if (unlikely(__pyx_t_12 < 0)) __pyx_t_11 = 0; + } else if (unlikely(__pyx_t_12 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_11 = 0; if (__pyx_t_13 < 0) { - __pyx_t_13 += __pyx_pybuffernd_count_array.diminfo[0].shape; - if (unlikely(__pyx_t_13 < 0)) __pyx_t_12 = 0; - } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_count_array.diminfo[0].shape)) __pyx_t_12 = 0; - if (__pyx_t_14 < 0) { - __pyx_t_14 += __pyx_pybuffernd_count_array.diminfo[1].shape; - if (unlikely(__pyx_t_14 < 0)) __pyx_t_12 = 1; - } else if (unlikely(__pyx_t_14 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_12 = 1; - if (unlikely(__pyx_t_12 != -1)) { - __Pyx_RaiseBufferIndexError(__pyx_t_12); - __PYX_ERR(0, 932, __pyx_L1_error) + __pyx_t_13 += __pyx_pybuffernd_count_array.diminfo[1].shape; + if (unlikely(__pyx_t_13 < 0)) __pyx_t_11 = 1; + } else if (unlikely(__pyx_t_13 >= __pyx_pybuffernd_count_array.diminfo[1].shape)) __pyx_t_11 = 1; + if (unlikely(__pyx_t_11 != -1)) { + __Pyx_RaiseBufferIndexError(__pyx_t_11); + __PYX_ERR(0, 944, __pyx_L1_error) } - *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_13, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_14, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; + *__Pyx_BufPtrStrided2d(__pyx_t_5numpy_int_t *, __pyx_pybuffernd_count_array.rcbuffer->pybuffer.buf, __pyx_t_12, __pyx_pybuffernd_count_array.diminfo[0].strides, __pyx_t_13, __pyx_pybuffernd_count_array.diminfo[1].strides) += 1; } - /* "HTSeq/_HTSeq.pyx":934 + /* "HTSeq/_HTSeq.pyx":946 * count_array[i, q] += 1 * * return None # <<<<<<<<<<<<<< @@ -22539,7 +22296,7 @@ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":912 + /* "HTSeq/_HTSeq.pyx":924 * return res * * cpdef object add_qual_to_count_array(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -22553,7 +22310,6 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign @@ -22581,7 +22337,7 @@ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("add_qual_to_count_array (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_count_array_), __pyx_ptype_5numpy_ndarray, 1, "count_array_", 0))) __PYX_ERR(0, 913, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_count_array_), __pyx_ptype_5numpy_ndarray, 1, "count_array_", 0))) __PYX_ERR(0, 925, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_12add_qual_to_count_array(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), ((PyArrayObject *)__pyx_v_count_array_)); /* function exit code */ @@ -22599,7 +22355,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("add_qual_to_count_array", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_add_qual_to_count_array(__pyx_v_self, __pyx_v_count_array_, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_add_qual_to_count_array(__pyx_v_self, __pyx_v_count_array_, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 924, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -22616,7 +22372,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":936 +/* "HTSeq/_HTSeq.pyx":948 * return None * * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -22673,71 +22429,87 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_left_end_with_quals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_15trim_left_end_with_quals)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_mm_qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 936, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 936, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 936, __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 + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 936, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_left_end_with_quals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_15trim_left_end_with_quals)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_mm_qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } } - __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); - __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, 936, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 948, __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 + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 948, __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, 948, __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; + } + __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); + __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, 948, __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_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 948, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 936, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":938 + /* "HTSeq/_HTSeq.pyx":950 * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, * Sequence pattern, int max_mm_qual=5): * cdef int seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -22748,13 +22520,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, 938, __pyx_L1_error) + __PYX_ERR(0, 950, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 938, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 950, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seqlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":939 + /* "HTSeq/_HTSeq.pyx":951 * Sequence pattern, int max_mm_qual=5): * cdef int seqlen = len(self.seq) * cdef int patlen = len(pattern.seq) # <<<<<<<<<<<<<< @@ -22765,13 +22537,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, 939, __pyx_L1_error) + __PYX_ERR(0, 951, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 939, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 951, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_patlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":941 + /* "HTSeq/_HTSeq.pyx":953 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -22781,7 +22553,7 @@ __pyx_t_9 = ((__pyx_v_seqlen < __pyx_v_patlen) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":942 + /* "HTSeq/_HTSeq.pyx":954 * cdef int minlen * if seqlen < patlen: * minlen = seqlen # <<<<<<<<<<<<<< @@ -22790,7 +22562,7 @@ */ __pyx_v_minlen = __pyx_v_seqlen; - /* "HTSeq/_HTSeq.pyx":941 + /* "HTSeq/_HTSeq.pyx":953 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -22800,7 +22572,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":944 + /* "HTSeq/_HTSeq.pyx":956 * minlen = seqlen * else: * minlen = patlen # <<<<<<<<<<<<<< @@ -22812,7 +22584,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":945 + /* "HTSeq/_HTSeq.pyx":957 * else: * minlen = patlen * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -22821,12 +22593,12 @@ */ if (unlikely(__pyx_v_self->__pyx_base.seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 945, __pyx_L1_error) + __PYX_ERR(0, 957, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->__pyx_base.seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 945, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->__pyx_base.seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 957, __pyx_L1_error) __pyx_v_seq_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":946 + /* "HTSeq/_HTSeq.pyx":958 * minlen = patlen * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq # <<<<<<<<<<<<<< @@ -22835,12 +22607,12 @@ */ if (unlikely(__pyx_v_pattern->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 946, __pyx_L1_error) + __PYX_ERR(0, 958, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 946, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 958, __pyx_L1_error) __pyx_v_pat_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":947 + /* "HTSeq/_HTSeq.pyx":959 * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq * cdef int match = 0 # <<<<<<<<<<<<<< @@ -22849,7 +22621,7 @@ */ __pyx_v_match = 0; - /* "HTSeq/_HTSeq.pyx":950 + /* "HTSeq/_HTSeq.pyx":962 * cdef int i, j * cdef int sum_mm_qual * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -22860,18 +22632,18 @@ __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":951 + /* "HTSeq/_HTSeq.pyx":963 * cdef int sum_mm_qual * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr * for i in range(1, minlen + 1): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 951, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 963, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":950 + /* "HTSeq/_HTSeq.pyx":962 * cdef int i, j * cdef int sum_mm_qual * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -22880,28 +22652,28 @@ */ } - /* "HTSeq/_HTSeq.pyx":952 + /* "HTSeq/_HTSeq.pyx":964 * if self._qualarr is None: * self._fill_qual_arr() * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr # <<<<<<<<<<<<<< * for i in range(1, minlen + 1): * num_mismatches = 0 */ - if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 952, __pyx_L1_error) + if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 964, __pyx_L1_error) __pyx_t_1 = __pyx_v_self->_qualarr; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_qual_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_qual_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 952, __pyx_L1_error) + __PYX_ERR(0, 964, __pyx_L1_error) } else {__pyx_pybuffernd_qual_array.diminfo[0].strides = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qual_array.diminfo[0].shape = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.shape[0]; } } __pyx_v_qual_array = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":953 + /* "HTSeq/_HTSeq.pyx":965 * self._fill_qual_arr() * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr * for i in range(1, minlen + 1): # <<<<<<<<<<<<<< @@ -22913,7 +22685,7 @@ for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_13; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "HTSeq/_HTSeq.pyx":954 + /* "HTSeq/_HTSeq.pyx":966 * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr * for i in range(1, minlen + 1): * num_mismatches = 0 # <<<<<<<<<<<<<< @@ -22922,7 +22694,7 @@ */ __pyx_v_num_mismatches = 0; - /* "HTSeq/_HTSeq.pyx":955 + /* "HTSeq/_HTSeq.pyx":967 * for i in range(1, minlen + 1): * num_mismatches = 0 * for j in range(i): # <<<<<<<<<<<<<< @@ -22934,7 +22706,7 @@ for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "HTSeq/_HTSeq.pyx":956 + /* "HTSeq/_HTSeq.pyx":968 * num_mismatches = 0 * for j in range(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: # <<<<<<<<<<<<<< @@ -22944,7 +22716,7 @@ __pyx_t_11 = (((__pyx_v_seq_cstr[__pyx_v_j]) != (__pyx_v_pat_cstr[((__pyx_v_patlen - __pyx_v_i) + __pyx_v_j)])) != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":957 + /* "HTSeq/_HTSeq.pyx":969 * for j in range(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: * sum_mm_qual += qual_array[j] # <<<<<<<<<<<<<< @@ -22959,11 +22731,11 @@ } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_18 = 0; if (unlikely(__pyx_t_18 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_18); - __PYX_ERR(0, 957, __pyx_L1_error) + __PYX_ERR(0, 969, __pyx_L1_error) } __pyx_v_sum_mm_qual = (__pyx_v_sum_mm_qual + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_qual_array.diminfo[0].strides))); - /* "HTSeq/_HTSeq.pyx":958 + /* "HTSeq/_HTSeq.pyx":970 * if seq_cstr[j] != pat_cstr[patlen - i + j]: * sum_mm_qual += qual_array[j] * if sum_mm_qual > max_mm_qual: # <<<<<<<<<<<<<< @@ -22973,7 +22745,7 @@ __pyx_t_11 = ((__pyx_v_sum_mm_qual > __pyx_v_max_mm_qual) != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":959 + /* "HTSeq/_HTSeq.pyx":971 * sum_mm_qual += qual_array[j] * if sum_mm_qual > max_mm_qual: * break # <<<<<<<<<<<<<< @@ -22982,7 +22754,7 @@ */ goto __pyx_L8_break; - /* "HTSeq/_HTSeq.pyx":958 + /* "HTSeq/_HTSeq.pyx":970 * if seq_cstr[j] != pat_cstr[patlen - i + j]: * sum_mm_qual += qual_array[j] * if sum_mm_qual > max_mm_qual: # <<<<<<<<<<<<<< @@ -22991,7 +22763,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":956 + /* "HTSeq/_HTSeq.pyx":968 * num_mismatches = 0 * for j in range(i): * if seq_cstr[j] != pat_cstr[patlen - i + j]: # <<<<<<<<<<<<<< @@ -23002,7 +22774,7 @@ } /*else*/ { - /* "HTSeq/_HTSeq.pyx":961 + /* "HTSeq/_HTSeq.pyx":973 * break * else: * match = i # <<<<<<<<<<<<<< @@ -23014,7 +22786,7 @@ __pyx_L8_break:; } - /* "HTSeq/_HTSeq.pyx":962 + /* "HTSeq/_HTSeq.pyx":974 * else: * match = i * return self[match: seqlen] # <<<<<<<<<<<<<< @@ -23022,14 +22794,14 @@ * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), __pyx_v_match, __pyx_v_seqlen, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 962, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), __pyx_v_match, __pyx_v_seqlen, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 974, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 962, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 974, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":936 + /* "HTSeq/_HTSeq.pyx":948 * return None * * cpdef SequenceWithQualities trim_left_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -23098,7 +22870,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_left_end_with_quals") < 0)) __PYX_ERR(0, 936, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_left_end_with_quals") < 0)) __PYX_ERR(0, 948, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -23111,20 +22883,20 @@ } __pyx_v_pattern = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)values[0]); if (values[1]) { - __pyx_v_max_mm_qual = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_max_mm_qual == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 937, __pyx_L3_error) + __pyx_v_max_mm_qual = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_max_mm_qual == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 949, __pyx_L3_error) } else { __pyx_v_max_mm_qual = ((int)5); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trim_left_end_with_quals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 936, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trim_left_end_with_quals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 948, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.trim_left_end_with_quals", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 937, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 949, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_14trim_left_end_with_quals(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), __pyx_v_pattern, __pyx_v_max_mm_qual); /* function exit code */ @@ -23145,7 +22917,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.max_mm_qual = __pyx_v_max_mm_qual; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->trim_left_end_with_quals(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->trim_left_end_with_quals(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 948, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23162,7 +22934,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":964 +/* "HTSeq/_HTSeq.pyx":976 * return self[match: seqlen] * * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -23218,71 +22990,87 @@ /* Check if called by wrapper */ if (unlikely(__pyx_skip_dispatch)) ; /* Check if overridden in Python */ - else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) { - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_right_end_with_quals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_17trim_right_end_with_quals)) { - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_mm_qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 964, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; - __pyx_t_6 = 0; - if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_4, function); - __pyx_t_6 = 1; - } - } - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 964, __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 - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { - PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 964, __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 + else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || (Py_TYPE(((PyObject *)__pyx_v_self))->tp_flags & (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) { + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + static PY_UINT64_T tp_dict_version = 0, obj_dict_version = 0; + if (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict && tp_dict_version == __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) && (!Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset || obj_dict_version == __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self)))))); + else { + PY_UINT64_T type_dict_guard = (likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict)) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; #endif - { - __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 964, __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; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_trim_right_end_with_quals); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)(void*)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_17trim_right_end_with_quals)) { + __Pyx_XDECREF(((PyObject *)__pyx_r)); + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_max_mm_qual); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 976, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(__pyx_t_1); + __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL; + __pyx_t_6 = 0; + if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4); + if (likely(__pyx_t_5)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4); + __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_4, function); + __pyx_t_6 = 1; + } } - __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); - PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); - __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, 964, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 976, __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 + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) { + PyObject *__pyx_temp[3] = {__pyx_t_5, ((PyObject *)__pyx_v_pattern), __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, 976, __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, 976, __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; + } + __Pyx_INCREF(((PyObject *)__pyx_v_pattern)); + __Pyx_GIVEREF(((PyObject *)__pyx_v_pattern)); + PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, ((PyObject *)__pyx_v_pattern)); + __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, 976, __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_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 976, __pyx_L1_error) + __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); + __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + goto __pyx_L0; } - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 964, __pyx_L1_error) - __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_2); - __pyx_t_2 = 0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP + tp_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) ? __PYX_GET_DICT_VERSION(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dict) : 0; + obj_dict_version = likely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset) ? __PYX_GET_DICT_VERSION(_PyObject_GetDictPtr(((PyObject *)__pyx_v_self))) : 0; + if (unlikely(type_dict_guard != tp_dict_version)) { + tp_dict_version = obj_dict_version = 0; + } + #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - goto __pyx_L0; + #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + #endif } - /* "HTSeq/_HTSeq.pyx":966 + /* "HTSeq/_HTSeq.pyx":978 * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, * Sequence pattern, int max_mm_qual=5): * cdef int seqlen = len(self.seq) # <<<<<<<<<<<<<< @@ -23293,13 +23081,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, 966, __pyx_L1_error) + __PYX_ERR(0, 978, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 966, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 978, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_seqlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":967 + /* "HTSeq/_HTSeq.pyx":979 * Sequence pattern, int max_mm_qual=5): * cdef int seqlen = len(self.seq) * cdef int patlen = len(pattern.seq) # <<<<<<<<<<<<<< @@ -23310,13 +23098,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, 967, __pyx_L1_error) + __PYX_ERR(0, 979, __pyx_L1_error) } - __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 967, __pyx_L1_error) + __pyx_t_8 = PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 979, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_patlen = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":969 + /* "HTSeq/_HTSeq.pyx":981 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -23326,7 +23114,7 @@ __pyx_t_9 = ((__pyx_v_seqlen < __pyx_v_patlen) != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":970 + /* "HTSeq/_HTSeq.pyx":982 * cdef int minlen * if seqlen < patlen: * minlen = seqlen # <<<<<<<<<<<<<< @@ -23335,7 +23123,7 @@ */ __pyx_v_minlen = __pyx_v_seqlen; - /* "HTSeq/_HTSeq.pyx":969 + /* "HTSeq/_HTSeq.pyx":981 * cdef int patlen = len(pattern.seq) * cdef int minlen * if seqlen < patlen: # <<<<<<<<<<<<<< @@ -23345,7 +23133,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":972 + /* "HTSeq/_HTSeq.pyx":984 * minlen = seqlen * else: * minlen = patlen # <<<<<<<<<<<<<< @@ -23357,7 +23145,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":973 + /* "HTSeq/_HTSeq.pyx":985 * else: * minlen = patlen * cdef char * seq_cstr = self.seq # <<<<<<<<<<<<<< @@ -23366,12 +23154,12 @@ */ if (unlikely(__pyx_v_self->__pyx_base.seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 973, __pyx_L1_error) + __PYX_ERR(0, 985, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->__pyx_base.seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 973, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_self->__pyx_base.seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 985, __pyx_L1_error) __pyx_v_seq_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":974 + /* "HTSeq/_HTSeq.pyx":986 * minlen = patlen * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq # <<<<<<<<<<<<<< @@ -23380,12 +23168,12 @@ */ if (unlikely(__pyx_v_pattern->seq == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 974, __pyx_L1_error) + __PYX_ERR(0, 986, __pyx_L1_error) } - __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 974, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyBytes_AsWritableString(__pyx_v_pattern->seq); if (unlikely((!__pyx_t_10) && PyErr_Occurred())) __PYX_ERR(0, 986, __pyx_L1_error) __pyx_v_pat_cstr = __pyx_t_10; - /* "HTSeq/_HTSeq.pyx":975 + /* "HTSeq/_HTSeq.pyx":987 * cdef char * seq_cstr = self.seq * cdef char * pat_cstr = pattern.seq * cdef int match = 0 # <<<<<<<<<<<<<< @@ -23394,7 +23182,7 @@ */ __pyx_v_match = 0; - /* "HTSeq/_HTSeq.pyx":978 + /* "HTSeq/_HTSeq.pyx":990 * cdef int i, j * cdef int sum_mm_qual * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -23405,18 +23193,18 @@ __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":979 + /* "HTSeq/_HTSeq.pyx":991 * cdef int sum_mm_qual * if self._qualarr is None: * self._fill_qual_arr() # <<<<<<<<<<<<<< * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr * for i in range(1, minlen + 1): */ - __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 979, __pyx_L1_error) + __pyx_t_1 = ((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->__pyx_base.__pyx_vtab)->_fill_qual_arr(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 991, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":978 + /* "HTSeq/_HTSeq.pyx":990 * cdef int i, j * cdef int sum_mm_qual * if self._qualarr is None: # <<<<<<<<<<<<<< @@ -23425,28 +23213,28 @@ */ } - /* "HTSeq/_HTSeq.pyx":980 + /* "HTSeq/_HTSeq.pyx":992 * if self._qualarr is None: * self._fill_qual_arr() * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr # <<<<<<<<<<<<<< * for i in range(1, minlen + 1): * sum_mm_qual = 0 */ - if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 980, __pyx_L1_error) + if (!(likely(((__pyx_v_self->_qualarr) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_self->_qualarr, __pyx_ptype_5numpy_ndarray))))) __PYX_ERR(0, 992, __pyx_L1_error) __pyx_t_1 = __pyx_v_self->_qualarr; __Pyx_INCREF(__pyx_t_1); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_qual_array.rcbuffer->pybuffer, (PyObject*)((PyArrayObject *)__pyx_t_1), &__Pyx_TypeInfo_nn___pyx_t_5numpy_uint8_t, PyBUF_FORMAT| PyBUF_STRIDES, 1, 0, __pyx_stack) == -1)) { __pyx_v_qual_array = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf = NULL; - __PYX_ERR(0, 980, __pyx_L1_error) + __PYX_ERR(0, 992, __pyx_L1_error) } else {__pyx_pybuffernd_qual_array.diminfo[0].strides = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_qual_array.diminfo[0].shape = __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.shape[0]; } } __pyx_v_qual_array = ((PyArrayObject *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":981 + /* "HTSeq/_HTSeq.pyx":993 * self._fill_qual_arr() * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr * for i in range(1, minlen + 1): # <<<<<<<<<<<<<< @@ -23458,7 +23246,7 @@ for (__pyx_t_6 = 1; __pyx_t_6 < __pyx_t_13; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "HTSeq/_HTSeq.pyx":982 + /* "HTSeq/_HTSeq.pyx":994 * cdef numpy.ndarray[numpy.uint8_t, ndim = 1] qual_array = self._qualarr * for i in range(1, minlen + 1): * sum_mm_qual = 0 # <<<<<<<<<<<<<< @@ -23467,7 +23255,7 @@ */ __pyx_v_sum_mm_qual = 0; - /* "HTSeq/_HTSeq.pyx":983 + /* "HTSeq/_HTSeq.pyx":995 * for i in range(1, minlen + 1): * sum_mm_qual = 0 * for j in range(i): # <<<<<<<<<<<<<< @@ -23479,7 +23267,7 @@ for (__pyx_t_16 = 0; __pyx_t_16 < __pyx_t_15; __pyx_t_16+=1) { __pyx_v_j = __pyx_t_16; - /* "HTSeq/_HTSeq.pyx":984 + /* "HTSeq/_HTSeq.pyx":996 * sum_mm_qual = 0 * for j in range(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: # <<<<<<<<<<<<<< @@ -23489,7 +23277,7 @@ __pyx_t_11 = (((__pyx_v_seq_cstr[((__pyx_v_seqlen - __pyx_v_i) + __pyx_v_j)]) != (__pyx_v_pat_cstr[__pyx_v_j])) != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":985 + /* "HTSeq/_HTSeq.pyx":997 * for j in range(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * sum_mm_qual += qual_array[seqlen - i + j] # <<<<<<<<<<<<<< @@ -23504,11 +23292,11 @@ } else if (unlikely(__pyx_t_17 >= __pyx_pybuffernd_qual_array.diminfo[0].shape)) __pyx_t_18 = 0; if (unlikely(__pyx_t_18 != -1)) { __Pyx_RaiseBufferIndexError(__pyx_t_18); - __PYX_ERR(0, 985, __pyx_L1_error) + __PYX_ERR(0, 997, __pyx_L1_error) } __pyx_v_sum_mm_qual = (__pyx_v_sum_mm_qual + (*__Pyx_BufPtrStrided1d(__pyx_t_5numpy_uint8_t *, __pyx_pybuffernd_qual_array.rcbuffer->pybuffer.buf, __pyx_t_17, __pyx_pybuffernd_qual_array.diminfo[0].strides))); - /* "HTSeq/_HTSeq.pyx":986 + /* "HTSeq/_HTSeq.pyx":998 * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * sum_mm_qual += qual_array[seqlen - i + j] * if sum_mm_qual > max_mm_qual: # <<<<<<<<<<<<<< @@ -23518,7 +23306,7 @@ __pyx_t_11 = ((__pyx_v_sum_mm_qual > __pyx_v_max_mm_qual) != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":987 + /* "HTSeq/_HTSeq.pyx":999 * sum_mm_qual += qual_array[seqlen - i + j] * if sum_mm_qual > max_mm_qual: * break # <<<<<<<<<<<<<< @@ -23527,7 +23315,7 @@ */ goto __pyx_L8_break; - /* "HTSeq/_HTSeq.pyx":986 + /* "HTSeq/_HTSeq.pyx":998 * if seq_cstr[seqlen - i + j] != pat_cstr[j]: * sum_mm_qual += qual_array[seqlen - i + j] * if sum_mm_qual > max_mm_qual: # <<<<<<<<<<<<<< @@ -23536,7 +23324,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":984 + /* "HTSeq/_HTSeq.pyx":996 * sum_mm_qual = 0 * for j in range(i): * if seq_cstr[seqlen - i + j] != pat_cstr[j]: # <<<<<<<<<<<<<< @@ -23547,7 +23335,7 @@ } /*else*/ { - /* "HTSeq/_HTSeq.pyx":989 + /* "HTSeq/_HTSeq.pyx":1001 * break * else: * match = i # <<<<<<<<<<<<<< @@ -23559,7 +23347,7 @@ __pyx_L8_break:; } - /* "HTSeq/_HTSeq.pyx":990 + /* "HTSeq/_HTSeq.pyx":1002 * else: * match = i * return self[0: seqlen - match] # <<<<<<<<<<<<<< @@ -23567,14 +23355,14 @@ * */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), 0, (__pyx_v_seqlen - __pyx_v_match), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 990, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_self), 0, (__pyx_v_seqlen - __pyx_v_match), NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1002, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 990, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 1002, __pyx_L1_error) __pyx_r = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":964 + /* "HTSeq/_HTSeq.pyx":976 * return self[match: seqlen] * * cpdef SequenceWithQualities trim_right_end_with_quals(SequenceWithQualities self, # <<<<<<<<<<<<<< @@ -23643,7 +23431,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_right_end_with_quals") < 0)) __PYX_ERR(0, 964, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "trim_right_end_with_quals") < 0)) __PYX_ERR(0, 976, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -23656,20 +23444,20 @@ } __pyx_v_pattern = ((struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *)values[0]); if (values[1]) { - __pyx_v_max_mm_qual = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_max_mm_qual == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 965, __pyx_L3_error) + __pyx_v_max_mm_qual = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_max_mm_qual == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 977, __pyx_L3_error) } else { __pyx_v_max_mm_qual = ((int)5); } } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("trim_right_end_with_quals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 964, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("trim_right_end_with_quals", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 976, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SequenceWithQualities.trim_right_end_with_quals", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 965, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_pattern), __pyx_ptype_5HTSeq_6_HTSeq_Sequence, 1, "pattern", 0))) __PYX_ERR(0, 977, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_21SequenceWithQualities_16trim_right_end_with_quals(((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self), __pyx_v_pattern, __pyx_v_max_mm_qual); /* function exit code */ @@ -23690,7 +23478,7 @@ __Pyx_XDECREF(__pyx_r); __pyx_t_2.__pyx_n = 1; __pyx_t_2.max_mm_qual = __pyx_v_max_mm_qual; - __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->trim_right_end_with_quals(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 964, __pyx_L1_error) + __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities->trim_right_end_with_quals(__pyx_v_self, __pyx_v_pattern, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -23709,7 +23497,7 @@ /* "HTSeq/_HTSeq.pxd":30 * - * cdef class SequenceWithQualities( Sequence ): + * cdef class SequenceWithQualities(Sequence): * cdef readonly bytes _qualstr # <<<<<<<<<<<<<< * cdef readonly bytes _qualstr_phred * cdef readonly str _qualscale @@ -23745,7 +23533,7 @@ } /* "HTSeq/_HTSeq.pxd":31 - * cdef class SequenceWithQualities( Sequence ): + * cdef class SequenceWithQualities(Sequence): * cdef readonly bytes _qualstr * cdef readonly bytes _qualstr_phred # <<<<<<<<<<<<<< * cdef readonly str _qualscale @@ -23786,7 +23574,7 @@ * cdef readonly bytes _qualstr_phred * cdef readonly str _qualscale # <<<<<<<<<<<<<< * cdef readonly object _qualarr - * cdef _fill_qual_arr( SequenceWithQualities self ) + * cdef _fill_qual_arr(SequenceWithQualities self) */ /* Python wrapper */ @@ -23822,8 +23610,8 @@ * cdef readonly bytes _qualstr_phred * cdef readonly str _qualscale * cdef readonly object _qualarr # <<<<<<<<<<<<<< - * cdef _fill_qual_arr( SequenceWithQualities self ) - * cpdef object add_qual_to_count_array( SequenceWithQualities self, numpy.ndarray count_array_ ) + * cdef _fill_qual_arr(SequenceWithQualities self) + * cpdef object add_qual_to_count_array(SequenceWithQualities self, numpy.ndarray count_array_) */ /* Python wrapper */ @@ -23855,7 +23643,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1008 +/* "HTSeq/_HTSeq.pyx":1020 * """ * * def __init__(self, read, iv): # <<<<<<<<<<<<<< @@ -23894,11 +23682,11 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iv)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1008, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1020, __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, 1008, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1020, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -23911,7 +23699,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1008, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1020, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.Alignment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -23930,14 +23718,14 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":1009 + /* "HTSeq/_HTSeq.pyx":1021 * * def __init__(self, read, iv): * self._read = read # <<<<<<<<<<<<<< * self.iv = iv * */ - if (!(likely(((__pyx_v_read) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_read, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 1009, __pyx_L1_error) + if (!(likely(((__pyx_v_read) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_read, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(0, 1021, __pyx_L1_error) __pyx_t_1 = __pyx_v_read; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -23946,14 +23734,14 @@ __pyx_v_self->_read = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1010 + /* "HTSeq/_HTSeq.pyx":1022 * def __init__(self, read, iv): * self._read = read * self.iv = iv # <<<<<<<<<<<<<< * * @property */ - if (!(likely(((__pyx_v_iv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_iv, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 1010, __pyx_L1_error) + if (!(likely(((__pyx_v_iv) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_iv, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 1022, __pyx_L1_error) __pyx_t_1 = __pyx_v_iv; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -23962,7 +23750,7 @@ __pyx_v_self->iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1008 + /* "HTSeq/_HTSeq.pyx":1020 * """ * * def __init__(self, read, iv): # <<<<<<<<<<<<<< @@ -23982,7 +23770,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1013 +/* "HTSeq/_HTSeq.pyx":1025 * * @property * def read(self): # <<<<<<<<<<<<<< @@ -24008,7 +23796,7 @@ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1014 + /* "HTSeq/_HTSeq.pyx":1026 * @property * def read(self): * return self._read # <<<<<<<<<<<<<< @@ -24020,7 +23808,7 @@ __pyx_r = ((PyObject *)__pyx_v_self->_read); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1013 + /* "HTSeq/_HTSeq.pyx":1025 * * @property * def read(self): # <<<<<<<<<<<<<< @@ -24035,7 +23823,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1016 +/* "HTSeq/_HTSeq.pyx":1028 * return self._read * * def __repr__(self): # <<<<<<<<<<<<<< @@ -24068,20 +23856,20 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "HTSeq/_HTSeq.pyx":1018 + /* "HTSeq/_HTSeq.pyx":1030 * def __repr__(self): * cdef str s * if self.paired_end: # <<<<<<<<<<<<<< * s = "Paired-end read" * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paired_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1018, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_paired_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1030, __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, 1018, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1030, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1019 + /* "HTSeq/_HTSeq.pyx":1031 * cdef str s * if self.paired_end: * s = "Paired-end read" # <<<<<<<<<<<<<< @@ -24091,7 +23879,7 @@ __Pyx_INCREF(__pyx_kp_u_Paired_end_read); __pyx_v_s = __pyx_kp_u_Paired_end_read; - /* "HTSeq/_HTSeq.pyx":1018 + /* "HTSeq/_HTSeq.pyx":1030 * def __repr__(self): * cdef str s * if self.paired_end: # <<<<<<<<<<<<<< @@ -24101,7 +23889,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1021 + /* "HTSeq/_HTSeq.pyx":1033 * s = "Paired-end read" * else: * s = "Read" # <<<<<<<<<<<<<< @@ -24114,20 +23902,20 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1022 + /* "HTSeq/_HTSeq.pyx":1034 * else: * s = "Read" * if self.aligned: # <<<<<<<<<<<<<< * return "<%s object: %s '%s' aligned to %s>" % ( * self.__class__.__name__, s, self.read.name, str(self.iv)) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1022, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1034, __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, 1022, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1034, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1023 + /* "HTSeq/_HTSeq.pyx":1035 * s = "Read" * if self.aligned: * return "<%s object: %s '%s' aligned to %s>" % ( # <<<<<<<<<<<<<< @@ -24135,7 +23923,7 @@ * else: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_3 = 0; __pyx_t_4 = 127; @@ -24144,19 +23932,19 @@ __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__2); - /* "HTSeq/_HTSeq.pyx":1024 + /* "HTSeq/_HTSeq.pyx":1036 * if self.aligned: * return "<%s object: %s '%s' aligned to %s>" % ( * self.__class__.__name__, s, self.read.name, str(self.iv)) # <<<<<<<<<<<<<< * else: * return "<%s object: %s '%s', not aligned>" % ( */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; @@ -24173,16 +23961,16 @@ __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_s); - __Pyx_INCREF(__pyx_kp_u__33); + __Pyx_INCREF(__pyx_kp_u__29); __pyx_t_3 += 2; - __Pyx_GIVEREF(__pyx_kp_u__33); - PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__33); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__29); + PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u__29); + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; @@ -24194,7 +23982,7 @@ __pyx_t_3 += 13; __Pyx_GIVEREF(__pyx_kp_u_aligned_to); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_aligned_to); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)__pyx_v_self->iv)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1024, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)__pyx_v_self->iv)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1036, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4; __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5); @@ -24206,21 +23994,21 @@ __Pyx_GIVEREF(__pyx_kp_u__17); PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u__17); - /* "HTSeq/_HTSeq.pyx":1023 + /* "HTSeq/_HTSeq.pyx":1035 * s = "Read" * if self.aligned: * return "<%s object: %s '%s' aligned to %s>" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, s, self.read.name, str(self.iv)) * else: */ - __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1023, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_1, 9, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1035, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1022 + /* "HTSeq/_HTSeq.pyx":1034 * else: * s = "Read" * if self.aligned: # <<<<<<<<<<<<<< @@ -24229,7 +24017,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1026 + /* "HTSeq/_HTSeq.pyx":1038 * self.__class__.__name__, s, self.read.name, str(self.iv)) * else: * return "<%s object: %s '%s', not aligned>" % ( # <<<<<<<<<<<<<< @@ -24238,7 +24026,7 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_5 = PyTuple_New(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_3 = 0; __pyx_t_4 = 127; @@ -24247,19 +24035,19 @@ __Pyx_GIVEREF(__pyx_kp_u__2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__2); - /* "HTSeq/_HTSeq.pyx":1027 + /* "HTSeq/_HTSeq.pyx":1039 * else: * return "<%s object: %s '%s', not aligned>" % ( * self.__class__.__name__, s, self.read.name) # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_4; @@ -24276,16 +24064,16 @@ __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_s); __Pyx_GIVEREF(__pyx_v_s); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_s); - __Pyx_INCREF(__pyx_kp_u__33); + __Pyx_INCREF(__pyx_kp_u__29); __pyx_t_3 += 2; - __Pyx_GIVEREF(__pyx_kp_u__33); - PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__33); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__29); + PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_kp_u__29); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1027, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_4; @@ -24298,14 +24086,14 @@ __Pyx_GIVEREF(__pyx_kp_u_not_aligned); PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_kp_u_not_aligned); - /* "HTSeq/_HTSeq.pyx":1026 + /* "HTSeq/_HTSeq.pyx":1038 * self.__class__.__name__, s, self.read.name, str(self.iv)) * else: * return "<%s object: %s '%s', not aligned>" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, s, self.read.name) * */ - __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 7, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1026, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_5, 7, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1038, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_1; @@ -24313,7 +24101,7 @@ goto __pyx_L0; } - /* "HTSeq/_HTSeq.pyx":1016 + /* "HTSeq/_HTSeq.pyx":1028 * return self._read * * def __repr__(self): # <<<<<<<<<<<<<< @@ -24335,7 +24123,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1030 +/* "HTSeq/_HTSeq.pyx":1042 * * @property * def paired_end(self): # <<<<<<<<<<<<<< @@ -24361,7 +24149,7 @@ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1031 + /* "HTSeq/_HTSeq.pyx":1043 * @property * def paired_end(self): * return False # <<<<<<<<<<<<<< @@ -24373,7 +24161,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1030 + /* "HTSeq/_HTSeq.pyx":1042 * * @property * def paired_end(self): # <<<<<<<<<<<<<< @@ -24388,7 +24176,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1034 +/* "HTSeq/_HTSeq.pyx":1046 * * @property * def aligned(self): # <<<<<<<<<<<<<< @@ -24416,7 +24204,7 @@ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1038 + /* "HTSeq/_HTSeq.pyx":1050 * this record decribes a read for which no alignment was found. * """ * return self.iv is not None # <<<<<<<<<<<<<< @@ -24425,13 +24213,13 @@ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = (((PyObject *)__pyx_v_self->iv) != Py_None); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1038, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1050, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1034 + /* "HTSeq/_HTSeq.pyx":1046 * * @property * def aligned(self): # <<<<<<<<<<<<<< @@ -24452,7 +24240,7 @@ /* "HTSeq/_HTSeq.pxd":43 * - * cdef class Alignment( object ): + * cdef class Alignment(object): * cdef public SequenceWithQualities _read # <<<<<<<<<<<<<< * cdef public GenomicInterval iv * @@ -24556,11 +24344,11 @@ } /* "HTSeq/_HTSeq.pxd":44 - * cdef class Alignment( object ): + * cdef class Alignment(object): * cdef public SequenceWithQualities _read * cdef public GenomicInterval iv # <<<<<<<<<<<<<< * - * cdef class AlignmentWithSequenceReversal( Alignment ): + * cdef class AlignmentWithSequenceReversal(Alignment): */ /* Python wrapper */ @@ -24662,8 +24450,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self.iv) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -24680,9 +24468,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_9Alignment_4__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_Alignment *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -24693,14 +24481,14 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._read, self.iv) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->_read)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->_read)); @@ -24711,19 +24499,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._read, self.iv) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self.iv) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -24734,25 +24522,25 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -24761,7 +24549,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self.iv) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -24771,7 +24559,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._read is not None or self.iv is not None # <<<<<<<<<<<<<< @@ -24794,7 +24582,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self.iv is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -24804,7 +24592,7 @@ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._read is not None or self.iv is not None * if use_setstate: * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, None), state # <<<<<<<<<<<<<< @@ -24812,9 +24600,9 @@ * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_Alignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_Alignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -24825,7 +24613,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -24840,7 +24628,7 @@ __pyx_t_6 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self.iv is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -24849,7 +24637,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, None), state * else: * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) # <<<<<<<<<<<<<< @@ -24858,9 +24646,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_Alignment); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_Alignment); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -24871,7 +24659,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); @@ -24886,8 +24674,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self.iv) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -24905,7 +24693,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -24931,17 +24719,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_Alignment__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_Alignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_Alignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_Alignment, (type(self), 0x77bfdf2, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -24961,7 +24749,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1051 +/* "HTSeq/_HTSeq.pyx":1063 * """ * * def __init__(self, SequenceWithQualities read_as_aligned, GenomicInterval iv): # <<<<<<<<<<<<<< @@ -25000,11 +24788,11 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_iv)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1051, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1063, __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, 1051, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1063, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -25017,14 +24805,14 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1051, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1063, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.AlignmentWithSequenceReversal.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read_as_aligned), __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities, 1, "read_as_aligned", 0))) __PYX_ERR(0, 1051, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iv), __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval, 1, "iv", 0))) __PYX_ERR(0, 1051, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_read_as_aligned), __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities, 1, "read_as_aligned", 0))) __PYX_ERR(0, 1063, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_iv), __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval, 1, "iv", 0))) __PYX_ERR(0, 1063, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_29AlignmentWithSequenceReversal___init__(((struct __pyx_obj_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal *)__pyx_v_self), __pyx_v_read_as_aligned, __pyx_v_iv); /* function exit code */ @@ -25041,7 +24829,7 @@ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":1052 + /* "HTSeq/_HTSeq.pyx":1064 * * def __init__(self, SequenceWithQualities read_as_aligned, GenomicInterval iv): * self.read_as_aligned = read_as_aligned # <<<<<<<<<<<<<< @@ -25054,7 +24842,7 @@ __Pyx_DECREF(((PyObject *)__pyx_v_self->read_as_aligned)); __pyx_v_self->read_as_aligned = __pyx_v_read_as_aligned; - /* "HTSeq/_HTSeq.pyx":1053 + /* "HTSeq/_HTSeq.pyx":1065 * def __init__(self, SequenceWithQualities read_as_aligned, GenomicInterval iv): * self.read_as_aligned = read_as_aligned * self._read_as_sequenced = None # <<<<<<<<<<<<<< @@ -25067,7 +24855,7 @@ __Pyx_DECREF(((PyObject *)__pyx_v_self->_read_as_sequenced)); __pyx_v_self->_read_as_sequenced = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)Py_None); - /* "HTSeq/_HTSeq.pyx":1054 + /* "HTSeq/_HTSeq.pyx":1066 * self.read_as_aligned = read_as_aligned * self._read_as_sequenced = None * self.iv = iv # <<<<<<<<<<<<<< @@ -25080,7 +24868,7 @@ __Pyx_DECREF(((PyObject *)__pyx_v_self->__pyx_base.iv)); __pyx_v_self->__pyx_base.iv = __pyx_v_iv; - /* "HTSeq/_HTSeq.pyx":1051 + /* "HTSeq/_HTSeq.pyx":1063 * """ * * def __init__(self, SequenceWithQualities read_as_aligned, GenomicInterval iv): # <<<<<<<<<<<<<< @@ -25094,7 +24882,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1057 +/* "HTSeq/_HTSeq.pyx":1069 * * property read: * def __get__(self): # <<<<<<<<<<<<<< @@ -25124,7 +24912,7 @@ int __pyx_t_4; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1058 + /* "HTSeq/_HTSeq.pyx":1070 * property read: * def __get__(self): * if self._read_as_sequenced is None: # <<<<<<<<<<<<<< @@ -25135,16 +24923,16 @@ __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1059 + /* "HTSeq/_HTSeq.pyx":1071 * def __get__(self): * if self._read_as_sequenced is None: * if (not self.aligned) or self.iv.strand != "-": # <<<<<<<<<<<<<< * self._read_as_sequenced = self.read_as_aligned * else: */ - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = ((!__pyx_t_1) != 0); if (!__pyx_t_4) { @@ -25152,15 +24940,15 @@ __pyx_t_2 = __pyx_t_4; goto __pyx_L5_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__20, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1059, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_t_3, __pyx_kp_u__20, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1071, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_2 = __pyx_t_4; __pyx_L5_bool_binop_done:; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1060 + /* "HTSeq/_HTSeq.pyx":1072 * if self._read_as_sequenced is None: * if (not self.aligned) or self.iv.strand != "-": * self._read_as_sequenced = self.read_as_aligned # <<<<<<<<<<<<<< @@ -25175,7 +24963,7 @@ __pyx_v_self->_read_as_sequenced = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1059 + /* "HTSeq/_HTSeq.pyx":1071 * def __get__(self): * if self._read_as_sequenced is None: * if (not self.aligned) or self.iv.strand != "-": # <<<<<<<<<<<<<< @@ -25185,7 +24973,7 @@ goto __pyx_L4; } - /* "HTSeq/_HTSeq.pyx":1062 + /* "HTSeq/_HTSeq.pyx":1074 * self._read_as_sequenced = self.read_as_aligned * else: * self._read_as_sequenced = self.read_as_aligned.get_reverse_complement() # <<<<<<<<<<<<<< @@ -25193,7 +24981,7 @@ * return self._read_as_sequenced */ /*else*/ { - __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->read_as_aligned->__pyx_base.__pyx_vtab)->get_reverse_complement(__pyx_v_self->read_as_aligned, 0)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1062, __pyx_L1_error) + __pyx_t_3 = ((PyObject *)((struct __pyx_vtabstruct_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_v_self->read_as_aligned->__pyx_base.__pyx_vtab)->get_reverse_complement(__pyx_v_self->read_as_aligned, 0, NULL)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1074, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->_read_as_sequenced); @@ -25201,7 +24989,7 @@ __pyx_v_self->_read_as_sequenced = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1063 + /* "HTSeq/_HTSeq.pyx":1075 * else: * self._read_as_sequenced = self.read_as_aligned.get_reverse_complement() * self._read_as_sequenced.name = self.read_as_aligned.name # <<<<<<<<<<<<<< @@ -25218,7 +25006,7 @@ } __pyx_L4:; - /* "HTSeq/_HTSeq.pyx":1058 + /* "HTSeq/_HTSeq.pyx":1070 * property read: * def __get__(self): * if self._read_as_sequenced is None: # <<<<<<<<<<<<<< @@ -25227,7 +25015,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1064 + /* "HTSeq/_HTSeq.pyx":1076 * self._read_as_sequenced = self.read_as_aligned.get_reverse_complement() * self._read_as_sequenced.name = self.read_as_aligned.name * return self._read_as_sequenced # <<<<<<<<<<<<<< @@ -25239,7 +25027,7 @@ __pyx_r = ((PyObject *)__pyx_v_self->_read_as_sequenced); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1057 + /* "HTSeq/_HTSeq.pyx":1069 * * property read: * def __get__(self): # <<<<<<<<<<<<<< @@ -25260,7 +25048,7 @@ /* "HTSeq/_HTSeq.pxd":47 * - * cdef class AlignmentWithSequenceReversal( Alignment ): + * cdef class AlignmentWithSequenceReversal(Alignment): * cdef public SequenceWithQualities read_as_aligned # <<<<<<<<<<<<<< * cdef public SequenceWithQualities _read_as_sequenced * @@ -25364,11 +25152,11 @@ } /* "HTSeq/_HTSeq.pxd":48 - * cdef class AlignmentWithSequenceReversal( Alignment ): + * cdef class AlignmentWithSequenceReversal(Alignment): * cdef public SequenceWithQualities read_as_aligned * cdef public SequenceWithQualities _read_as_sequenced # <<<<<<<<<<<<<< * - * cdef class SAM_Alignment( AlignmentWithSequenceReversal ): + * cdef class SAM_Alignment(AlignmentWithSequenceReversal): */ /* Python wrapper */ @@ -25470,8 +25258,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -25488,9 +25276,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_29AlignmentWithSequenceReversal_2__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -25501,14 +25289,14 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base._read)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base._read)); @@ -25525,19 +25313,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -25548,25 +25336,25 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -25575,7 +25363,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -25585,7 +25373,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None # <<<<<<<<<<<<<< @@ -25622,7 +25410,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -25632,7 +25420,7 @@ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None * if use_setstate: * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, None), state # <<<<<<<<<<<<<< @@ -25640,9 +25428,9 @@ * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_AlignmentWithSequ); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_AlignmentWithSequ); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -25653,7 +25441,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -25668,7 +25456,7 @@ __pyx_t_6 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -25677,7 +25465,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, None), state * else: * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) # <<<<<<<<<<<<<< @@ -25686,9 +25474,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_AlignmentWithSequ); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_AlignmentWithSequ); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -25699,7 +25487,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); @@ -25714,8 +25502,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -25733,7 +25521,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -25759,17 +25547,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_AlignmentWithSequenceReversal__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_AlignmentWithSequenceReversal__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_AlignmentWithSequenceReversal__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_AlignmentWithSequenceReversal, (type(self), 0x1b7eeff, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -25789,7 +25577,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1083 +/* "HTSeq/_HTSeq.pyx":1095 * cdef public str substitutions * * def __init__(self, bowtie_line): # <<<<<<<<<<<<<< @@ -25823,7 +25611,7 @@ else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1083, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1095, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 1) { goto __pyx_L5_argtuple_error; @@ -25834,7 +25622,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1083, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1095, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.BowtieAlignment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -25872,29 +25660,41 @@ Py_ssize_t __pyx_t_13; __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":1087 + /* "HTSeq/_HTSeq.pyx":1099 * cdef int positionint * (readId, strand, chrom, position, read, qual, * self.reserved, self.substitutions) = bowtie_line.split('\t') # <<<<<<<<<<<<<< * positionint = int(position) * AlignmentWithSequenceReversal.__init__(self, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_bowtie_line, __pyx_n_s_split); 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__34, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1087, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_bowtie_line, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1099, __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))) { - PyObject* sequence = __pyx_t_2; + __pyx_t_3 = NULL; + 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_1 = (__pyx_t_3) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_3, __pyx_kp_u__21) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_kp_u__21); + __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1099, __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))) { + PyObject* sequence = __pyx_t_1; Py_ssize_t size = __Pyx_PySequence_SIZE(sequence); if (unlikely(size != 8)) { if (size > 8) __Pyx_RaiseTooManyValuesError(8); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1086, __pyx_L1_error) + __PYX_ERR(0, 1098, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1); __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_5 = PyTuple_GET_ITEM(sequence, 3); @@ -25903,7 +25703,7 @@ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 6); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 7); } else { - __pyx_t_1 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 0); __pyx_t_3 = PyList_GET_ITEM(sequence, 1); __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_5 = PyList_GET_ITEM(sequence, 3); @@ -25912,7 +25712,7 @@ __pyx_t_8 = PyList_GET_ITEM(sequence, 6); __pyx_t_9 = PyList_GET_ITEM(sequence, 7); } - __Pyx_INCREF(__pyx_t_1); + __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); @@ -25923,28 +25723,28 @@ #else { Py_ssize_t i; - PyObject** temps[8] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; + PyObject** temps[8] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; for (i=0; i < 8; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1086, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1098, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } } #endif - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - PyObject** temps[8] = {&__pyx_t_1,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9}; - __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1086, __pyx_L1_error) + PyObject** temps[8] = {&__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 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1098, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext; for (index=0; index < 8; index++) { PyObject* item = __pyx_t_11(__pyx_t_10); if (unlikely(!item)) goto __pyx_L3_unpacking_failed; __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 8) < 0) __PYX_ERR(0, 1086, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 8) < 0) __PYX_ERR(0, 1098, __pyx_L1_error) __pyx_t_11 = NULL; __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; goto __pyx_L4_unpacking_done; @@ -25952,27 +25752,27 @@ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; __pyx_t_11 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1086, __pyx_L1_error) + __PYX_ERR(0, 1098, __pyx_L1_error) __pyx_L4_unpacking_done:; } - /* "HTSeq/_HTSeq.pyx":1086 + /* "HTSeq/_HTSeq.pyx":1098 * cdef str readId, strand, chrom, position, read, qual * cdef int positionint * (readId, strand, chrom, position, read, qual, # <<<<<<<<<<<<<< * self.reserved, self.substitutions) = bowtie_line.split('\t') * positionint = int(position) */ - 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, 1086, __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, 1086, __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, 1086, __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, 1086, __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, 1086, __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, 1086, __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, 1086, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 1086, __pyx_L1_error) - __pyx_v_readId = ((PyObject*)__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, 1098, __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, 1098, __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, 1098, __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, 1098, __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, 1098, __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, 1098, __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, 1098, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 1098, __pyx_L1_error) + __pyx_v_readId = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; __pyx_v_strand = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; __pyx_v_chrom = ((PyObject*)__pyx_t_4); @@ -25984,7 +25784,7 @@ __pyx_v_qual = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1087 + /* "HTSeq/_HTSeq.pyx":1099 * cdef int positionint * (readId, strand, chrom, position, read, qual, * self.reserved, self.substitutions) = bowtie_line.split('\t') # <<<<<<<<<<<<<< @@ -26002,37 +25802,37 @@ __pyx_v_self->substitutions = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; - /* "HTSeq/_HTSeq.pyx":1088 + /* "HTSeq/_HTSeq.pyx":1100 * (readId, strand, chrom, position, read, qual, * self.reserved, self.substitutions) = bowtie_line.split('\t') * positionint = int(position) # <<<<<<<<<<<<<< * AlignmentWithSequenceReversal.__init__(self, * SequenceWithQualities( */ - __pyx_t_2 = __Pyx_PyNumber_Int(__pyx_v_position); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1088, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1088, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_position); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1100, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1100, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_positionint = __pyx_t_12; - /* "HTSeq/_HTSeq.pyx":1089 + /* "HTSeq/_HTSeq.pyx":1101 * self.reserved, self.substitutions) = bowtie_line.split('\t') * positionint = int(position) * AlignmentWithSequenceReversal.__init__(self, # <<<<<<<<<<<<<< * SequenceWithQualities( * read, readId, qual), */ - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal), __pyx_n_s_init); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal), __pyx_n_s_init); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "HTSeq/_HTSeq.pyx":1090 + /* "HTSeq/_HTSeq.pyx":1102 * positionint = int(position) * AlignmentWithSequenceReversal.__init__(self, * SequenceWithQualities( # <<<<<<<<<<<<<< * read, readId, qual), * GenomicInterval(chrom, positionint, positionint + len(read), strand)) */ - __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1090, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(__pyx_v_read); __Pyx_GIVEREF(__pyx_v_read); @@ -26043,27 +25843,27 @@ __Pyx_INCREF(__pyx_v_qual); __Pyx_GIVEREF(__pyx_v_qual); PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_v_qual); - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1090, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1102, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "HTSeq/_HTSeq.pyx":1092 + /* "HTSeq/_HTSeq.pyx":1104 * SequenceWithQualities( * read, readId, qual), * GenomicInterval(chrom, positionint, positionint + len(read), strand)) # <<<<<<<<<<<<<< * * */ - __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_positionint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1092, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyInt_From_int(__pyx_v_positionint); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (unlikely(__pyx_v_read == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1092, __pyx_L1_error) + __PYX_ERR(0, 1104, __pyx_L1_error) } - __pyx_t_13 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_read); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1092, __pyx_L1_error) - __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_positionint + __pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1092, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_read); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1104, __pyx_L1_error) + __pyx_t_6 = PyInt_FromSsize_t((__pyx_v_positionint + __pyx_t_13)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); @@ -26077,7 +25877,7 @@ PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_strand); __pyx_t_8 = 0; __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1092, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1104, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = NULL; @@ -26095,9 +25895,9 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_t_7, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else @@ -26105,15 +25905,15 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) { PyObject *__pyx_temp[4] = {__pyx_t_5, ((PyObject *)__pyx_v_self), __pyx_t_7, __pyx_t_6}; - __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_12, 3+__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } else #endif { - __pyx_t_8 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1089, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(3+__pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1101, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); if (__pyx_t_5) { __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL; @@ -26127,14 +25927,14 @@ PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_12, __pyx_t_6); __pyx_t_7 = 0; __pyx_t_6 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1089, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1101, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1083 + /* "HTSeq/_HTSeq.pyx":1095 * cdef public str substitutions * * def __init__(self, bowtie_line): # <<<<<<<<<<<<<< @@ -26169,7 +25969,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1080 +/* "HTSeq/_HTSeq.pyx":1092 * """ * * cdef public str reserved # <<<<<<<<<<<<<< @@ -26224,7 +26024,7 @@ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __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, 1080, __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, 1092, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -26274,7 +26074,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1081 +/* "HTSeq/_HTSeq.pyx":1093 * * cdef public str reserved * cdef public str substitutions # <<<<<<<<<<<<<< @@ -26329,7 +26129,7 @@ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __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, 1081, __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, 1093, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -26381,8 +26181,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -26399,9 +26199,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_15BowtieAlignment_2__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_BowtieAlignment *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -26412,14 +26212,14 @@ PyObject *__pyx_t_6 = NULL; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._read)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base._read)); @@ -26442,19 +26242,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v__dict = __pyx_t_1; __pyx_t_1 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -26465,25 +26265,25 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict); - __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -26492,7 +26292,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -26502,7 +26302,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None or self.reserved is not None or self.substitutions is not None # <<<<<<<<<<<<<< @@ -26553,7 +26353,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None or self.reserved is not None or self.substitutions is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -26563,7 +26363,7 @@ __pyx_t_3 = (__pyx_v_use_setstate != 0); if (__pyx_t_3) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None or self.reserved is not None or self.substitutions is not None * if use_setstate: * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, None), state # <<<<<<<<<<<<<< @@ -26571,9 +26371,9 @@ * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BowtieAlignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_pyx_unpickle_BowtieAlignment); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -26584,7 +26384,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None); - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); @@ -26599,7 +26399,7 @@ __pyx_t_6 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.iv is not None or self.read_as_aligned is not None or self.reserved is not None or self.substitutions is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -26608,7 +26408,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, None), state * else: * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) # <<<<<<<<<<<<<< @@ -26617,9 +26417,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_BowtieAlignment); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_pyx_unpickle_BowtieAlignment); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -26630,7 +26430,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); @@ -26645,8 +26445,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._read, self._read_as_sequenced, self.iv, self.read_as_aligned, self.reserved, self.substitutions) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -26664,7 +26464,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -26690,17 +26490,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_BowtieAlignment__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_BowtieAlignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_BowtieAlignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_BowtieAlignment, (type(self), 0x482c176, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -26720,7 +26520,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1113 +/* "HTSeq/_HTSeq.pyx":1125 * cdef public int query_from, query_to * * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, # <<<<<<<<<<<<<< @@ -26780,43 +26580,43 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_size)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 1); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 1); __PYX_ERR(0, 1125, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 2: if (likely((values[2] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rfrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 2); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 2); __PYX_ERR(0, 1125, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 3: if (likely((values[3] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_rto)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 3); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 3); __PYX_ERR(0, 1125, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 4: if (likely((values[4] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qfrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 4); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 4); __PYX_ERR(0, 1125, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 5: if (likely((values[5] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_qto)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 5); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 5); __PYX_ERR(0, 1125, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 6: if (likely((values[6] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_chrom)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 6); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 6); __PYX_ERR(0, 1125, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 7: if (likely((values[7] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_strand)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 7); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, 7); __PYX_ERR(0, 1125, __pyx_L3_error) } CYTHON_FALLTHROUGH; case 8: @@ -26826,7 +26626,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1113, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1125, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -26845,18 +26645,18 @@ } } __pyx_v_type_ = ((PyObject*)values[0]); - __pyx_v_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error) - __pyx_v_rfrom = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_rfrom == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error) - __pyx_v_rto = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_rto == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error) - __pyx_v_qfrom = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_qfrom == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1113, __pyx_L3_error) - __pyx_v_qto = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_qto == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L3_error) + __pyx_v_size = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_size == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L3_error) + __pyx_v_rfrom = __Pyx_PyInt_As_int(values[2]); if (unlikely((__pyx_v_rfrom == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L3_error) + __pyx_v_rto = __Pyx_PyInt_As_int(values[3]); if (unlikely((__pyx_v_rto == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L3_error) + __pyx_v_qfrom = __Pyx_PyInt_As_int(values[4]); if (unlikely((__pyx_v_qfrom == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1125, __pyx_L3_error) + __pyx_v_qto = __Pyx_PyInt_As_int(values[5]); if (unlikely((__pyx_v_qto == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L3_error) __pyx_v_chrom = ((PyObject*)values[6]); __pyx_v_strand = ((PyObject*)values[7]); if (values[8]) { - __pyx_v_check = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_check == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1114, __pyx_L3_error) + __pyx_v_check = __Pyx_PyObject_IsTrue(values[8]); if (unlikely((__pyx_v_check == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1126, __pyx_L3_error) } else { - /* "HTSeq/_HTSeq.pyx":1114 + /* "HTSeq/_HTSeq.pyx":1126 * * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, * int qto, str chrom, str strand, bint check=True): # <<<<<<<<<<<<<< @@ -26868,18 +26668,18 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1113, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("__init__", 0, 8, 9, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1125, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.CigarOperation.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return -1; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type_), (&PyUnicode_Type), 1, "type_", 1))) __PYX_ERR(0, 1113, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1114, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyUnicode_Type), 1, "strand", 1))) __PYX_ERR(0, 1114, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_type_), (&PyUnicode_Type), 1, "type_", 1))) __PYX_ERR(0, 1125, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1126, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyUnicode_Type), 1, "strand", 1))) __PYX_ERR(0, 1126, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_14CigarOperation___init__(((struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *)__pyx_v_self), __pyx_v_type_, __pyx_v_size, __pyx_v_rfrom, __pyx_v_rto, __pyx_v_qfrom, __pyx_v_qto, __pyx_v_chrom, __pyx_v_strand, __pyx_v_check); - /* "HTSeq/_HTSeq.pyx":1113 + /* "HTSeq/_HTSeq.pyx":1125 * cdef public int query_from, query_to * * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, # <<<<<<<<<<<<<< @@ -26907,7 +26707,7 @@ int __pyx_t_6; __Pyx_RefNannySetupContext("__init__", 0); - /* "HTSeq/_HTSeq.pyx":1115 + /* "HTSeq/_HTSeq.pyx":1127 * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, * int qto, str chrom, str strand, bint check=True): * self.type = type_ # <<<<<<<<<<<<<< @@ -26920,7 +26720,7 @@ __Pyx_DECREF(__pyx_v_self->type); __pyx_v_self->type = __pyx_v_type_; - /* "HTSeq/_HTSeq.pyx":1116 + /* "HTSeq/_HTSeq.pyx":1128 * int qto, str chrom, str strand, bint check=True): * self.type = type_ * self.size = size # <<<<<<<<<<<<<< @@ -26929,18 +26729,18 @@ */ __pyx_v_self->size = __pyx_v_size; - /* "HTSeq/_HTSeq.pyx":1117 + /* "HTSeq/_HTSeq.pyx":1129 * self.type = type_ * self.size = size * self.ref_iv = GenomicInterval(chrom, rfrom, rto, strand) # <<<<<<<<<<<<<< * self.query_from = qfrom * self.query_to = qto */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rfrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_rfrom); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_rto); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); @@ -26954,7 +26754,7 @@ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_v_strand); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1117, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1129, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); @@ -26963,7 +26763,7 @@ __pyx_v_self->ref_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1118 + /* "HTSeq/_HTSeq.pyx":1130 * self.size = size * self.ref_iv = GenomicInterval(chrom, rfrom, rto, strand) * self.query_from = qfrom # <<<<<<<<<<<<<< @@ -26972,7 +26772,7 @@ */ __pyx_v_self->query_from = __pyx_v_qfrom; - /* "HTSeq/_HTSeq.pyx":1119 + /* "HTSeq/_HTSeq.pyx":1131 * self.ref_iv = GenomicInterval(chrom, rfrom, rto, strand) * self.query_from = qfrom * self.query_to = qto # <<<<<<<<<<<<<< @@ -26981,7 +26781,7 @@ */ __pyx_v_self->query_to = __pyx_v_qto; - /* "HTSeq/_HTSeq.pyx":1120 + /* "HTSeq/_HTSeq.pyx":1132 * self.query_from = qfrom * self.query_to = qto * if check and not self.check(): # <<<<<<<<<<<<<< @@ -26994,7 +26794,7 @@ __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1120, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_check); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) { @@ -27006,22 +26806,19 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_1) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1120, __pyx_L1_error) - } + __pyx_t_2 = (__pyx_t_1) ? __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1) : __Pyx_PyObject_CallNoArg(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1132, __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 < 0)) __PYX_ERR(0, 1120, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1132, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_6 = ((!__pyx_t_5) != 0); __pyx_t_4 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_4)) { - /* "HTSeq/_HTSeq.pyx":1121 + /* "HTSeq/_HTSeq.pyx":1133 * self.query_to = qto * if check and not self.check(): * raise ValueError, "Inconsistent CIGAR operation." # <<<<<<<<<<<<<< @@ -27029,9 +26826,9 @@ * def __repr__(self): */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Inconsistent_CIGAR_operation, 0, 0); - __PYX_ERR(0, 1121, __pyx_L1_error) + __PYX_ERR(0, 1133, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1120 + /* "HTSeq/_HTSeq.pyx":1132 * self.query_from = qfrom * self.query_to = qto * if check and not self.check(): # <<<<<<<<<<<<<< @@ -27040,7 +26837,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1113 + /* "HTSeq/_HTSeq.pyx":1125 * cdef public int query_from, query_to * * def __init__(self, str type_, int size, int rfrom, int rto, int qfrom, # <<<<<<<<<<<<<< @@ -27062,7 +26859,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1123 +/* "HTSeq/_HTSeq.pyx":1135 * raise ValueError, "Inconsistent CIGAR operation." * * def __repr__(self): # <<<<<<<<<<<<<< @@ -27093,7 +26890,7 @@ PyObject *__pyx_t_5 = NULL; __Pyx_RefNannySetupContext("__repr__", 0); - /* "HTSeq/_HTSeq.pyx":1124 + /* "HTSeq/_HTSeq.pyx":1136 * * def __repr__(self): * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( # <<<<<<<<<<<<<< @@ -27101,28 +26898,28 @@ * self.type], */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyTuple_New(13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = 0; __pyx_t_3 = 127; - __Pyx_INCREF(__pyx_kp_u__35); + __Pyx_INCREF(__pyx_kp_u__30); __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__35); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__35); + __Pyx_GIVEREF(__pyx_kp_u__30); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__30); - /* "HTSeq/_HTSeq.pyx":1125 + /* "HTSeq/_HTSeq.pyx":1137 * def __repr__(self): * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( * self.__class__.__name__, self.size, cigar_operation_names[ # <<<<<<<<<<<<<< * self.type], * str(self.ref_iv), self.query_from, self.query_to) */ - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -27130,11 +26927,11 @@ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__36); + __Pyx_INCREF(__pyx_kp_u__31); __pyx_t_2 += 2; - __Pyx_GIVEREF(__pyx_kp_u__36); - PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__36); - __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1125, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_kp_u__31); + PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_kp_u__31); + __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->size, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -27144,28 +26941,28 @@ __pyx_t_2 += 9; __Pyx_GIVEREF(__pyx_kp_u_base_s); PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_kp_u_base_s); - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1125, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cigar_operation_names); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - /* "HTSeq/_HTSeq.pyx":1126 + /* "HTSeq/_HTSeq.pyx":1138 * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( * self.__class__.__name__, self.size, cigar_operation_names[ * self.type], # <<<<<<<<<<<<<< * str(self.ref_iv), self.query_from, self.query_to) * */ - __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_v_self->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Dict_GetItem(__pyx_t_4, __pyx_v_self->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1125 + /* "HTSeq/_HTSeq.pyx":1137 * def __repr__(self): * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( * self.__class__.__name__, self.size, cigar_operation_names[ # <<<<<<<<<<<<<< * self.type], * str(self.ref_iv), self.query_from, self.query_to) */ - __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Str(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1125, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_5), __pyx_empty_unicode); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1137, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; @@ -27178,14 +26975,14 @@ __Pyx_GIVEREF(__pyx_kp_u_on_ref_iv); PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_kp_u_on_ref_iv); - /* "HTSeq/_HTSeq.pyx":1127 + /* "HTSeq/_HTSeq.pyx":1139 * self.__class__.__name__, self.size, cigar_operation_names[ * self.type], * str(self.ref_iv), self.query_from, self.query_to) # <<<<<<<<<<<<<< * * def check(CigarOperation self): */ - __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)__pyx_v_self->ref_iv)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1127, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), ((PyObject *)__pyx_v_self->ref_iv)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_3 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) > __pyx_t_3) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_4) : __pyx_t_3; __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); @@ -27196,7 +26993,7 @@ __pyx_t_2 += 12; __Pyx_GIVEREF(__pyx_kp_u_query_iv); PyTuple_SET_ITEM(__pyx_t_1, 8, __pyx_kp_u_query_iv); - __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->query_from, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1127, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->query_from, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); @@ -27206,32 +27003,32 @@ __pyx_t_2 += 1; __Pyx_GIVEREF(__pyx_kp_u__4); PyTuple_SET_ITEM(__pyx_t_1, 10, __pyx_kp_u__4); - __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->query_to, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1127, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_From_int(__pyx_v_self->query_to, 0, ' ', 'd'); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_t_2 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 11, __pyx_t_4); __pyx_t_4 = 0; - __Pyx_INCREF(__pyx_kp_u__37); + __Pyx_INCREF(__pyx_kp_u__32); __pyx_t_2 += 3; - __Pyx_GIVEREF(__pyx_kp_u__37); - PyTuple_SET_ITEM(__pyx_t_1, 12, __pyx_kp_u__37); + __Pyx_GIVEREF(__pyx_kp_u__32); + PyTuple_SET_ITEM(__pyx_t_1, 12, __pyx_kp_u__32); - /* "HTSeq/_HTSeq.pyx":1124 + /* "HTSeq/_HTSeq.pyx":1136 * * def __repr__(self): * return "< %s: %d base(s) %s on ref iv %s, query iv [%d,%d) >" % ( # <<<<<<<<<<<<<< * self.__class__.__name__, self.size, cigar_operation_names[ * self.type], */ - __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 13, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1124, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyUnicode_Join(__pyx_t_1, 13, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_4; __pyx_t_4 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1123 + /* "HTSeq/_HTSeq.pyx":1135 * raise ValueError, "Inconsistent CIGAR operation." * * def __repr__(self): # <<<<<<<<<<<<<< @@ -27252,7 +27049,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1129 +/* "HTSeq/_HTSeq.pyx":1141 * str(self.ref_iv), self.query_from, self.query_to) * * def check(CigarOperation self): # <<<<<<<<<<<<<< @@ -27285,7 +27082,7 @@ int __pyx_t_5; __Pyx_RefNannySetupContext("check", 0); - /* "HTSeq/_HTSeq.pyx":1130 + /* "HTSeq/_HTSeq.pyx":1142 * * def check(CigarOperation self): * cdef int qlen = self.query_to - self.query_from # <<<<<<<<<<<<<< @@ -27294,47 +27091,47 @@ */ __pyx_v_qlen = (__pyx_v_self->query_to - __pyx_v_self->query_from); - /* "HTSeq/_HTSeq.pyx":1131 + /* "HTSeq/_HTSeq.pyx":1143 * def check(CigarOperation self): * cdef int qlen = self.query_to - self.query_from * cdef int rlen = self.ref_iv.length # <<<<<<<<<<<<<< * if self.type == 'M' or self.type == '=' or self.type == 'X': * if not (qlen == self.size and rlen == self.size): */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ref_iv), __pyx_n_s_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1131, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->ref_iv), __pyx_n_s_length); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1143, __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, 1131, __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, 1143, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_rlen = __pyx_t_2; - /* "HTSeq/_HTSeq.pyx":1132 + /* "HTSeq/_HTSeq.pyx":1144 * cdef int qlen = self.query_to - self.query_from * cdef int rlen = self.ref_iv.length * if self.type == 'M' or self.type == '=' or self.type == 'X': # <<<<<<<<<<<<<< * if not (qlen == self.size and rlen == self.size): * return False */ - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_M, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_M, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1144, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); if (!__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_kp_u__38, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_kp_u__33, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1144, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); if (!__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_X, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1132, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_X, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1144, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1133 + /* "HTSeq/_HTSeq.pyx":1145 * cdef int rlen = self.ref_iv.length * if self.type == 'M' or self.type == '=' or self.type == 'X': * if not (qlen == self.size and rlen == self.size): # <<<<<<<<<<<<<< @@ -27353,7 +27150,7 @@ __pyx_t_5 = ((!__pyx_t_3) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1134 + /* "HTSeq/_HTSeq.pyx":1146 * if self.type == 'M' or self.type == '=' or self.type == 'X': * if not (qlen == self.size and rlen == self.size): * return False # <<<<<<<<<<<<<< @@ -27365,7 +27162,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1133 + /* "HTSeq/_HTSeq.pyx":1145 * cdef int rlen = self.ref_iv.length * if self.type == 'M' or self.type == '=' or self.type == 'X': * if not (qlen == self.size and rlen == self.size): # <<<<<<<<<<<<<< @@ -27374,7 +27171,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1132 + /* "HTSeq/_HTSeq.pyx":1144 * cdef int qlen = self.query_to - self.query_from * cdef int rlen = self.ref_iv.length * if self.type == 'M' or self.type == '=' or self.type == 'X': # <<<<<<<<<<<<<< @@ -27384,27 +27181,27 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1135 + /* "HTSeq/_HTSeq.pyx":1147 * if not (qlen == self.size and rlen == self.size): * return False * elif self.type == 'I' or self.type == 'S': # <<<<<<<<<<<<<< * if not (qlen == self.size and rlen == 0): * return False */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_I, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1135, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_I, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1147, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L10_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1135, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1147, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_5 = __pyx_t_3; __pyx_L10_bool_binop_done:; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1136 + /* "HTSeq/_HTSeq.pyx":1148 * return False * elif self.type == 'I' or self.type == 'S': * if not (qlen == self.size and rlen == 0): # <<<<<<<<<<<<<< @@ -27423,7 +27220,7 @@ __pyx_t_3 = ((!__pyx_t_5) != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1137 + /* "HTSeq/_HTSeq.pyx":1149 * elif self.type == 'I' or self.type == 'S': * if not (qlen == self.size and rlen == 0): * return False # <<<<<<<<<<<<<< @@ -27435,7 +27232,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1136 + /* "HTSeq/_HTSeq.pyx":1148 * return False * elif self.type == 'I' or self.type == 'S': * if not (qlen == self.size and rlen == 0): # <<<<<<<<<<<<<< @@ -27444,7 +27241,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1135 + /* "HTSeq/_HTSeq.pyx":1147 * if not (qlen == self.size and rlen == self.size): * return False * elif self.type == 'I' or self.type == 'S': # <<<<<<<<<<<<<< @@ -27454,27 +27251,27 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1138 + /* "HTSeq/_HTSeq.pyx":1150 * if not (qlen == self.size and rlen == 0): * return False * elif self.type == 'D' or self.type == 'N': # <<<<<<<<<<<<<< * if not (qlen == 0 and rlen == self.size): * return False */ - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_D, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1138, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_D, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1150, __pyx_L1_error) __pyx_t_4 = (__pyx_t_5 != 0); if (!__pyx_t_4) { } else { __pyx_t_3 = __pyx_t_4; goto __pyx_L15_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_N, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1138, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_N, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1150, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_3 = __pyx_t_5; __pyx_L15_bool_binop_done:; if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1139 + /* "HTSeq/_HTSeq.pyx":1151 * return False * elif self.type == 'D' or self.type == 'N': * if not (qlen == 0 and rlen == self.size): # <<<<<<<<<<<<<< @@ -27493,7 +27290,7 @@ __pyx_t_5 = ((!__pyx_t_3) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1140 + /* "HTSeq/_HTSeq.pyx":1152 * elif self.type == 'D' or self.type == 'N': * if not (qlen == 0 and rlen == self.size): * return False # <<<<<<<<<<<<<< @@ -27505,7 +27302,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1139 + /* "HTSeq/_HTSeq.pyx":1151 * return False * elif self.type == 'D' or self.type == 'N': * if not (qlen == 0 and rlen == self.size): # <<<<<<<<<<<<<< @@ -27514,7 +27311,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1138 + /* "HTSeq/_HTSeq.pyx":1150 * if not (qlen == self.size and rlen == 0): * return False * elif self.type == 'D' or self.type == 'N': # <<<<<<<<<<<<<< @@ -27524,27 +27321,27 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1141 + /* "HTSeq/_HTSeq.pyx":1153 * if not (qlen == 0 and rlen == self.size): * return False * elif self.type == 'H' or self.type == 'P': # <<<<<<<<<<<<<< * if not (qlen == 0 and rlen == 0): * return False */ - __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_H, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_3 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_H, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error) __pyx_t_4 = (__pyx_t_3 != 0); if (!__pyx_t_4) { } else { __pyx_t_5 = __pyx_t_4; goto __pyx_L20_bool_binop_done; } - __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_P, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1141, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyUnicode_Equals(__pyx_v_self->type, __pyx_n_u_P, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1153, __pyx_L1_error) __pyx_t_3 = (__pyx_t_4 != 0); __pyx_t_5 = __pyx_t_3; __pyx_L20_bool_binop_done:; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1142 + /* "HTSeq/_HTSeq.pyx":1154 * return False * elif self.type == 'H' or self.type == 'P': * if not (qlen == 0 and rlen == 0): # <<<<<<<<<<<<<< @@ -27563,7 +27360,7 @@ __pyx_t_3 = ((!__pyx_t_5) != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1143 + /* "HTSeq/_HTSeq.pyx":1155 * elif self.type == 'H' or self.type == 'P': * if not (qlen == 0 and rlen == 0): * return False # <<<<<<<<<<<<<< @@ -27575,7 +27372,7 @@ __pyx_r = Py_False; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1142 + /* "HTSeq/_HTSeq.pyx":1154 * return False * elif self.type == 'H' or self.type == 'P': * if not (qlen == 0 and rlen == 0): # <<<<<<<<<<<<<< @@ -27584,7 +27381,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1141 + /* "HTSeq/_HTSeq.pyx":1153 * if not (qlen == 0 and rlen == self.size): * return False * elif self.type == 'H' or self.type == 'P': # <<<<<<<<<<<<<< @@ -27594,7 +27391,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1145 + /* "HTSeq/_HTSeq.pyx":1157 * return False * else: * return False # <<<<<<<<<<<<<< @@ -27609,7 +27406,7 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1146 + /* "HTSeq/_HTSeq.pyx":1158 * else: * return False * return True # <<<<<<<<<<<<<< @@ -27621,7 +27418,7 @@ __pyx_r = Py_True; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1129 + /* "HTSeq/_HTSeq.pyx":1141 * str(self.ref_iv), self.query_from, self.query_to) * * def check(CigarOperation self): # <<<<<<<<<<<<<< @@ -27640,7 +27437,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1108 +/* "HTSeq/_HTSeq.pyx":1120 * cdef class CigarOperation(object): * * cdef public str type # <<<<<<<<<<<<<< @@ -27695,7 +27492,7 @@ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __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, 1108, __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, 1120, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -27745,7 +27542,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1109 +/* "HTSeq/_HTSeq.pyx":1121 * * cdef public str type * cdef public int size # <<<<<<<<<<<<<< @@ -27772,7 +27569,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1109, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1121, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27807,7 +27604,7 @@ __Pyx_RefNannyDeclarations int __pyx_t_1; __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, 1109, __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, 1121, __pyx_L1_error) __pyx_v_self->size = __pyx_t_1; /* function exit code */ @@ -27821,7 +27618,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1110 +/* "HTSeq/_HTSeq.pyx":1122 * cdef public str type * cdef public int size * cdef public GenomicInterval ref_iv # <<<<<<<<<<<<<< @@ -27876,7 +27673,7 @@ __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__set__", 0); - if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 1110, __pyx_L1_error) + if (!(likely(((__pyx_v_value) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_value, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(0, 1122, __pyx_L1_error) __pyx_t_1 = __pyx_v_value; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -27926,7 +27723,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1111 +/* "HTSeq/_HTSeq.pyx":1123 * cdef public int size * cdef public GenomicInterval ref_iv * cdef public int query_from, query_to # <<<<<<<<<<<<<< @@ -27953,7 +27750,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -27988,7 +27785,7 @@ __Pyx_RefNannyDeclarations int __pyx_t_1; __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, 1111, __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, 1123, __pyx_L1_error) __pyx_v_self->query_from = __pyx_t_1; /* function exit code */ @@ -28021,7 +27818,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1111, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1123, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28056,7 +27853,7 @@ __Pyx_RefNannyDeclarations int __pyx_t_1; __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, 1111, __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, 1123, __pyx_L1_error) __pyx_v_self->query_to = __pyx_t_1; /* function exit code */ @@ -28072,8 +27869,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -28090,9 +27887,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_14CigarOperation_6__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -28104,20 +27901,20 @@ int __pyx_t_7; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->query_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->query_to); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_self->size); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); @@ -28137,19 +27934,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_4); __pyx_t_4 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v__dict = __pyx_t_4; __pyx_t_4 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -28160,25 +27957,25 @@ __pyx_t_6 = (__pyx_t_5 != 0); if (__pyx_t_6) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v__dict); - __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -28187,7 +27984,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -28197,7 +27994,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self.ref_iv is not None or self.type is not None # <<<<<<<<<<<<<< @@ -28220,7 +28017,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self.ref_iv is not None or self.type is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -28230,7 +28027,7 @@ __pyx_t_6 = (__pyx_v_use_setstate != 0); if (__pyx_t_6) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self.ref_iv is not None or self.type is not None * if use_setstate: * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, None), state # <<<<<<<<<<<<<< @@ -28238,9 +28035,9 @@ * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CigarOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_CigarOperation); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -28251,7 +28048,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None); - __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); @@ -28266,7 +28063,7 @@ __pyx_t_2 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self.ref_iv is not None or self.type is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -28275,7 +28072,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, None), state * else: * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) # <<<<<<<<<<<<<< @@ -28284,9 +28081,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_CigarOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_pyx_unpickle_CigarOperation); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -28297,7 +28094,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); @@ -28312,8 +28109,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self.query_from, self.query_to, self.ref_iv, self.size, self.type) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -28332,7 +28129,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -28358,17 +28155,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_CigarOperation__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_CigarOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_CigarOperation__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_CigarOperation, (type(self), 0xb5bd29c, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -28388,7 +28185,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1150 +/* "HTSeq/_HTSeq.pyx":1162 * _re_cigar_codes = re.compile('([MIDNSHP=X])') * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -28411,15 +28208,15 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; + int __pyx_t_4; int __pyx_t_5; - int __pyx_t_6; - Py_ssize_t __pyx_t_7; - PyObject *(*__pyx_t_8)(PyObject *); + Py_ssize_t __pyx_t_6; + PyObject *(*__pyx_t_7)(PyObject *); + PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; - PyObject *__pyx_t_11 = NULL; - int __pyx_t_12; + int __pyx_t_11; + PyObject *__pyx_t_12 = NULL; PyObject *__pyx_t_13 = NULL; int __pyx_t_14; struct __pyx_opt_args_5HTSeq_6_HTSeq_build_cigar_list __pyx_t_15; @@ -28436,16 +28233,16 @@ } } - /* "HTSeq/_HTSeq.pyx":1154 + /* "HTSeq/_HTSeq.pyx":1166 * cdef int size * cdef str code * split_cigar = _re_cigar_codes.split(cigar_string) # <<<<<<<<<<<<<< * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string */ - __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_re_cigar_codes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1154, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_re_cigar_codes); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1166, __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, 1154, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1166, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; @@ -28458,44 +28255,16 @@ __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (!__pyx_t_2) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_cigar_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cigar_string}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) { - PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_cigar_string}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1154, __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 = NULL; - __Pyx_INCREF(__pyx_v_cigar_string); - __Pyx_GIVEREF(__pyx_v_cigar_string); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_cigar_string); - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1154, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_v_cigar_string) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_cigar_string); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1166, __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, 1154, __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, 1166, __pyx_L1_error) __pyx_v_split_cigar = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1155 + /* "HTSeq/_HTSeq.pyx":1167 * cdef str code * split_cigar = _re_cigar_codes.split(cigar_string) * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: # <<<<<<<<<<<<<< @@ -28504,41 +28273,41 @@ */ if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1155, __pyx_L1_error) + __PYX_ERR(0, 1167, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_split_cigar, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_split_cigar, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__12, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1155, __pyx_L1_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_1, __pyx_kp_u__12, Py_NE)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1167, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!__pyx_t_6) { + if (!__pyx_t_5) { } else { - __pyx_t_5 = __pyx_t_6; + __pyx_t_4 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1155, __pyx_L1_error) + __PYX_ERR(0, 1167, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_split_cigar); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1155, __pyx_L1_error) - __pyx_t_6 = ((__Pyx_mod_Py_ssize_t(__pyx_t_7, 2) != 1) != 0); - __pyx_t_5 = __pyx_t_6; + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_split_cigar); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1167, __pyx_L1_error) + __pyx_t_5 = ((__Pyx_mod_Py_ssize_t(__pyx_t_6, 2) != 1) != 0); + __pyx_t_4 = __pyx_t_5; __pyx_L4_bool_binop_done:; - if (unlikely(__pyx_t_5)) { + if (unlikely(__pyx_t_4)) { - /* "HTSeq/_HTSeq.pyx":1156 + /* "HTSeq/_HTSeq.pyx":1168 * split_cigar = _re_cigar_codes.split(cigar_string) * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string # <<<<<<<<<<<<<< * cl = [] * for i in range(len(split_cigar) // 2): */ - __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_Illegal_CIGAR_string_s, __pyx_v_cigar_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1156, __pyx_L1_error) + __pyx_t_1 = PyUnicode_Format(__pyx_kp_u_Illegal_CIGAR_string_s, __pyx_v_cigar_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1168, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_1, 0, 0); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __PYX_ERR(0, 1156, __pyx_L1_error) + __PYX_ERR(0, 1168, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1155 + /* "HTSeq/_HTSeq.pyx":1167 * cdef str code * split_cigar = _re_cigar_codes.split(cigar_string) * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: # <<<<<<<<<<<<<< @@ -28547,19 +28316,19 @@ */ } - /* "HTSeq/_HTSeq.pyx":1157 + /* "HTSeq/_HTSeq.pyx":1169 * if split_cigar[-1] != '' or len(split_cigar) % 2 != 1: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * cl = [] # <<<<<<<<<<<<<< * for i in range(len(split_cigar) // 2): * try: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1157, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1169, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_cl = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1158 + /* "HTSeq/_HTSeq.pyx":1170 * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * cl = [] * for i in range(len(split_cigar) // 2): # <<<<<<<<<<<<<< @@ -28568,49 +28337,49 @@ */ if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1158, __pyx_L1_error) + __PYX_ERR(0, 1170, __pyx_L1_error) } - __pyx_t_7 = PyList_GET_SIZE(__pyx_v_split_cigar); if (unlikely(__pyx_t_7 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1158, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(__pyx_t_7, 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_6 = PyList_GET_SIZE(__pyx_v_split_cigar); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1170, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__Pyx_div_Py_ssize_t(__pyx_t_6, 2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __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, 1158, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_range, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __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; + __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0; + __pyx_t_7 = NULL; } else { - __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1158, __pyx_L1_error) + __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1170, __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, 1158, __pyx_L1_error) + __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1170, __pyx_L1_error) } __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; for (;;) { - if (likely(!__pyx_t_8)) { + if (likely(!__pyx_t_7)) { if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_6 >= 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, 1158, __pyx_L1_error) + __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1170, __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, 1158, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } else { - if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_6 >= 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, 1158, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 1170, __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, 1158, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1170, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif } } else { - __pyx_t_3 = __pyx_t_8(__pyx_t_1); + __pyx_t_3 = __pyx_t_7(__pyx_t_1); 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, 1158, __pyx_L1_error) + else __PYX_ERR(0, 1170, __pyx_L1_error) } break; } @@ -28619,7 +28388,7 @@ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1159 + /* "HTSeq/_HTSeq.pyx":1171 * cl = [] * for i in range(len(split_cigar) // 2): * try: # <<<<<<<<<<<<<< @@ -28629,13 +28398,13 @@ { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign - __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11); + __Pyx_ExceptionSave(&__pyx_t_8, &__pyx_t_9, &__pyx_t_10); + __Pyx_XGOTREF(__pyx_t_8); __Pyx_XGOTREF(__pyx_t_9); __Pyx_XGOTREF(__pyx_t_10); - __Pyx_XGOTREF(__pyx_t_11); /*try:*/ { - /* "HTSeq/_HTSeq.pyx":1160 + /* "HTSeq/_HTSeq.pyx":1172 * for i in range(len(split_cigar) // 2): * try: * size = int(split_cigar[2 * i]) # <<<<<<<<<<<<<< @@ -28644,21 +28413,21 @@ */ if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1160, __pyx_L8_error) + __PYX_ERR(0, 1172, __pyx_L8_error) } - __pyx_t_3 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L8_error) + __pyx_t_3 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1172, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetItem(__pyx_v_split_cigar, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1160, __pyx_L8_error) - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_split_cigar, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1172, __pyx_L8_error) + __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1160, __pyx_L8_error) + __pyx_t_3 = __Pyx_PyNumber_Int(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1172, __pyx_L8_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1160, __pyx_L8_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1172, __pyx_L8_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_size = __pyx_t_12; + __pyx_v_size = __pyx_t_11; - /* "HTSeq/_HTSeq.pyx":1159 + /* "HTSeq/_HTSeq.pyx":1171 * cl = [] * for i in range(len(split_cigar) // 2): * try: # <<<<<<<<<<<<<< @@ -28666,62 +28435,61 @@ * except ValueError: */ } + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L15_try_end; __pyx_L8_error:; __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1161 + /* "HTSeq/_HTSeq.pyx":1173 * try: * size = int(split_cigar[2 * i]) * except ValueError: # <<<<<<<<<<<<<< * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * code = split_cigar[2 * i + 1] */ - __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); - if (__pyx_t_12) { + __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError); + if (__pyx_t_11) { __Pyx_AddTraceback("HTSeq._HTSeq.parse_cigar", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_4, &__pyx_t_2) < 0) __PYX_ERR(0, 1161, __pyx_L10_except_error) + if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_2, &__pyx_t_12) < 0) __PYX_ERR(0, 1173, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_2); + __Pyx_GOTREF(__pyx_t_12); - /* "HTSeq/_HTSeq.pyx":1162 + /* "HTSeq/_HTSeq.pyx":1174 * size = int(split_cigar[2 * i]) * except ValueError: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string # <<<<<<<<<<<<<< * code = split_cigar[2 * i + 1] * cl.append((code, size)) */ - __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_Illegal_CIGAR_string_s, __pyx_v_cigar_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1162, __pyx_L10_except_error) + __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_Illegal_CIGAR_string_s, __pyx_v_cigar_string); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1174, __pyx_L10_except_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_13, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 1162, __pyx_L10_except_error) + __PYX_ERR(0, 1174, __pyx_L10_except_error) } goto __pyx_L10_except_error; __pyx_L10_except_error:; - /* "HTSeq/_HTSeq.pyx":1159 + /* "HTSeq/_HTSeq.pyx":1171 * cl = [] * for i in range(len(split_cigar) // 2): * try: # <<<<<<<<<<<<<< * size = int(split_cigar[2 * i]) * except ValueError: */ + __Pyx_XGIVEREF(__pyx_t_8); __Pyx_XGIVEREF(__pyx_t_9); __Pyx_XGIVEREF(__pyx_t_10); - __Pyx_XGIVEREF(__pyx_t_11); - __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11); + __Pyx_ExceptionReset(__pyx_t_8, __pyx_t_9, __pyx_t_10); goto __pyx_L1_error; __pyx_L15_try_end:; } - /* "HTSeq/_HTSeq.pyx":1163 + /* "HTSeq/_HTSeq.pyx":1175 * except ValueError: * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * code = split_cigar[2 * i + 1] # <<<<<<<<<<<<<< @@ -28730,41 +28498,41 @@ */ if (unlikely(__pyx_v_split_cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1163, __pyx_L1_error) + __PYX_ERR(0, 1175, __pyx_L1_error) } - __pyx_t_2 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error) + __pyx_t_12 = PyNumber_Multiply(__pyx_int_2, __pyx_v_i); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_12, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1175, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_GetItem(__pyx_v_split_cigar, __pyx_t_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetItem(__pyx_v_split_cigar, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1163, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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, 1163, __pyx_L1_error) - __Pyx_XDECREF_SET(__pyx_v_code, ((PyObject*)__pyx_t_2)); - __pyx_t_2 = 0; + if (!(likely(PyUnicode_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_12)->tp_name), 0))) __PYX_ERR(0, 1175, __pyx_L1_error) + __Pyx_XDECREF_SET(__pyx_v_code, ((PyObject*)__pyx_t_12)); + __pyx_t_12 = 0; - /* "HTSeq/_HTSeq.pyx":1164 + /* "HTSeq/_HTSeq.pyx":1176 * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * code = split_cigar[2 * i + 1] * cl.append((code, size)) # <<<<<<<<<<<<<< * return build_cigar_list(cl, ref_left, chrom, strand) * */ - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1164, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1176, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1164, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_code); __Pyx_GIVEREF(__pyx_v_code); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_code); - __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_cl, __pyx_t_4); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1164, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_code); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_12); + __pyx_t_12 = 0; + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_cl, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1176, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1158 + /* "HTSeq/_HTSeq.pyx":1170 * raise ValueError, "Illegal CIGAR string '%s'" % cigar_string * cl = [] * for i in range(len(split_cigar) // 2): # <<<<<<<<<<<<<< @@ -28774,7 +28542,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1165 + /* "HTSeq/_HTSeq.pyx":1177 * code = split_cigar[2 * i + 1] * cl.append((code, size)) * return build_cigar_list(cl, ref_left, chrom, strand) # <<<<<<<<<<<<<< @@ -28786,13 +28554,13 @@ __pyx_t_15.ref_left = __pyx_v_ref_left; __pyx_t_15.chrom = __pyx_v_chrom; __pyx_t_15.strand = __pyx_v_strand; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(__pyx_v_cl, 0, &__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1165, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(__pyx_v_cl, 0, &__pyx_t_15); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1150 + /* "HTSeq/_HTSeq.pyx":1162 * _re_cigar_codes = re.compile('([MIDNSHP=X])') * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -28805,7 +28573,7 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); + __Pyx_XDECREF(__pyx_t_12); __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("HTSeq._HTSeq.parse_cigar", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; @@ -28874,7 +28642,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_cigar") < 0)) __PYX_ERR(0, 1150, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "parse_cigar") < 0)) __PYX_ERR(0, 1162, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -28891,7 +28659,7 @@ } __pyx_v_cigar_string = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_ref_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ref_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1150, __pyx_L3_error) + __pyx_v_ref_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ref_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1162, __pyx_L3_error) } else { __pyx_v_ref_left = ((int)0); } @@ -28900,15 +28668,15 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("parse_cigar", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1150, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("parse_cigar", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1162, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.parse_cigar", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigar_string), (&PyUnicode_Type), 1, "cigar_string", 1))) __PYX_ERR(0, 1150, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1150, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyUnicode_Type), 1, "strand", 1))) __PYX_ERR(0, 1150, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigar_string), (&PyUnicode_Type), 1, "cigar_string", 1))) __PYX_ERR(0, 1162, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1162, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyUnicode_Type), 1, "strand", 1))) __PYX_ERR(0, 1162, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_10parse_cigar(__pyx_self, __pyx_v_cigar_string, __pyx_v_ref_left, __pyx_v_chrom, __pyx_v_strand); /* function exit code */ @@ -28931,7 +28699,7 @@ __pyx_t_2.ref_left = __pyx_v_ref_left; __pyx_t_2.chrom = __pyx_v_chrom; __pyx_t_2.strand = __pyx_v_strand; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_parse_cigar(__pyx_v_cigar_string, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1150, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_parse_cigar(__pyx_v_cigar_string, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1162, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -28948,7 +28716,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1167 +/* "HTSeq/_HTSeq.pyx":1179 * return build_cigar_list(cl, ref_left, chrom, strand) * * cpdef list build_cigar_list(list cigar_pairs, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -28995,7 +28763,7 @@ } } - /* "HTSeq/_HTSeq.pyx":1171 + /* "HTSeq/_HTSeq.pyx":1183 * cdef int rpos, qpos, size * cdef str code * rpos = ref_left # <<<<<<<<<<<<<< @@ -29004,7 +28772,7 @@ */ __pyx_v_rpos = __pyx_v_ref_left; - /* "HTSeq/_HTSeq.pyx":1172 + /* "HTSeq/_HTSeq.pyx":1184 * cdef str code * rpos = ref_left * qpos = 0 # <<<<<<<<<<<<<< @@ -29013,19 +28781,19 @@ */ __pyx_v_qpos = 0; - /* "HTSeq/_HTSeq.pyx":1173 + /* "HTSeq/_HTSeq.pyx":1185 * rpos = ref_left * qpos = 0 * res = [] # <<<<<<<<<<<<<< * for code, size in cigar_pairs: * if code == 'M' or code == '=' or code == 'X': */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1173, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_res = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1174 + /* "HTSeq/_HTSeq.pyx":1186 * qpos = 0 * res = [] * for code, size in cigar_pairs: # <<<<<<<<<<<<<< @@ -29034,15 +28802,15 @@ */ if (unlikely(__pyx_v_cigar_pairs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1174, __pyx_L1_error) + __PYX_ERR(0, 1186, __pyx_L1_error) } __pyx_t_1 = __pyx_v_cigar_pairs; __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, 1174, __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, 1186, __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, 1174, __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, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) { @@ -29051,7 +28819,7 @@ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1174, __pyx_L1_error) + __PYX_ERR(0, 1186, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -29064,15 +28832,15 @@ __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_5); #else - __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; } else { Py_ssize_t index = -1; - __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1174, __pyx_L1_error) + __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1186, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_7 = Py_TYPE(__pyx_t_6)->tp_iternext; @@ -29080,7 +28848,7 @@ __Pyx_GOTREF(__pyx_t_4); index = 1; __pyx_t_5 = __pyx_t_7(__pyx_t_6); if (unlikely(!__pyx_t_5)) goto __pyx_L5_unpacking_failed; __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1174, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_6), 2) < 0) __PYX_ERR(0, 1186, __pyx_L1_error) __pyx_t_7 = NULL; __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; goto __pyx_L6_unpacking_done; @@ -29088,69 +28856,69 @@ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1174, __pyx_L1_error) + __PYX_ERR(0, 1186, __pyx_L1_error) __pyx_L6_unpacking_done:; } - 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, 1174, __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, 1174, __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, 1186, __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, 1186, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF_SET(__pyx_v_code, ((PyObject*)__pyx_t_4)); __pyx_t_4 = 0; __pyx_v_size = __pyx_t_8; - /* "HTSeq/_HTSeq.pyx":1175 + /* "HTSeq/_HTSeq.pyx":1187 * res = [] * for code, size in cigar_pairs: * if code == 'M' or code == '=' or code == 'X': # <<<<<<<<<<<<<< * res.append(CigarOperation( * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) */ - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_M, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_M, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1187, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); if (!__pyx_t_11) { } else { __pyx_t_9 = __pyx_t_11; goto __pyx_L8_bool_binop_done; } - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_kp_u__38, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_kp_u__33, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1187, __pyx_L1_error) __pyx_t_10 = (__pyx_t_11 != 0); if (!__pyx_t_10) { } else { __pyx_t_9 = __pyx_t_10; goto __pyx_L8_bool_binop_done; } - __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_X, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1175, __pyx_L1_error) + __pyx_t_10 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_X, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1187, __pyx_L1_error) __pyx_t_11 = (__pyx_t_10 != 0); __pyx_t_9 = __pyx_t_11; __pyx_L8_bool_binop_done:; if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":1177 + /* "HTSeq/_HTSeq.pyx":1189 * if code == 'M' or code == '=' or code == 'X': * res.append(CigarOperation( * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) # <<<<<<<<<<<<<< * rpos += size * qpos += size */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1177, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1189, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - /* "HTSeq/_HTSeq.pyx":1176 + /* "HTSeq/_HTSeq.pyx":1188 * for code, size in cigar_pairs: * if code == 'M' or code == '=' or code == 'X': * res.append(CigarOperation( # <<<<<<<<<<<<<< * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) * rpos += size */ - __pyx_t_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_code); __Pyx_GIVEREF(__pyx_v_code); @@ -29176,13 +28944,13 @@ __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1176, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1188, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "HTSeq/_HTSeq.pyx":1178 + /* "HTSeq/_HTSeq.pyx":1190 * res.append(CigarOperation( * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) * rpos += size # <<<<<<<<<<<<<< @@ -29191,7 +28959,7 @@ */ __pyx_v_rpos = (__pyx_v_rpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1179 + /* "HTSeq/_HTSeq.pyx":1191 * code, size, rpos, rpos + size, qpos, qpos + size, chrom, strand)) * rpos += size * qpos += size # <<<<<<<<<<<<<< @@ -29200,7 +28968,7 @@ */ __pyx_v_qpos = (__pyx_v_qpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1175 + /* "HTSeq/_HTSeq.pyx":1187 * res = [] * for code, size in cigar_pairs: * if code == 'M' or code == '=' or code == 'X': # <<<<<<<<<<<<<< @@ -29210,43 +28978,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1180 + /* "HTSeq/_HTSeq.pyx":1192 * rpos += size * qpos += size * elif code == 'I': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) */ - __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_I, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1180, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_I, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1192, __pyx_L1_error) __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1182 + /* "HTSeq/_HTSeq.pyx":1194 * elif code == 'I': * res.append(CigarOperation( * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) # <<<<<<<<<<<<<< * qpos += size * elif code == 'D': */ - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1182, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1194, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1181 + /* "HTSeq/_HTSeq.pyx":1193 * qpos += size * elif code == 'I': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size */ - __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_u_I); __Pyx_GIVEREF(__pyx_n_u_I); @@ -29272,13 +29040,13 @@ __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1181, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1193, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1183 + /* "HTSeq/_HTSeq.pyx":1195 * res.append(CigarOperation( * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size # <<<<<<<<<<<<<< @@ -29287,7 +29055,7 @@ */ __pyx_v_qpos = (__pyx_v_qpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1180 + /* "HTSeq/_HTSeq.pyx":1192 * rpos += size * qpos += size * elif code == 'I': # <<<<<<<<<<<<<< @@ -29297,43 +29065,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1184 + /* "HTSeq/_HTSeq.pyx":1196 * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size * elif code == 'D': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_D, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1184, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_D, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1196, __pyx_L1_error) __pyx_t_9 = (__pyx_t_11 != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":1186 + /* "HTSeq/_HTSeq.pyx":1198 * elif code == 'D': * res.append(CigarOperation( * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) # <<<<<<<<<<<<<< * rpos += size * elif code == 'N': */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1186, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1198, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - /* "HTSeq/_HTSeq.pyx":1185 + /* "HTSeq/_HTSeq.pyx":1197 * qpos += size * elif code == 'D': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size */ - __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_n_u_D); __Pyx_GIVEREF(__pyx_n_u_D); @@ -29359,13 +29127,13 @@ __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1185, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1197, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1187 + /* "HTSeq/_HTSeq.pyx":1199 * res.append(CigarOperation( * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size # <<<<<<<<<<<<<< @@ -29374,7 +29142,7 @@ */ __pyx_v_rpos = (__pyx_v_rpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1184 + /* "HTSeq/_HTSeq.pyx":1196 * 'I', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size * elif code == 'D': # <<<<<<<<<<<<<< @@ -29384,43 +29152,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1188 + /* "HTSeq/_HTSeq.pyx":1200 * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size * elif code == 'N': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) */ - __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_N, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1188, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_N, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1200, __pyx_L1_error) __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1190 + /* "HTSeq/_HTSeq.pyx":1202 * elif code == 'N': * res.append(CigarOperation( * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) # <<<<<<<<<<<<<< * rpos += size * elif code == 'S': */ - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int((__pyx_v_rpos + __pyx_v_size)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1190, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1202, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - /* "HTSeq/_HTSeq.pyx":1189 + /* "HTSeq/_HTSeq.pyx":1201 * rpos += size * elif code == 'N': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size */ - __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_5 = PyTuple_New(8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_n_u_N); __Pyx_GIVEREF(__pyx_n_u_N); @@ -29446,13 +29214,13 @@ __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1189, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_3); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1201, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1191 + /* "HTSeq/_HTSeq.pyx":1203 * res.append(CigarOperation( * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size # <<<<<<<<<<<<<< @@ -29461,7 +29229,7 @@ */ __pyx_v_rpos = (__pyx_v_rpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1188 + /* "HTSeq/_HTSeq.pyx":1200 * 'D', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size * elif code == 'N': # <<<<<<<<<<<<<< @@ -29471,43 +29239,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1192 + /* "HTSeq/_HTSeq.pyx":1204 * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size * elif code == 'S': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1192, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_S, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1204, __pyx_L1_error) __pyx_t_9 = (__pyx_t_11 != 0); if (__pyx_t_9) { - /* "HTSeq/_HTSeq.pyx":1194 + /* "HTSeq/_HTSeq.pyx":1206 * elif code == 'S': * res.append(CigarOperation( * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) # <<<<<<<<<<<<<< * qpos += size * elif code == 'H': */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1194, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int((__pyx_v_qpos + __pyx_v_size)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1206, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - /* "HTSeq/_HTSeq.pyx":1193 + /* "HTSeq/_HTSeq.pyx":1205 * rpos += size * elif code == 'S': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size */ - __pyx_t_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(8); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_n_u_S); __Pyx_GIVEREF(__pyx_n_u_S); @@ -29533,13 +29301,13 @@ __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1205, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1193, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1205, __pyx_L1_error) __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "HTSeq/_HTSeq.pyx":1195 + /* "HTSeq/_HTSeq.pyx":1207 * res.append(CigarOperation( * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size # <<<<<<<<<<<<<< @@ -29548,7 +29316,7 @@ */ __pyx_v_qpos = (__pyx_v_qpos + __pyx_v_size); - /* "HTSeq/_HTSeq.pyx":1192 + /* "HTSeq/_HTSeq.pyx":1204 * 'N', size, rpos, rpos + size, qpos, qpos, chrom, strand)) * rpos += size * elif code == 'S': # <<<<<<<<<<<<<< @@ -29558,43 +29326,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1196 + /* "HTSeq/_HTSeq.pyx":1208 * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size * elif code == 'H': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) */ - __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_H, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1196, __pyx_L1_error) + __pyx_t_9 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_H, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1208, __pyx_L1_error) __pyx_t_11 = (__pyx_t_9 != 0); if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1198 + /* "HTSeq/_HTSeq.pyx":1210 * elif code == 'H': * res.append(CigarOperation( * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) # <<<<<<<<<<<<<< * elif code == 'P': * res.append(CigarOperation( */ - __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1198, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1197 + /* "HTSeq/_HTSeq.pyx":1209 * qpos += size * elif code == 'H': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) * elif code == 'P': */ - __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_3 = PyTuple_New(8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_n_u_H); __Pyx_GIVEREF(__pyx_n_u_H); @@ -29620,13 +29388,13 @@ __pyx_t_6 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1197, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_5); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1209, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1196 + /* "HTSeq/_HTSeq.pyx":1208 * 'S', size, rpos, rpos, qpos, qpos + size, chrom, strand)) * qpos += size * elif code == 'H': # <<<<<<<<<<<<<< @@ -29636,43 +29404,43 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1199 + /* "HTSeq/_HTSeq.pyx":1211 * res.append(CigarOperation( * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) * elif code == 'P': # <<<<<<<<<<<<<< * res.append(CigarOperation( * 'P', size, rpos, rpos, qpos, qpos, chrom, strand)) */ - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_P, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1199, __pyx_L1_error) + __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_v_code, __pyx_n_u_P, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1211, __pyx_L1_error) __pyx_t_9 = (__pyx_t_11 != 0); if (likely(__pyx_t_9)) { - /* "HTSeq/_HTSeq.pyx":1201 + /* "HTSeq/_HTSeq.pyx":1213 * elif code == 'P': * res.append(CigarOperation( * 'P', size, rpos, rpos, qpos, qpos, chrom, strand)) # <<<<<<<<<<<<<< * else: * raise ValueError, "Unknown CIGAR code '%s' encountered." % code */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_rpos); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1201, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_From_int(__pyx_v_qpos); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1213, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); - /* "HTSeq/_HTSeq.pyx":1200 + /* "HTSeq/_HTSeq.pyx":1212 * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) * elif code == 'P': * res.append(CigarOperation( # <<<<<<<<<<<<<< * 'P', size, rpos, rpos, qpos, qpos, chrom, strand)) * else: */ - __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_INCREF(__pyx_n_u_P); __Pyx_GIVEREF(__pyx_n_u_P); @@ -29698,13 +29466,13 @@ __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_13 = 0; - __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1200, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_13); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 1212, __pyx_L1_error) __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1199 + /* "HTSeq/_HTSeq.pyx":1211 * res.append(CigarOperation( * 'H', size, rpos, rpos, qpos, qpos, chrom, strand)) * elif code == 'P': # <<<<<<<<<<<<<< @@ -29714,7 +29482,7 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1203 + /* "HTSeq/_HTSeq.pyx":1215 * 'P', size, rpos, rpos, qpos, qpos, chrom, strand)) * else: * raise ValueError, "Unknown CIGAR code '%s' encountered." % code # <<<<<<<<<<<<<< @@ -29722,15 +29490,15 @@ * */ /*else*/ { - __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_Unknown_CIGAR_code_s_encountered, __pyx_v_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1203, __pyx_L1_error) + __pyx_t_13 = PyUnicode_Format(__pyx_kp_u_Unknown_CIGAR_code_s_encountered, __pyx_v_code); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1215, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_13, 0, 0); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - __PYX_ERR(0, 1203, __pyx_L1_error) + __PYX_ERR(0, 1215, __pyx_L1_error) } __pyx_L7:; - /* "HTSeq/_HTSeq.pyx":1174 + /* "HTSeq/_HTSeq.pyx":1186 * qpos = 0 * res = [] * for code, size in cigar_pairs: # <<<<<<<<<<<<<< @@ -29740,7 +29508,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1204 + /* "HTSeq/_HTSeq.pyx":1216 * else: * raise ValueError, "Unknown CIGAR code '%s' encountered." % code * return res # <<<<<<<<<<<<<< @@ -29752,7 +29520,7 @@ __pyx_r = __pyx_v_res; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1167 + /* "HTSeq/_HTSeq.pyx":1179 * return build_cigar_list(cl, ref_left, chrom, strand) * * cpdef list build_cigar_list(list cigar_pairs, int ref_left=0, str chrom="", str strand="."): # <<<<<<<<<<<<<< @@ -29834,7 +29602,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_cigar_list") < 0)) __PYX_ERR(0, 1167, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "build_cigar_list") < 0)) __PYX_ERR(0, 1179, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -29851,7 +29619,7 @@ } __pyx_v_cigar_pairs = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_ref_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ref_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1167, __pyx_L3_error) + __pyx_v_ref_left = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_ref_left == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1179, __pyx_L3_error) } else { __pyx_v_ref_left = ((int)0); } @@ -29860,15 +29628,15 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("build_cigar_list", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1167, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("build_cigar_list", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1179, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.build_cigar_list", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigar_pairs), (&PyList_Type), 1, "cigar_pairs", 1))) __PYX_ERR(0, 1167, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1167, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyUnicode_Type), 1, "strand", 1))) __PYX_ERR(0, 1167, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_cigar_pairs), (&PyList_Type), 1, "cigar_pairs", 1))) __PYX_ERR(0, 1179, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_chrom), (&PyUnicode_Type), 1, "chrom", 1))) __PYX_ERR(0, 1179, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_strand), (&PyUnicode_Type), 1, "strand", 1))) __PYX_ERR(0, 1179, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_12build_cigar_list(__pyx_self, __pyx_v_cigar_pairs, __pyx_v_ref_left, __pyx_v_chrom, __pyx_v_strand); /* function exit code */ @@ -29891,7 +29659,7 @@ __pyx_t_2.ref_left = __pyx_v_ref_left; __pyx_t_2.chrom = __pyx_v_chrom; __pyx_t_2.strand = __pyx_v_strand; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(__pyx_v_cigar_pairs, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1167, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(__pyx_v_cigar_pairs, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -29908,7 +29676,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1206 +/* "HTSeq/_HTSeq.pyx":1218 * return res * * cdef _parse_SAM_optional_field_value(str field): # <<<<<<<<<<<<<< @@ -29931,7 +29699,7 @@ PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("_parse_SAM_optional_field_value", 0); - /* "HTSeq/_HTSeq.pyx":1207 + /* "HTSeq/_HTSeq.pyx":1219 * * cdef _parse_SAM_optional_field_value(str field): * if len(field) < 5 or field[2] != ':' or field[4] != ':': # <<<<<<<<<<<<<< @@ -29940,42 +29708,42 @@ */ if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1207, __pyx_L1_error) + __PYX_ERR(0, 1219, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_field); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyUnicode_GET_LENGTH(__pyx_v_field); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1219, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_2 < 5) != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1219, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_4 != 58) != 0); if (!__pyx_t_3) { } else { __pyx_t_1 = __pyx_t_3; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1207, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1219, __pyx_L1_error) __pyx_t_3 = ((__pyx_t_4 != 58) != 0); __pyx_t_1 = __pyx_t_3; __pyx_L4_bool_binop_done:; if (unlikely(__pyx_t_1)) { - /* "HTSeq/_HTSeq.pyx":1208 + /* "HTSeq/_HTSeq.pyx":1220 * cdef _parse_SAM_optional_field_value(str field): * if len(field) < 5 or field[2] != ':' or field[4] != ':': * raise ValueError, "Malformatted SAM optional field '%'" % field # <<<<<<<<<<<<<< * if field[3] == 'A': * return field[5] */ - __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_Malformatted_SAM_optional_field, __pyx_v_field); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1208, __pyx_L1_error) + __pyx_t_5 = PyUnicode_Format(__pyx_kp_u_Malformatted_SAM_optional_field, __pyx_v_field); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1220, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_5, 0, 0); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __PYX_ERR(0, 1208, __pyx_L1_error) + __PYX_ERR(0, 1220, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1207 + /* "HTSeq/_HTSeq.pyx":1219 * * cdef _parse_SAM_optional_field_value(str field): * if len(field) < 5 or field[2] != ':' or field[4] != ':': # <<<<<<<<<<<<<< @@ -29984,18 +29752,18 @@ */ } - /* "HTSeq/_HTSeq.pyx":1209 + /* "HTSeq/_HTSeq.pyx":1221 * if len(field) < 5 or field[2] != ':' or field[4] != ':': * raise ValueError, "Malformatted SAM optional field '%'" % field * if field[3] == 'A': # <<<<<<<<<<<<<< * return field[5] * elif field[3] == 'i': */ - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1209, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1221, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_4 == 65) != 0); if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1210 + /* "HTSeq/_HTSeq.pyx":1222 * raise ValueError, "Malformatted SAM optional field '%'" % field * if field[3] == 'A': * return field[5] # <<<<<<<<<<<<<< @@ -30003,14 +29771,14 @@ * return int(field[5:]) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1210, __pyx_L1_error) - __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1210, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1222, __pyx_L1_error) + __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1222, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1209 + /* "HTSeq/_HTSeq.pyx":1221 * if len(field) < 5 or field[2] != ':' or field[4] != ':': * raise ValueError, "Malformatted SAM optional field '%'" % field * if field[3] == 'A': # <<<<<<<<<<<<<< @@ -30019,18 +29787,18 @@ */ } - /* "HTSeq/_HTSeq.pyx":1211 + /* "HTSeq/_HTSeq.pyx":1223 * if field[3] == 'A': * return field[5] * elif field[3] == 'i': # <<<<<<<<<<<<<< * return int(field[5:]) * elif field[3] == 'f': */ - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1211, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1223, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_4 == 0x69) != 0); if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1212 + /* "HTSeq/_HTSeq.pyx":1224 * return field[5] * elif field[3] == 'i': * return int(field[5:]) # <<<<<<<<<<<<<< @@ -30040,18 +29808,18 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1212, __pyx_L1_error) + __PYX_ERR(0, 1224, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1212, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1224, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = __pyx_t_6; __pyx_t_6 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1211 + /* "HTSeq/_HTSeq.pyx":1223 * if field[3] == 'A': * return field[5] * elif field[3] == 'i': # <<<<<<<<<<<<<< @@ -30060,18 +29828,18 @@ */ } - /* "HTSeq/_HTSeq.pyx":1213 + /* "HTSeq/_HTSeq.pyx":1225 * elif field[3] == 'i': * return int(field[5:]) * elif field[3] == 'f': # <<<<<<<<<<<<<< * return float(field[5:]) * elif field[3] == 'Z': */ - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1213, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1225, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_4 == 0x66) != 0); if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1214 + /* "HTSeq/_HTSeq.pyx":1226 * return int(field[5:]) * elif field[3] == 'f': * return float(field[5:]) # <<<<<<<<<<<<<< @@ -30081,18 +29849,18 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1214, __pyx_L1_error) + __PYX_ERR(0, 1226, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyUnicode_Substring(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Substring(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1226, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1214, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyNumber_Float(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1226, __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; - /* "HTSeq/_HTSeq.pyx":1213 + /* "HTSeq/_HTSeq.pyx":1225 * elif field[3] == 'i': * return int(field[5:]) * elif field[3] == 'f': # <<<<<<<<<<<<<< @@ -30101,18 +29869,18 @@ */ } - /* "HTSeq/_HTSeq.pyx":1215 + /* "HTSeq/_HTSeq.pyx":1227 * elif field[3] == 'f': * return float(field[5:]) * elif field[3] == 'Z': # <<<<<<<<<<<<<< * return field[5:] * elif field[3] == 'H': */ - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1215, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1227, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_4 == 90) != 0); if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1216 + /* "HTSeq/_HTSeq.pyx":1228 * return float(field[5:]) * elif field[3] == 'Z': * return field[5:] # <<<<<<<<<<<<<< @@ -30122,15 +29890,15 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1216, __pyx_L1_error) + __PYX_ERR(0, 1228, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1216, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1215 + /* "HTSeq/_HTSeq.pyx":1227 * elif field[3] == 'f': * return float(field[5:]) * elif field[3] == 'Z': # <<<<<<<<<<<<<< @@ -30139,18 +29907,18 @@ */ } - /* "HTSeq/_HTSeq.pyx":1217 + /* "HTSeq/_HTSeq.pyx":1229 * elif field[3] == 'Z': * return field[5:] * elif field[3] == 'H': # <<<<<<<<<<<<<< * return int(field[5:], 16) * elif field[3] == 'B': */ - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1217, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1229, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_4 == 72) != 0); if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1218 + /* "HTSeq/_HTSeq.pyx":1230 * return field[5:] * elif field[3] == 'H': * return int(field[5:], 16) # <<<<<<<<<<<<<< @@ -30160,11 +29928,11 @@ __Pyx_XDECREF(__pyx_r); if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1218, __pyx_L1_error) + __PYX_ERR(0, 1230, __pyx_L1_error) } - __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_Substring(__pyx_v_field, 5, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1218, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1230, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); @@ -30172,14 +29940,14 @@ __Pyx_GIVEREF(__pyx_int_16); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_int_16); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1218, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyInt_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1230, __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; - /* "HTSeq/_HTSeq.pyx":1217 + /* "HTSeq/_HTSeq.pyx":1229 * elif field[3] == 'Z': * return field[5:] * elif field[3] == 'H': # <<<<<<<<<<<<<< @@ -30188,29 +29956,29 @@ */ } - /* "HTSeq/_HTSeq.pyx":1219 + /* "HTSeq/_HTSeq.pyx":1231 * elif field[3] == 'H': * return int(field[5:], 16) * elif field[3] == 'B': # <<<<<<<<<<<<<< * if field[5] == 'f': * return numpy.array(field[7:].split(','), float) */ - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1219, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1231, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_4 == 66) != 0); if (likely(__pyx_t_1)) { - /* "HTSeq/_HTSeq.pyx":1220 + /* "HTSeq/_HTSeq.pyx":1232 * return int(field[5:], 16) * elif field[3] == 'B': * if field[5] == 'f': # <<<<<<<<<<<<<< * return numpy.array(field[7:].split(','), float) * else: */ - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1220, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1232, __pyx_L1_error) __pyx_t_1 = ((__pyx_t_4 == 0x66) != 0); if (__pyx_t_1) { - /* "HTSeq/_HTSeq.pyx":1221 + /* "HTSeq/_HTSeq.pyx":1233 * elif field[3] == 'B': * if field[5] == 'f': * return numpy.array(field[7:].split(','), float) # <<<<<<<<<<<<<< @@ -30218,18 +29986,18 @@ * return numpy.array(field[7:].split(','), int) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_numpy); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_array); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1221, __pyx_L1_error) + __PYX_ERR(0, 1233, __pyx_L1_error) } - __pyx_t_6 = __Pyx_PyUnicode_Substring(__pyx_v_field, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Substring(__pyx_v_field, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = PyUnicode_Split(((PyObject*)__pyx_t_6), __pyx_kp_u__4, -1L); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_t_8 = PyUnicode_Split(((PyObject*)__pyx_t_6), __pyx_kp_u__4, -1L); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; @@ -30247,7 +30015,7 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, ((PyObject *)(&PyFloat_Type))}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -30256,14 +30024,14 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, ((PyObject *)(&PyFloat_Type))}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { - __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); if (__pyx_t_6) { __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; @@ -30274,7 +30042,7 @@ __Pyx_GIVEREF(((PyObject *)(&PyFloat_Type))); PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, ((PyObject *)(&PyFloat_Type))); __pyx_t_8 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1221, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1233, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } @@ -30283,7 +30051,7 @@ __pyx_t_5 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1220 + /* "HTSeq/_HTSeq.pyx":1232 * return int(field[5:], 16) * elif field[3] == 'B': * if field[5] == 'f': # <<<<<<<<<<<<<< @@ -30292,7 +30060,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1223 + /* "HTSeq/_HTSeq.pyx":1235 * return numpy.array(field[7:].split(','), float) * else: * return numpy.array(field[7:].split(','), int) # <<<<<<<<<<<<<< @@ -30301,18 +30069,18 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1223, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_numpy); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_array); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v_field == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1223, __pyx_L1_error) + __PYX_ERR(0, 1235, __pyx_L1_error) } - __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_field, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyUnicode_Substring(__pyx_v_field, 7, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = PyUnicode_Split(((PyObject*)__pyx_t_7), __pyx_kp_u__4, -1L); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_8 = PyUnicode_Split(((PyObject*)__pyx_t_7), __pyx_kp_u__4, -1L); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = NULL; @@ -30330,7 +30098,7 @@ #if CYTHON_FAST_PYCALL if (PyFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, ((PyObject *)(&PyInt_Type))}; - __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; @@ -30339,14 +30107,14 @@ #if CYTHON_FAST_PYCCALL if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) { PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_8, ((PyObject *)(&PyInt_Type))}; - __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; } else #endif { - __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); if (__pyx_t_7) { __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL; @@ -30357,7 +30125,7 @@ __Pyx_GIVEREF(((PyObject *)(&PyInt_Type))); PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, ((PyObject *)(&PyInt_Type))); __pyx_t_8 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1235, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } @@ -30367,7 +30135,7 @@ goto __pyx_L0; } - /* "HTSeq/_HTSeq.pyx":1219 + /* "HTSeq/_HTSeq.pyx":1231 * elif field[3] == 'H': * return int(field[5:], 16) * elif field[3] == 'B': # <<<<<<<<<<<<<< @@ -30376,7 +30144,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1225 + /* "HTSeq/_HTSeq.pyx":1237 * return numpy.array(field[7:].split(','), int) * else: * raise ValueError, "SAM optional field with illegal type letter '%s'" % field[2] # <<<<<<<<<<<<<< @@ -30384,18 +30152,18 @@ * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] */ /*else*/ { - __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1225, __pyx_L1_error) - __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt_Unicode(__pyx_v_field, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_4 == (Py_UCS4)-1)) __PYX_ERR(0, 1237, __pyx_L1_error) + __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_SAM_optional_field_with_illegal, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1225, __pyx_L1_error) + __pyx_t_10 = PyUnicode_Format(__pyx_kp_u_SAM_optional_field_with_illegal, __pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1237, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_10, 0, 0); __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __PYX_ERR(0, 1225, __pyx_L1_error) + __PYX_ERR(0, 1237, __pyx_L1_error) } - /* "HTSeq/_HTSeq.pyx":1206 + /* "HTSeq/_HTSeq.pyx":1218 * return res * * cdef _parse_SAM_optional_field_value(str field): # <<<<<<<<<<<<<< @@ -30418,7 +30186,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1241 +/* "HTSeq/_HTSeq.pyx":1253 * """ * * def to_pysam_AlignedSegment(self, sf): # <<<<<<<<<<<<<< @@ -30454,12 +30222,13 @@ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; + PyObject *__pyx_t_10 = NULL; int __pyx_t_11; - Py_ssize_t __pyx_t_12; + int __pyx_t_12; + Py_ssize_t __pyx_t_13; __Pyx_RefNannySetupContext("to_pysam_AlignedSegment", 0); - /* "HTSeq/_HTSeq.pyx":1242 + /* "HTSeq/_HTSeq.pyx":1254 * * def to_pysam_AlignedSegment(self, sf): * try: # <<<<<<<<<<<<<< @@ -30475,19 +30244,19 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "HTSeq/_HTSeq.pyx":1243 + /* "HTSeq/_HTSeq.pyx":1255 * def to_pysam_AlignedSegment(self, sf): * try: * import pysam # <<<<<<<<<<<<<< * except ImportError: * sys.stderr.write( */ - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pysam, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1243, __pyx_L3_error) + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pysam, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1255, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_pysam = __pyx_t_4; __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1242 + /* "HTSeq/_HTSeq.pyx":1254 * * def to_pysam_AlignedSegment(self, sf): * try: # <<<<<<<<<<<<<< @@ -30502,7 +30271,7 @@ __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1244 + /* "HTSeq/_HTSeq.pyx":1256 * try: * import pysam * except ImportError: # <<<<<<<<<<<<<< @@ -30512,32 +30281,44 @@ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_5) { __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.to_pysam_AlignedSegment", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1244, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1256, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "HTSeq/_HTSeq.pyx":1245 + /* "HTSeq/_HTSeq.pyx":1257 * import pysam * except ImportError: * sys.stderr.write( # <<<<<<<<<<<<<< * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") * raise */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1245, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_stderr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1245, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1257, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1245, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1257, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1245, __pyx_L5_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1257, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_kp_u_Please_Install_PySam_to_use_this) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_u_Please_Install_PySam_to_use_this); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1257, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "HTSeq/_HTSeq.pyx":1247 + /* "HTSeq/_HTSeq.pyx":1259 * sys.stderr.write( * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") * raise # <<<<<<<<<<<<<< @@ -30549,12 +30330,12 @@ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_6, __pyx_t_7); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; - __PYX_ERR(0, 1247, __pyx_L5_except_error) + __PYX_ERR(0, 1259, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "HTSeq/_HTSeq.pyx":1242 + /* "HTSeq/_HTSeq.pyx":1254 * * def to_pysam_AlignedSegment(self, sf): * try: # <<<<<<<<<<<<<< @@ -30569,14 +30350,14 @@ __pyx_L8_try_end:; } - /* "HTSeq/_HTSeq.pyx":1249 + /* "HTSeq/_HTSeq.pyx":1261 * raise * * a = pysam.AlignedSegment() # <<<<<<<<<<<<<< * a.query_sequence = self.read.seq if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().seq * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pysam, __pyx_n_s_AlignedSegment); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1249, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pysam, __pyx_n_s_AlignedSegment); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -30588,169 +30369,160 @@ __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1249, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1249, __pyx_L1_error) - } + __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1261, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a = __pyx_t_7; __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1250 + /* "HTSeq/_HTSeq.pyx":1262 * * a = pysam.AlignedSegment() * a.query_sequence = self.read.seq if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().seq # <<<<<<<<<<<<<< * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual * a.query_name = self.read.name */ - __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1250, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1262, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!__pyx_t_11) { + if (!__pyx_t_12) { } else { - __pyx_t_10 = __pyx_t_11; + __pyx_t_11 = __pyx_t_12; goto __pyx_L11_bool_binop_done; } - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u__19, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_6, __pyx_kp_u__19, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_10 = __pyx_t_11; + __pyx_t_11 = __pyx_t_12; __pyx_L11_bool_binop_done:; - if (__pyx_t_10) { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1250, __pyx_L1_error) + if (__pyx_t_11) { + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_seq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_seq); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_7 = __pyx_t_4; __pyx_t_4 = 0; } else { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1250, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1250, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_9); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8); if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8); __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_9, function); + __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (__pyx_t_6) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1250, __pyx_L1_error) - } + __pyx_t_4 = (__pyx_t_6) ? __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallNoArg(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1262, __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_seq); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1250, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_seq); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1262, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_7 = __pyx_t_9; - __pyx_t_9 = 0; + __pyx_t_7 = __pyx_t_8; + __pyx_t_8 = 0; } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_sequence, __pyx_t_7) < 0) __PYX_ERR(0, 1250, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_sequence, __pyx_t_7) < 0) __PYX_ERR(0, 1262, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1251 + /* "HTSeq/_HTSeq.pyx":1263 * a = pysam.AlignedSegment() * a.query_sequence = self.read.seq if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().seq * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual # <<<<<<<<<<<<<< * a.query_name = self.read.name * a.flag = self.flag */ - __pyx_t_9 = PyObject_RichCompare(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1251, __pyx_L1_error) - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1251, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (!__pyx_t_11) { + __pyx_t_8 = PyObject_RichCompare(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_8); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1263, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1263, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (!__pyx_t_12) { } else { - __pyx_t_10 = __pyx_t_11; + __pyx_t_11 = __pyx_t_12; goto __pyx_L13_bool_binop_done; } - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1251, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_11 = (__Pyx_PyUnicode_Equals(__pyx_t_9, __pyx_kp_u__19, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1251, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_10 = __pyx_t_11; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.__pyx_base.iv), __pyx_n_s_strand); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_12 = (__Pyx_PyUnicode_Equals(__pyx_t_8, __pyx_kp_u__19, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1263, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_11 = __pyx_t_12; __pyx_L13_bool_binop_done:; - if (__pyx_t_10) { - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1251, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_qual); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error) + if (__pyx_t_11) { + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_qual); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_7 = __pyx_t_4; __pyx_t_4 = 0; } else { - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1251, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1263, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_get_reverse_complement); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_9)) { + __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6); + if (likely(__pyx_t_8)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_9) { - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } else { - __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1251, __pyx_L1_error) - } + __pyx_t_4 = (__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_4)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_qual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1251, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_qual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_t_7 = __pyx_t_6; __pyx_t_6 = 0; } - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_qualities, __pyx_t_7) < 0) __PYX_ERR(0, 1251, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_qualities, __pyx_t_7) < 0) __PYX_ERR(0, 1263, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1252 + /* "HTSeq/_HTSeq.pyx":1264 * a.query_sequence = self.read.seq if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().seq * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual * a.query_name = self.read.name # <<<<<<<<<<<<<< * a.flag = self.flag * a.tags = self.optional_fields */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1252, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1264, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_name, __pyx_t_6) < 0) __PYX_ERR(0, 1252, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_query_name, __pyx_t_6) < 0) __PYX_ERR(0, 1264, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1253 + /* "HTSeq/_HTSeq.pyx":1265 * a.query_qualities = self.read.qual if self.iv == None or self.iv.strand == '+' else self.read.get_reverse_complement().qual * a.query_name = self.read.name * a.flag = self.flag # <<<<<<<<<<<<<< * a.tags = self.optional_fields * if self.aligned: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1253, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1253, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1265, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1254 + /* "HTSeq/_HTSeq.pyx":1266 * a.query_name = self.read.name * a.flag = self.flag * a.tags = self.optional_fields # <<<<<<<<<<<<<< @@ -30759,23 +30531,23 @@ */ __pyx_t_6 = __pyx_v_self->optional_fields; __Pyx_INCREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tags, __pyx_t_6) < 0) __PYX_ERR(0, 1254, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tags, __pyx_t_6) < 0) __PYX_ERR(0, 1266, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1255 + /* "HTSeq/_HTSeq.pyx":1267 * a.flag = self.flag * a.tags = self.optional_fields * if self.aligned: # <<<<<<<<<<<<<< * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1255, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1267, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_10) { + if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1256 + /* "HTSeq/_HTSeq.pyx":1268 * a.tags = self.optional_fields * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< @@ -30783,10 +30555,10 @@ * a.reference_start = self.iv.start */ { /* enter inner scope */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1256, __pyx_L18_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1268, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_6); - /* "HTSeq/_HTSeq.pyx":1257 + /* "HTSeq/_HTSeq.pyx":1269 * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] # <<<<<<<<<<<<<< @@ -30795,49 +30567,49 @@ */ if (unlikely(__pyx_v_self->cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1257, __pyx_L18_error) + __PYX_ERR(0, 1269, __pyx_L18_error) } - __pyx_t_7 = __pyx_v_self->cigar; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0; + __pyx_t_7 = __pyx_v_self->cigar; __Pyx_INCREF(__pyx_t_7); __pyx_t_13 = 0; for (;;) { - if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_7)) break; + if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1257, __pyx_L18_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_13); __Pyx_INCREF(__pyx_t_4); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 1269, __pyx_L18_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1257, __pyx_L18_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1269, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_8genexpr2__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1256 + /* "HTSeq/_HTSeq.pyx":1268 * a.tags = self.optional_fields * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.reference_start = self.iv.start */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_code_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L18_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cigar_operation_code_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1268, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_c, __pyx_n_s_type_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1256, __pyx_L18_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1256, __pyx_L18_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_c, __pyx_n_s_type_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_c, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1256, __pyx_L18_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1268, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1256, __pyx_L18_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr2__pyx_v_c, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1268, __pyx_L18_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1268, __pyx_L18_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9); - __pyx_t_8 = 0; + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8); __pyx_t_9 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1256, __pyx_L18_error) + __pyx_t_8 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1268, __pyx_L18_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1257 + /* "HTSeq/_HTSeq.pyx":1269 * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] # <<<<<<<<<<<<<< @@ -30854,36 +30626,36 @@ __pyx_L21_exit_scope:; } /* exit inner scope */ - /* "HTSeq/_HTSeq.pyx":1256 + /* "HTSeq/_HTSeq.pyx":1268 * a.tags = self.optional_fields * if self.aligned: * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.reference_start = self.iv.start */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_cigartuples, __pyx_t_6) < 0) __PYX_ERR(0, 1256, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_cigartuples, __pyx_t_6) < 0) __PYX_ERR(0, 1268, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1258 + /* "HTSeq/_HTSeq.pyx":1270 * a.cigartuples = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] * a.reference_start = self.iv.start # <<<<<<<<<<<<<< * a.reference_id = sf.gettid(self.iv.chrom) * a.template_length = self.inferred_insert_size */ - __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->__pyx_base.__pyx_base.iv->start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1258, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->__pyx_base.__pyx_base.iv->start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_start, __pyx_t_6) < 0) __PYX_ERR(0, 1258, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_start, __pyx_t_6) < 0) __PYX_ERR(0, 1270, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1259 + /* "HTSeq/_HTSeq.pyx":1271 * for c in self.cigar] * a.reference_start = self.iv.start * a.reference_id = sf.gettid(self.iv.chrom) # <<<<<<<<<<<<<< * a.template_length = self.inferred_insert_size * a.mapping_quality = self.aQual */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1259, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -30895,67 +30667,39 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1259, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1259, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1259, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1259, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1259, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1271, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_id, __pyx_t_6) < 0) __PYX_ERR(0, 1259, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_id, __pyx_t_6) < 0) __PYX_ERR(0, 1271, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1260 + /* "HTSeq/_HTSeq.pyx":1272 * a.reference_start = self.iv.start * a.reference_id = sf.gettid(self.iv.chrom) * a.template_length = self.inferred_insert_size # <<<<<<<<<<<<<< * a.mapping_quality = self.aQual * else: */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1260, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_template_length, __pyx_t_6) < 0) __PYX_ERR(0, 1260, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_template_length, __pyx_t_6) < 0) __PYX_ERR(0, 1272, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1261 + /* "HTSeq/_HTSeq.pyx":1273 * a.reference_id = sf.gettid(self.iv.chrom) * a.template_length = self.inferred_insert_size * a.mapping_quality = self.aQual # <<<<<<<<<<<<<< * else: * a.reference_start = -1 */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1261, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mapping_quality, __pyx_t_6) < 0) __PYX_ERR(0, 1261, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mapping_quality, __pyx_t_6) < 0) __PYX_ERR(0, 1273, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1255 + /* "HTSeq/_HTSeq.pyx":1267 * a.flag = self.flag * a.tags = self.optional_fields * if self.aligned: # <<<<<<<<<<<<<< @@ -30965,7 +30709,7 @@ goto __pyx_L15; } - /* "HTSeq/_HTSeq.pyx":1263 + /* "HTSeq/_HTSeq.pyx":1275 * a.mapping_quality = self.aQual * else: * a.reference_start = -1 # <<<<<<<<<<<<<< @@ -30973,100 +30717,72 @@ * if self.mate_aligned: */ /*else*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_start, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1263, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_start, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1275, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1264 + /* "HTSeq/_HTSeq.pyx":1276 * else: * a.reference_start = -1 * a.reference_id = -1 # <<<<<<<<<<<<<< * if self.mate_aligned: * a.next_reference_id = sf.gettid(self.mate_start.chrom) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_id, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1264, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_reference_id, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1276, __pyx_L1_error) } __pyx_L15:; - /* "HTSeq/_HTSeq.pyx":1265 + /* "HTSeq/_HTSeq.pyx":1277 * a.reference_start = -1 * a.reference_id = -1 * if self.mate_aligned: # <<<<<<<<<<<<<< * a.next_reference_id = sf.gettid(self.mate_start.chrom) * a.next_reference_start = self.mate_start.start */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mate_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mate_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1265, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1277, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_10) { + if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1266 + /* "HTSeq/_HTSeq.pyx":1278 * a.reference_id = -1 * if self.mate_aligned: * a.next_reference_id = sf.gettid(self.mate_start.chrom) # <<<<<<<<<<<<<< * a.next_reference_start = self.mate_start.start * else: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1266, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_9)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_9) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->mate_start->__pyx_base.chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_self->mate_start->__pyx_base.chrom}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_self->mate_start->__pyx_base.chrom}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1266, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_INCREF(__pyx_v_self->mate_start->__pyx_base.chrom); - __Pyx_GIVEREF(__pyx_v_self->mate_start->__pyx_base.chrom); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self->mate_start->__pyx_base.chrom); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1266, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->mate_start->__pyx_base.chrom) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->mate_start->__pyx_base.chrom); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1278, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_id, __pyx_t_6) < 0) __PYX_ERR(0, 1266, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_id, __pyx_t_6) < 0) __PYX_ERR(0, 1278, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1267 + /* "HTSeq/_HTSeq.pyx":1279 * if self.mate_aligned: * a.next_reference_id = sf.gettid(self.mate_start.chrom) * a.next_reference_start = self.mate_start.start # <<<<<<<<<<<<<< * else: * a.next_reference_id = -1 */ - __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->mate_start->__pyx_base.start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1267, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->mate_start->__pyx_base.start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_start, __pyx_t_6) < 0) __PYX_ERR(0, 1267, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_start, __pyx_t_6) < 0) __PYX_ERR(0, 1279, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1265 + /* "HTSeq/_HTSeq.pyx":1277 * a.reference_start = -1 * a.reference_id = -1 * if self.mate_aligned: # <<<<<<<<<<<<<< @@ -31076,7 +30792,7 @@ goto __pyx_L22; } - /* "HTSeq/_HTSeq.pyx":1269 + /* "HTSeq/_HTSeq.pyx":1281 * a.next_reference_start = self.mate_start.start * else: * a.next_reference_id = -1 # <<<<<<<<<<<<<< @@ -31084,20 +30800,20 @@ * return a */ /*else*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_id, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1269, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_id, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1281, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1270 + /* "HTSeq/_HTSeq.pyx":1282 * else: * a.next_reference_id = -1 * a.next_reference_start = -1 # <<<<<<<<<<<<<< * return a * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_start, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1270, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_next_reference_start, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1282, __pyx_L1_error) } __pyx_L22:; - /* "HTSeq/_HTSeq.pyx":1271 + /* "HTSeq/_HTSeq.pyx":1283 * a.next_reference_id = -1 * a.next_reference_start = -1 * return a # <<<<<<<<<<<<<< @@ -31109,7 +30825,7 @@ __pyx_r = __pyx_v_a; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1241 + /* "HTSeq/_HTSeq.pyx":1253 * """ * * def to_pysam_AlignedSegment(self, sf): # <<<<<<<<<<<<<< @@ -31124,6 +30840,7 @@ __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.to_pysam_AlignedSegment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -31135,7 +30852,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1273 +/* "HTSeq/_HTSeq.pyx":1285 * return a * * def to_pysam_AlignedRead(self, sf): # <<<<<<<<<<<<<< @@ -31171,11 +30888,12 @@ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - int __pyx_t_10; - Py_ssize_t __pyx_t_11; + PyObject *__pyx_t_10 = NULL; + int __pyx_t_11; + Py_ssize_t __pyx_t_12; __Pyx_RefNannySetupContext("to_pysam_AlignedRead", 0); - /* "HTSeq/_HTSeq.pyx":1274 + /* "HTSeq/_HTSeq.pyx":1286 * * def to_pysam_AlignedRead(self, sf): * try: # <<<<<<<<<<<<<< @@ -31191,19 +30909,19 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "HTSeq/_HTSeq.pyx":1275 + /* "HTSeq/_HTSeq.pyx":1287 * def to_pysam_AlignedRead(self, sf): * try: * import pysam # <<<<<<<<<<<<<< * except ImportError: * sys.stderr.write( */ - __pyx_t_4 = __Pyx_Import(__pyx_n_s_pysam, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1275, __pyx_L3_error) + __pyx_t_4 = __Pyx_Import(__pyx_n_s_pysam, 0, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1287, __pyx_L3_error) __Pyx_GOTREF(__pyx_t_4); __pyx_v_pysam = __pyx_t_4; __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1274 + /* "HTSeq/_HTSeq.pyx":1286 * * def to_pysam_AlignedRead(self, sf): * try: # <<<<<<<<<<<<<< @@ -31218,7 +30936,7 @@ __pyx_L3_error:; __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1276 + /* "HTSeq/_HTSeq.pyx":1288 * try: * import pysam * except ImportError: # <<<<<<<<<<<<<< @@ -31228,32 +30946,44 @@ __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ImportError); if (__pyx_t_5) { __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.to_pysam_AlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1276, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(0, 1288, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "HTSeq/_HTSeq.pyx":1277 + /* "HTSeq/_HTSeq.pyx":1289 * import pysam * except ImportError: * sys.stderr.write( # <<<<<<<<<<<<<< * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") * raise */ - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1277, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_stderr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1277, __pyx_L5_except_error) + __Pyx_GetModuleGlobalName(__pyx_t_9, __pyx_n_s_sys); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1289, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1277, __pyx_L5_except_error) - __Pyx_GOTREF(__pyx_t_8); + __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_stderr); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1289, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1277, __pyx_L5_except_error) + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_10, __pyx_n_s_write); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1289, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __pyx_t_10 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) { + __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9); + if (likely(__pyx_t_10)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9); + __Pyx_INCREF(__pyx_t_10); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_9, function); + } + } + __pyx_t_8 = (__pyx_t_10) ? __Pyx_PyObject_Call2Args(__pyx_t_9, __pyx_t_10, __pyx_kp_u_Please_Install_PySam_to_use_this) : __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_kp_u_Please_Install_PySam_to_use_this); + __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0; + if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1289, __pyx_L5_except_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - /* "HTSeq/_HTSeq.pyx":1279 + /* "HTSeq/_HTSeq.pyx":1291 * sys.stderr.write( * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") * raise # <<<<<<<<<<<<<< @@ -31265,12 +30995,12 @@ __Pyx_XGIVEREF(__pyx_t_7); __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_6, __pyx_t_7); __pyx_t_4 = 0; __pyx_t_6 = 0; __pyx_t_7 = 0; - __PYX_ERR(0, 1279, __pyx_L5_except_error) + __PYX_ERR(0, 1291, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "HTSeq/_HTSeq.pyx":1274 + /* "HTSeq/_HTSeq.pyx":1286 * * def to_pysam_AlignedRead(self, sf): * try: # <<<<<<<<<<<<<< @@ -31285,14 +31015,14 @@ __pyx_L8_try_end:; } - /* "HTSeq/_HTSeq.pyx":1281 + /* "HTSeq/_HTSeq.pyx":1293 * raise * * a = pysam.AlignedRead() # <<<<<<<<<<<<<< * a.seq = self.read.seq * a.qual = self.read.qualstr */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pysam, __pyx_n_s_AlignedRead); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1281, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_pysam, __pyx_n_s_AlignedRead); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { @@ -31304,75 +31034,72 @@ __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_4) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1281, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1281, __pyx_L1_error) - } + __pyx_t_7 = (__pyx_t_4) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_4) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1293, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a = __pyx_t_7; __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1282 + /* "HTSeq/_HTSeq.pyx":1294 * * a = pysam.AlignedRead() * a.seq = self.read.seq # <<<<<<<<<<<<<< * a.qual = self.read.qualstr * a.qname = self.read.name */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_seq); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1282, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_seq); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_seq, __pyx_t_6) < 0) __PYX_ERR(0, 1282, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_seq, __pyx_t_6) < 0) __PYX_ERR(0, 1294, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1283 + /* "HTSeq/_HTSeq.pyx":1295 * a = pysam.AlignedRead() * a.seq = self.read.seq * a.qual = self.read.qualstr # <<<<<<<<<<<<<< * a.qname = self.read.name * a.flag = self.flag */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_qualstr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1283, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_qualstr); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_qual, __pyx_t_7) < 0) __PYX_ERR(0, 1283, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_qual, __pyx_t_7) < 0) __PYX_ERR(0, 1295, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1284 + /* "HTSeq/_HTSeq.pyx":1296 * a.seq = self.read.seq * a.qual = self.read.qualstr * a.qname = self.read.name # <<<<<<<<<<<<<< * a.flag = self.flag * a.tags = self.optional_fields */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1284, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_qname, __pyx_t_6) < 0) __PYX_ERR(0, 1284, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_qname, __pyx_t_6) < 0) __PYX_ERR(0, 1296, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1285 + /* "HTSeq/_HTSeq.pyx":1297 * a.qual = self.read.qualstr * a.qname = self.read.name * a.flag = self.flag # <<<<<<<<<<<<<< * a.tags = self.optional_fields * if self.aligned: */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1285, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1297, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1285, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1297, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1286 + /* "HTSeq/_HTSeq.pyx":1298 * a.qname = self.read.name * a.flag = self.flag * a.tags = self.optional_fields # <<<<<<<<<<<<<< @@ -31381,23 +31108,23 @@ */ __pyx_t_6 = __pyx_v_self->optional_fields; __Pyx_INCREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tags, __pyx_t_6) < 0) __PYX_ERR(0, 1286, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tags, __pyx_t_6) < 0) __PYX_ERR(0, 1298, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1287 + /* "HTSeq/_HTSeq.pyx":1299 * a.flag = self.flag * a.tags = self.optional_fields * if self.aligned: # <<<<<<<<<<<<<< * a.cigar = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1287, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1299, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_10) { + if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1288 + /* "HTSeq/_HTSeq.pyx":1300 * a.tags = self.optional_fields * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< @@ -31405,10 +31132,10 @@ * a.pos = self.iv.start */ { /* enter inner scope */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1288, __pyx_L14_error) + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1300, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_6); - /* "HTSeq/_HTSeq.pyx":1289 + /* "HTSeq/_HTSeq.pyx":1301 * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] # <<<<<<<<<<<<<< @@ -31417,49 +31144,49 @@ */ if (unlikely(__pyx_v_self->cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1289, __pyx_L14_error) + __PYX_ERR(0, 1301, __pyx_L14_error) } - __pyx_t_7 = __pyx_v_self->cigar; __Pyx_INCREF(__pyx_t_7); __pyx_t_11 = 0; + __pyx_t_7 = __pyx_v_self->cigar; __Pyx_INCREF(__pyx_t_7); __pyx_t_12 = 0; for (;;) { - if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_7)) break; + if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_4); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 1289, __pyx_L14_error) + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 1301, __pyx_L14_error) #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1289, __pyx_L14_error) + __pyx_t_4 = PySequence_ITEM(__pyx_t_7, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1301, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_8genexpr3__pyx_v_c, __pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1288 + /* "HTSeq/_HTSeq.pyx":1300 * a.tags = self.optional_fields * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.pos = self.iv.start */ - __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_code_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L14_error) + __Pyx_GetModuleGlobalName(__pyx_t_4, __pyx_n_s_cigar_operation_code_dict); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_c, __pyx_n_s_type_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1288, __pyx_L14_error) - __Pyx_GOTREF(__pyx_t_9); - __pyx_t_8 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1288, __pyx_L14_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_c, __pyx_n_s_type_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1300, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_c, __pyx_n_s_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1288, __pyx_L14_error) + __pyx_t_9 = __Pyx_PyObject_GetItem(__pyx_t_4, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1300, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1288, __pyx_L14_error) + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_8genexpr3__pyx_v_c, __pyx_n_s_size); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1300, __pyx_L14_error) + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1300, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_9); - PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_9); - __pyx_t_8 = 0; + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_8); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8); __pyx_t_9 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1288, __pyx_L14_error) + __pyx_t_8 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_4))) __PYX_ERR(0, 1300, __pyx_L14_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - /* "HTSeq/_HTSeq.pyx":1289 + /* "HTSeq/_HTSeq.pyx":1301 * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] # <<<<<<<<<<<<<< @@ -31476,36 +31203,36 @@ __pyx_L17_exit_scope:; } /* exit inner scope */ - /* "HTSeq/_HTSeq.pyx":1288 + /* "HTSeq/_HTSeq.pyx":1300 * a.tags = self.optional_fields * if self.aligned: * a.cigar = [(cigar_operation_code_dict[c.type], c.size) # <<<<<<<<<<<<<< * for c in self.cigar] * a.pos = self.iv.start */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_cigar, __pyx_t_6) < 0) __PYX_ERR(0, 1288, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_cigar, __pyx_t_6) < 0) __PYX_ERR(0, 1300, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1290 + /* "HTSeq/_HTSeq.pyx":1302 * a.cigar = [(cigar_operation_code_dict[c.type], c.size) * for c in self.cigar] * a.pos = self.iv.start # <<<<<<<<<<<<<< * a.tid = sf.gettid(self.iv.chrom) * a.isize = self.inferred_insert_size */ - __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->__pyx_base.__pyx_base.iv->start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1290, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->__pyx_base.__pyx_base.iv->start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1302, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_pos, __pyx_t_6) < 0) __PYX_ERR(0, 1290, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_pos, __pyx_t_6) < 0) __PYX_ERR(0, 1302, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1291 + /* "HTSeq/_HTSeq.pyx":1303 * for c in self.cigar] * a.pos = self.iv.start * a.tid = sf.gettid(self.iv.chrom) # <<<<<<<<<<<<<< * a.isize = self.inferred_insert_size * a.mapq = self.aQual */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1291, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -31517,67 +31244,39 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_4) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1291, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1291, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1291, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1291, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL; - __Pyx_INCREF(__pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - __Pyx_GIVEREF(__pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1291, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->__pyx_base.__pyx_base.iv->chrom); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1303, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tid, __pyx_t_6) < 0) __PYX_ERR(0, 1291, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tid, __pyx_t_6) < 0) __PYX_ERR(0, 1303, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1292 + /* "HTSeq/_HTSeq.pyx":1304 * a.pos = self.iv.start * a.tid = sf.gettid(self.iv.chrom) * a.isize = self.inferred_insert_size # <<<<<<<<<<<<<< * a.mapq = self.aQual * else: */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1292, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_isize, __pyx_t_6) < 0) __PYX_ERR(0, 1292, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_isize, __pyx_t_6) < 0) __PYX_ERR(0, 1304, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1293 + /* "HTSeq/_HTSeq.pyx":1305 * a.tid = sf.gettid(self.iv.chrom) * a.isize = self.inferred_insert_size * a.mapq = self.aQual # <<<<<<<<<<<<<< * else: * a.pos = -1 */ - __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1293, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mapq, __pyx_t_6) < 0) __PYX_ERR(0, 1293, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mapq, __pyx_t_6) < 0) __PYX_ERR(0, 1305, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1287 + /* "HTSeq/_HTSeq.pyx":1299 * a.flag = self.flag * a.tags = self.optional_fields * if self.aligned: # <<<<<<<<<<<<<< @@ -31587,7 +31286,7 @@ goto __pyx_L11; } - /* "HTSeq/_HTSeq.pyx":1295 + /* "HTSeq/_HTSeq.pyx":1307 * a.mapq = self.aQual * else: * a.pos = -1 # <<<<<<<<<<<<<< @@ -31595,100 +31294,72 @@ * if self.mate_aligned: */ /*else*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_pos, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1295, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_pos, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1307, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1296 + /* "HTSeq/_HTSeq.pyx":1308 * else: * a.pos = -1 * a.tid = -1 # <<<<<<<<<<<<<< * if self.mate_aligned: * a.mrnm = sf.gettid(self.mate_start.chrom) */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tid, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1296, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_tid, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1308, __pyx_L1_error) } __pyx_L11:; - /* "HTSeq/_HTSeq.pyx":1297 + /* "HTSeq/_HTSeq.pyx":1309 * a.pos = -1 * a.tid = -1 * if self.mate_aligned: # <<<<<<<<<<<<<< * a.mrnm = sf.gettid(self.mate_start.chrom) * a.mpos = self.mate_start.start */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mate_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_mate_aligned); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1297, __pyx_L1_error) + __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 1309, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (__pyx_t_10) { + if (__pyx_t_11) { - /* "HTSeq/_HTSeq.pyx":1298 + /* "HTSeq/_HTSeq.pyx":1310 * a.tid = -1 * if self.mate_aligned: * a.mrnm = sf.gettid(self.mate_start.chrom) # <<<<<<<<<<<<<< * a.mpos = self.mate_start.start * else: */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1298, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_sf, __pyx_n_s_gettid); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { - __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7); - if (likely(__pyx_t_9)) { + __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_4)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); - __Pyx_INCREF(__pyx_t_9); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_9) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->mate_start->__pyx_base.chrom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_self->mate_start->__pyx_base.chrom}; - __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v_self->mate_start->__pyx_base.chrom}; - __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_6); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1298, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_INCREF(__pyx_v_self->mate_start->__pyx_base.chrom); - __Pyx_GIVEREF(__pyx_v_self->mate_start->__pyx_base.chrom); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self->mate_start->__pyx_base.chrom); - __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1298, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_6 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_4, __pyx_v_self->mate_start->__pyx_base.chrom) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_self->mate_start->__pyx_base.chrom); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1310, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mrnm, __pyx_t_6) < 0) __PYX_ERR(0, 1298, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mrnm, __pyx_t_6) < 0) __PYX_ERR(0, 1310, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1299 + /* "HTSeq/_HTSeq.pyx":1311 * if self.mate_aligned: * a.mrnm = sf.gettid(self.mate_start.chrom) * a.mpos = self.mate_start.start # <<<<<<<<<<<<<< * else: * a.mrnm = -1 */ - __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->mate_start->__pyx_base.start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1299, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_From_long(__pyx_v_self->mate_start->__pyx_base.start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mpos, __pyx_t_6) < 0) __PYX_ERR(0, 1299, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mpos, __pyx_t_6) < 0) __PYX_ERR(0, 1311, __pyx_L1_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1297 + /* "HTSeq/_HTSeq.pyx":1309 * a.pos = -1 * a.tid = -1 * if self.mate_aligned: # <<<<<<<<<<<<<< @@ -31698,7 +31369,7 @@ goto __pyx_L18; } - /* "HTSeq/_HTSeq.pyx":1301 + /* "HTSeq/_HTSeq.pyx":1313 * a.mpos = self.mate_start.start * else: * a.mrnm = -1 # <<<<<<<<<<<<<< @@ -31706,20 +31377,20 @@ * return a */ /*else*/ { - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mrnm, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1301, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mrnm, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1313, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1302 + /* "HTSeq/_HTSeq.pyx":1314 * else: * a.mrnm = -1 * a.mpos = -1 # <<<<<<<<<<<<<< * return a * */ - if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mpos, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1302, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(__pyx_v_a, __pyx_n_s_mpos, __pyx_int_neg_1) < 0) __PYX_ERR(0, 1314, __pyx_L1_error) } __pyx_L18:; - /* "HTSeq/_HTSeq.pyx":1303 + /* "HTSeq/_HTSeq.pyx":1315 * a.mrnm = -1 * a.mpos = -1 * return a # <<<<<<<<<<<<<< @@ -31731,7 +31402,7 @@ __pyx_r = __pyx_v_a; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1273 + /* "HTSeq/_HTSeq.pyx":1285 * return a * * def to_pysam_AlignedRead(self, sf): # <<<<<<<<<<<<<< @@ -31746,6 +31417,7 @@ __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); + __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.to_pysam_AlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -31757,7 +31429,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1306 +/* "HTSeq/_HTSeq.pyx":1318 * * @classmethod * def from_pysam_AlignedRead(cls, read, samfile): # <<<<<<<<<<<<<< @@ -31796,11 +31468,11 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedRead", 1, 2, 2, 1); __PYX_ERR(0, 1306, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedRead", 1, 2, 2, 1); __PYX_ERR(0, 1318, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_pysam_AlignedRead") < 0)) __PYX_ERR(0, 1306, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_pysam_AlignedRead") < 0)) __PYX_ERR(0, 1318, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -31813,7 +31485,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedRead", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1306, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedRead", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1318, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedRead", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -31853,16 +31525,16 @@ int __pyx_t_15; __Pyx_RefNannySetupContext("from_pysam_AlignedRead", 0); - /* "HTSeq/_HTSeq.pyx":1307 + /* "HTSeq/_HTSeq.pyx":1319 * @classmethod * def from_pysam_AlignedRead(cls, read, samfile): * strand = "-" if read.is_reverse else "+" # <<<<<<<<<<<<<< * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1307, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1319, __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, 1307, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1319, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_kp_u__20); @@ -31874,30 +31546,30 @@ __pyx_v_strand = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1308 + /* "HTSeq/_HTSeq.pyx":1320 * def from_pysam_AlignedRead(cls, read, samfile): * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: # <<<<<<<<<<<<<< * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.pos, read.aend, strand) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1308, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1320, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1309 + /* "HTSeq/_HTSeq.pyx":1321 * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) # <<<<<<<<<<<<<< * iv = GenomicInterval(chrom, read.pos, read.aend, strand) * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1309, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1321, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -31909,77 +31581,47 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1309, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_chrom = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1310 + /* "HTSeq/_HTSeq.pyx":1322 * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.pos, read.aend, strand) # <<<<<<<<<<<<<< * else: * iv = None */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_aend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_aend); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1310, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1322, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_INCREF(__pyx_v_strand); __Pyx_GIVEREF(__pyx_v_strand); - PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_strand); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_strand); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1310, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1322, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1308 + /* "HTSeq/_HTSeq.pyx":1320 * def from_pysam_AlignedRead(cls, read, samfile): * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: # <<<<<<<<<<<<<< @@ -31989,7 +31631,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1312 + /* "HTSeq/_HTSeq.pyx":1324 * iv = GenomicInterval(chrom, read.pos, read.aend, strand) * else: * iv = None # <<<<<<<<<<<<<< @@ -32002,100 +31644,94 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1313 + /* "HTSeq/_HTSeq.pyx":1325 * else: * iv = None * if read.qual != b"*": # <<<<<<<<<<<<<< * seq = SequenceWithQualities( * read.query_sequence.encode(), read.qname, read.qual.encode()) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_kp_b__41, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1313, __pyx_L1_error) + __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_t_2, __pyx_kp_b__34, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1325, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1315 + /* "HTSeq/_HTSeq.pyx":1327 * if read.qual != b"*": * seq = SequenceWithQualities( * read.query_sequence.encode(), read.qname, read.qual.encode()) # <<<<<<<<<<<<<< * else: * seq = SequenceWithQualities(read.query_sequence.encode( */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1315, __pyx_L1_error) - } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1315, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1315, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1315, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); - __Pyx_INCREF(__pyx_t_5); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_encode); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = NULL; + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7); + __Pyx_INCREF(__pyx_t_6); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_6, function); + __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (__pyx_t_5) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1315, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1315, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_5 = (__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_5)) __PYX_ERR(0, 1327, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1314 + /* "HTSeq/_HTSeq.pyx":1326 * iv = None * if read.qual != b"*": * seq = SequenceWithQualities( # <<<<<<<<<<<<<< * read.query_sequence.encode(), read.qname, read.qual.encode()) * else: */ - __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1314, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_5); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_7 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1314, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_7); - __pyx_t_7 = 0; + __pyx_t_5 = 0; + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1326, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_5); + __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1313 + /* "HTSeq/_HTSeq.pyx":1325 * else: * iv = None * if read.qual != b"*": # <<<<<<<<<<<<<< @@ -32105,7 +31741,7 @@ goto __pyx_L4; } - /* "HTSeq/_HTSeq.pyx":1317 + /* "HTSeq/_HTSeq.pyx":1329 * read.query_sequence.encode(), read.qname, read.qual.encode()) * else: * seq = SequenceWithQualities(read.query_sequence.encode( # <<<<<<<<<<<<<< @@ -32113,126 +31749,120 @@ * a = SAM_Alignment(seq, iv) */ /*else*/ { - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1329, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = NULL; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_7 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_6)) { + __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_7)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_6) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1317, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else { - __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1317, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = (__pyx_t_7) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1318 + /* "HTSeq/_HTSeq.pyx":1330 * else: * seq = SequenceWithQualities(read.query_sequence.encode( * ), read.qname, read.qual.encode(), "noquals") # <<<<<<<<<<<<<< * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1318, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_qual); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1330, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_encode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_2)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); + __Pyx_DECREF_SET(__pyx_t_6, function); } } - if (__pyx_t_2) { - __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1318, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - } else { - __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1318, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_7 = (__pyx_t_2) ? __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2) : __Pyx_PyObject_CallNoArg(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1330, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1317 + /* "HTSeq/_HTSeq.pyx":1329 * read.query_sequence.encode(), read.qname, read.qual.encode()) * else: * seq = SequenceWithQualities(read.query_sequence.encode( # <<<<<<<<<<<<<< * ), read.qname, read.qual.encode(), "noquals") * a = SAM_Alignment(seq, iv) */ - __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); + __pyx_t_6 = PyTuple_New(4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_7); + PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_t_7); __Pyx_INCREF(__pyx_n_u_noquals); __Pyx_GIVEREF(__pyx_n_u_noquals); - PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_n_u_noquals); - __pyx_t_7 = 0; + PyTuple_SET_ITEM(__pyx_t_6, 3, __pyx_n_u_noquals); + __pyx_t_5 = 0; __pyx_t_1 = 0; - __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1317, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_6); - __pyx_t_6 = 0; + __pyx_t_7 = 0; + __pyx_t_7 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1329, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_7); + __pyx_t_7 = 0; } __pyx_L4:; - /* "HTSeq/_HTSeq.pyx":1319 + /* "HTSeq/_HTSeq.pyx":1331 * seq = SequenceWithQualities(read.query_sequence.encode( * ), read.qname, read.qual.encode(), "noquals") * a = SAM_Alignment(seq, iv) # <<<<<<<<<<<<<< * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] */ - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1319, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_INCREF(((PyObject *)__pyx_v_seq)); __Pyx_GIVEREF(((PyObject *)__pyx_v_seq)); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_seq)); + PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_seq)); __Pyx_INCREF(((PyObject *)__pyx_v_iv)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_v_iv)); - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1319, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_v_a = ((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_t_5); - __pyx_t_5 = 0; + PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_iv)); + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1331, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_v_a = ((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_t_6); + __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1321 + /* "HTSeq/_HTSeq.pyx":1333 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.isize * a.aQual = read.mapq */ - __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1321, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1321, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1333, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1320 + /* "HTSeq/_HTSeq.pyx":1332 * ), read.qname, read.qual.encode(), "noquals") * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -32240,53 +31870,53 @@ * a.inferred_insert_size = read.isize */ { /* enter inner scope */ - __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1320, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1332, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_7); - /* "HTSeq/_HTSeq.pyx":1321 + /* "HTSeq/_HTSeq.pyx":1333 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.isize * a.aQual = read.mapq */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_cigar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_cigar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { - __pyx_t_7 = __pyx_t_1; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; + __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1321, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_8 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1333, __pyx_L7_error) } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { if (likely(!__pyx_t_9)) { - if (likely(PyList_CheckExact(__pyx_t_7))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_7)) break; + if (likely(PyList_CheckExact(__pyx_t_5))) { + if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1333, __pyx_L7_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break; + if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_5)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1333, __pyx_L7_error) #else - __pyx_t_1 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1333, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); #endif } } else { - __pyx_t_1 = __pyx_t_9(__pyx_t_7); + __pyx_t_1 = __pyx_t_9(__pyx_t_5); if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1321, __pyx_L7_error) + else __PYX_ERR(0, 1333, __pyx_L7_error) } break; } @@ -32298,7 +31928,7 @@ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1321, __pyx_L7_error) + __PYX_ERR(0, 1333, __pyx_L7_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { @@ -32311,15 +31941,15 @@ __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1333, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1333, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); #endif __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1321, __pyx_L7_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1333, __pyx_L7_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; @@ -32327,7 +31957,7 @@ __Pyx_GOTREF(__pyx_t_2); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1321, __pyx_L7_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1333, __pyx_L7_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_unpacking_done; @@ -32335,7 +31965,7 @@ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1321, __pyx_L7_error) + __PYX_ERR(0, 1333, __pyx_L7_error) __pyx_L11_unpacking_done:; } __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_code, __pyx_t_2); @@ -32343,19 +31973,19 @@ __Pyx_XDECREF_SET(__pyx_8genexpr4__pyx_v_length, __pyx_t_10); __pyx_t_10 = 0; - /* "HTSeq/_HTSeq.pyx":1320 + /* "HTSeq/_HTSeq.pyx":1332 * ), read.qname, read.qual.encode(), "noquals") * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.isize */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_8genexpr4__pyx_v_code); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1320, __pyx_L7_error) + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_8genexpr4__pyx_v_code); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1332, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1320, __pyx_L7_error) + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1332, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); @@ -32363,10 +31993,10 @@ __Pyx_GIVEREF(__pyx_8genexpr4__pyx_v_length); PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_8genexpr4__pyx_v_length); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_6, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1320, __pyx_L7_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1332, __pyx_L7_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_code); __pyx_8genexpr4__pyx_v_code = 0; __Pyx_XDECREF(__pyx_8genexpr4__pyx_v_length); __pyx_8genexpr4__pyx_v_length = 0; goto __pyx_L12_exit_scope; @@ -32377,21 +32007,21 @@ __pyx_L12_exit_scope:; } /* exit inner scope */ - /* "HTSeq/_HTSeq.pyx":1321 + /* "HTSeq/_HTSeq.pyx":1333 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.isize * a.aQual = read.mapq */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_pos); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1321, __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, 1321, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - if (unlikely(!__pyx_v_chrom)) { __Pyx_RaiseUnboundLocalError("chrom"); __PYX_ERR(0, 1321, __pyx_L1_error) } - 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, 1321, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_pos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_v_chrom)) { __Pyx_RaiseUnboundLocalError("chrom"); __PYX_ERR(0, 1333, __pyx_L1_error) } + 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, 1333, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1320 + /* "HTSeq/_HTSeq.pyx":1332 * ), read.qname, read.qual.encode(), "noquals") * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -32402,143 +32032,143 @@ __pyx_t_14.ref_left = __pyx_t_13; __pyx_t_14.chrom = ((PyObject*)__pyx_v_chrom); __pyx_t_14.strand = __pyx_v_strand; - __pyx_t_7 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(((PyObject*)__pyx_t_6), 0, &__pyx_t_14); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1320, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_5 = __pyx_t_7; - __pyx_t_7 = 0; + __pyx_t_5 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(((PyObject*)__pyx_t_7), 0, &__pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_6 = __pyx_t_5; + __pyx_t_5 = 0; } else { - /* "HTSeq/_HTSeq.pyx":1321 + /* "HTSeq/_HTSeq.pyx":1333 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.isize * a.aQual = read.mapq */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1321, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_5 = __pyx_t_7; - __pyx_t_7 = 0; + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1333, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_6 = __pyx_t_5; + __pyx_t_5 = 0; } - /* "HTSeq/_HTSeq.pyx":1320 + /* "HTSeq/_HTSeq.pyx":1332 * ), read.qname, read.qual.encode(), "noquals") * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.isize */ - __Pyx_GIVEREF(__pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_a->cigar); __Pyx_DECREF(__pyx_v_a->cigar); - __pyx_v_a->cigar = ((PyObject*)__pyx_t_5); - __pyx_t_5 = 0; + __pyx_v_a->cigar = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1322 + /* "HTSeq/_HTSeq.pyx":1334 * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.isize # <<<<<<<<<<<<<< * a.aQual = read.mapq * a.flag = read.flag */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_isize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1322, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1322, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_isize); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1334, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1334, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a->inferred_insert_size = __pyx_t_13; - /* "HTSeq/_HTSeq.pyx":1323 + /* "HTSeq/_HTSeq.pyx":1335 * code, length) in read.cigar], read.pos, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.isize * a.aQual = read.mapq # <<<<<<<<<<<<<< * a.flag = read.flag * a.proper_pair = read.is_proper_pair */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mapq); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_5); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1323, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mapq); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1335, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a->aQual = __pyx_t_13; - /* "HTSeq/_HTSeq.pyx":1324 + /* "HTSeq/_HTSeq.pyx":1336 * a.inferred_insert_size = read.isize * a.aQual = read.mapq * a.flag = read.flag # <<<<<<<<<<<<<< * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_flag); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1324, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_a), __pyx_n_s_flag, __pyx_t_5) < 0) __PYX_ERR(0, 1324, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_flag); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1336, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_a), __pyx_n_s_flag, __pyx_t_6) < 0) __PYX_ERR(0, 1336, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1325 + /* "HTSeq/_HTSeq.pyx":1337 * a.aQual = read.mapq * a.flag = read.flag * a.proper_pair = read.is_proper_pair # <<<<<<<<<<<<<< * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1325, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1325, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1337, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a->proper_pair = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1326 + /* "HTSeq/_HTSeq.pyx":1338 * a.flag = read.flag * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary # <<<<<<<<<<<<<< * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1326, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1326, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1338, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a->not_primary_alignment = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1327 + /* "HTSeq/_HTSeq.pyx":1339 * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail # <<<<<<<<<<<<<< * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_qcfail); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1327, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1327, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_qcfail); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1339, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1339, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a->failed_platform_qc = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1328 + /* "HTSeq/_HTSeq.pyx":1340 * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate # <<<<<<<<<<<<<< * a.supplementary = read.is_supplementary * a.original_sam_line = "" */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_duplicate); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1328, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1328, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_duplicate); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1340, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1340, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a->pcr_or_optical_duplicate = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1329 + /* "HTSeq/_HTSeq.pyx":1341 * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary # <<<<<<<<<<<<<< * a.original_sam_line = "" * a.optional_fields = read.tags */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1329, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1329, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1341, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1341, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_v_a->supplementary = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1330 + /* "HTSeq/_HTSeq.pyx":1342 * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary * a.original_sam_line = "" # <<<<<<<<<<<<<< @@ -32551,171 +32181,142 @@ __Pyx_DECREF(__pyx_v_a->original_sam_line); __pyx_v_a->original_sam_line = __pyx_kp_u__12; - /* "HTSeq/_HTSeq.pyx":1331 + /* "HTSeq/_HTSeq.pyx":1343 * a.supplementary = read.is_supplementary * a.original_sam_line = "" * a.optional_fields = read.tags # <<<<<<<<<<<<<< * if read.is_paired: * # These two should be but are not always consistent */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tags); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1331, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - if (!(likely(PyList_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_5)->tp_name), 0))) __PYX_ERR(0, 1331, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tags); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1343, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + if (!(likely(PyList_CheckExact(__pyx_t_6))||((__pyx_t_6) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "list", Py_TYPE(__pyx_t_6)->tp_name), 0))) __PYX_ERR(0, 1343, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_a->optional_fields); __Pyx_DECREF(__pyx_v_a->optional_fields); - __pyx_v_a->optional_fields = ((PyObject*)__pyx_t_5); - __pyx_t_5 = 0; + __pyx_v_a->optional_fields = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1332 + /* "HTSeq/_HTSeq.pyx":1344 * a.original_sam_line = "" * a.optional_fields = read.tags * if read.is_paired: # <<<<<<<<<<<<<< * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1332, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1332, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1344, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1344, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1334 + /* "HTSeq/_HTSeq.pyx":1346 * if read.is_paired: * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): # <<<<<<<<<<<<<< * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition( */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1334, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1334, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1346, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_15 = ((!__pyx_t_3) != 0); if (__pyx_t_15) { } else { __pyx_t_4 = __pyx_t_15; goto __pyx_L15_bool_binop_done; } - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1334, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1346, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_5 = __Pyx_PyInt_NeObjC(__pyx_t_6, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_5, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1334, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1346, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1334, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __pyx_t_15; __pyx_L15_bool_binop_done:; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1335 + /* "HTSeq/_HTSeq.pyx":1347 * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" # <<<<<<<<<<<<<< * a.mate_start = GenomicPosition( * samfile.getrname(read.mrnm), read.mpos, strand) */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_reverse); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1335, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1335, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_reverse); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1347, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1347, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { __Pyx_INCREF(__pyx_kp_u__20); - __pyx_t_7 = __pyx_kp_u__20; + __pyx_t_5 = __pyx_kp_u__20; } else { __Pyx_INCREF(__pyx_kp_u__19); - __pyx_t_7 = __pyx_kp_u__19; + __pyx_t_5 = __pyx_kp_u__19; } - __Pyx_DECREF_SET(__pyx_v_strand, ((PyObject*)__pyx_t_7)); - __pyx_t_7 = 0; + __Pyx_DECREF_SET(__pyx_v_strand, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1337 + /* "HTSeq/_HTSeq.pyx":1349 * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition( * samfile.getrname(read.mrnm), read.mpos, strand) # <<<<<<<<<<<<<< * else: * a.mate_start = None */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1337, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __pyx_t_1 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) { - __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5); + if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6); if (likely(__pyx_t_1)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5); + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6); __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_5, function); - } - } - if (!__pyx_t_1) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1337, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1337, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) { - PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1337, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1337, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); __pyx_t_1 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1337, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF_SET(__pyx_t_6, function); } } - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mpos); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1337, __pyx_L1_error) + __pyx_t_5 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_6, __pyx_t_1, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1349, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mpos); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1349, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); - /* "HTSeq/_HTSeq.pyx":1336 + /* "HTSeq/_HTSeq.pyx":1348 * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition( # <<<<<<<<<<<<<< * samfile.getrname(read.mrnm), read.mpos, strand) * else: */ - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_6); + PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_6); __Pyx_INCREF(__pyx_v_strand); __Pyx_GIVEREF(__pyx_v_strand); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_strand); - __pyx_t_7 = 0; + PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_v_strand); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1336, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_6 = 0; + __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_7, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1348, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_a->mate_start); __Pyx_DECREF(((PyObject *)__pyx_v_a->mate_start)); - __pyx_v_a->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)__pyx_t_5); - __pyx_t_5 = 0; + __pyx_v_a->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)__pyx_t_6); + __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1334 + /* "HTSeq/_HTSeq.pyx":1346 * if read.is_paired: * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): # <<<<<<<<<<<<<< @@ -32725,7 +32326,7 @@ goto __pyx_L14; } - /* "HTSeq/_HTSeq.pyx":1339 + /* "HTSeq/_HTSeq.pyx":1351 * samfile.getrname(read.mrnm), read.mpos, strand) * else: * a.mate_start = None # <<<<<<<<<<<<<< @@ -32741,36 +32342,36 @@ } __pyx_L14:; - /* "HTSeq/_HTSeq.pyx":1340 + /* "HTSeq/_HTSeq.pyx":1352 * else: * a.mate_start = None * if read.is_read1: # <<<<<<<<<<<<<< * a.pe_which = intern("first") * elif read.is_read2: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1340, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1340, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1352, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1341 + /* "HTSeq/_HTSeq.pyx":1353 * a.mate_start = None * if read.is_read1: * a.pe_which = intern("first") # <<<<<<<<<<<<<< * elif read.is_read2: * a.pe_which = intern("second") */ - __pyx_t_5 = __Pyx_Intern(__pyx_n_u_first); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1341, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - 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, 1341, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_6 = __Pyx_Intern(__pyx_n_u_first); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1353, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + 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, 1353, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); - __pyx_v_a->pe_which = ((PyObject*)__pyx_t_5); - __pyx_t_5 = 0; + __pyx_v_a->pe_which = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1340 + /* "HTSeq/_HTSeq.pyx":1352 * else: * a.mate_start = None * if read.is_read1: # <<<<<<<<<<<<<< @@ -32780,36 +32381,36 @@ goto __pyx_L17; } - /* "HTSeq/_HTSeq.pyx":1342 + /* "HTSeq/_HTSeq.pyx":1354 * if read.is_read1: * a.pe_which = intern("first") * elif read.is_read2: # <<<<<<<<<<<<<< * a.pe_which = intern("second") * else: */ - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1342, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1342, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1354, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1354, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1343 + /* "HTSeq/_HTSeq.pyx":1355 * a.pe_which = intern("first") * elif read.is_read2: * a.pe_which = intern("second") # <<<<<<<<<<<<<< * else: * a.pe_which = intern("unknown") */ - __pyx_t_5 = __Pyx_Intern(__pyx_n_u_second); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1343, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - 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, 1343, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_6 = __Pyx_Intern(__pyx_n_u_second); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1355, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + 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, 1355, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); - __pyx_v_a->pe_which = ((PyObject*)__pyx_t_5); - __pyx_t_5 = 0; + __pyx_v_a->pe_which = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1342 + /* "HTSeq/_HTSeq.pyx":1354 * if read.is_read1: * a.pe_which = intern("first") * elif read.is_read2: # <<<<<<<<<<<<<< @@ -32819,7 +32420,7 @@ goto __pyx_L17; } - /* "HTSeq/_HTSeq.pyx":1345 + /* "HTSeq/_HTSeq.pyx":1357 * a.pe_which = intern("second") * else: * a.pe_which = intern("unknown") # <<<<<<<<<<<<<< @@ -32827,18 +32428,18 @@ * a.pe_which = intern("not_paired_end") */ /*else*/ { - __pyx_t_5 = __Pyx_Intern(__pyx_n_u_unknown); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1345, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - 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, 1345, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_6 = __Pyx_Intern(__pyx_n_u_unknown); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1357, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + 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, 1357, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); - __pyx_v_a->pe_which = ((PyObject*)__pyx_t_5); - __pyx_t_5 = 0; + __pyx_v_a->pe_which = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; } __pyx_L17:; - /* "HTSeq/_HTSeq.pyx":1332 + /* "HTSeq/_HTSeq.pyx":1344 * a.original_sam_line = "" * a.optional_fields = read.tags * if read.is_paired: # <<<<<<<<<<<<<< @@ -32848,7 +32449,7 @@ goto __pyx_L13; } - /* "HTSeq/_HTSeq.pyx":1347 + /* "HTSeq/_HTSeq.pyx":1359 * a.pe_which = intern("unknown") * else: * a.pe_which = intern("not_paired_end") # <<<<<<<<<<<<<< @@ -32856,18 +32457,18 @@ * */ /*else*/ { - __pyx_t_5 = __Pyx_Intern(__pyx_n_u_not_paired_end); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1347, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_5); - 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, 1347, __pyx_L1_error) - __Pyx_GIVEREF(__pyx_t_5); + __pyx_t_6 = __Pyx_Intern(__pyx_n_u_not_paired_end); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1359, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + 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, 1359, __pyx_L1_error) + __Pyx_GIVEREF(__pyx_t_6); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); - __pyx_v_a->pe_which = ((PyObject*)__pyx_t_5); - __pyx_t_5 = 0; + __pyx_v_a->pe_which = ((PyObject*)__pyx_t_6); + __pyx_t_6 = 0; } __pyx_L13:; - /* "HTSeq/_HTSeq.pyx":1348 + /* "HTSeq/_HTSeq.pyx":1360 * else: * a.pe_which = intern("not_paired_end") * return a # <<<<<<<<<<<<<< @@ -32879,7 +32480,7 @@ __pyx_r = ((PyObject *)__pyx_v_a); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1306 + /* "HTSeq/_HTSeq.pyx":1318 * * @classmethod * def from_pysam_AlignedRead(cls, read, samfile): # <<<<<<<<<<<<<< @@ -32911,7 +32512,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1351 +/* "HTSeq/_HTSeq.pyx":1363 * * @classmethod * def from_pysam_AlignedSegment(cls, read, samfile): # <<<<<<<<<<<<<< @@ -32950,11 +32551,11 @@ case 1: if (likely((values[1] = __Pyx_PyDict_GetItemStr(__pyx_kwds, __pyx_n_s_samfile)) != 0)) kw_args--; else { - __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedSegment", 1, 2, 2, 1); __PYX_ERR(0, 1351, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedSegment", 1, 2, 2, 1); __PYX_ERR(0, 1363, __pyx_L3_error) } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_pysam_AlignedSegment") < 0)) __PYX_ERR(0, 1351, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "from_pysam_AlignedSegment") < 0)) __PYX_ERR(0, 1363, __pyx_L3_error) } } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { goto __pyx_L5_argtuple_error; @@ -32967,7 +32568,7 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedSegment", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1351, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("from_pysam_AlignedSegment", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1363, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedSegment", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); @@ -32996,9 +32597,9 @@ int __pyx_t_4; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; - PyObject *__pyx_t_7 = NULL; - Py_ssize_t __pyx_t_8; - PyObject *(*__pyx_t_9)(PyObject *); + Py_ssize_t __pyx_t_7; + PyObject *(*__pyx_t_8)(PyObject *); + PyObject *__pyx_t_9 = NULL; PyObject *__pyx_t_10 = NULL; PyObject *__pyx_t_11 = NULL; PyObject *(*__pyx_t_12)(PyObject *); @@ -33007,16 +32608,16 @@ int __pyx_t_15; __Pyx_RefNannySetupContext("from_pysam_AlignedSegment", 0); - /* "HTSeq/_HTSeq.pyx":1352 + /* "HTSeq/_HTSeq.pyx":1364 * @classmethod * def from_pysam_AlignedSegment(cls, read, samfile): * strand = "-" if read.is_reverse else "+" # <<<<<<<<<<<<<< * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1352, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1364, __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, 1352, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1364, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_3) { __Pyx_INCREF(__pyx_kp_u__20); @@ -33028,30 +32629,30 @@ __pyx_v_strand = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1353 + /* "HTSeq/_HTSeq.pyx":1365 * def from_pysam_AlignedSegment(cls, read, samfile): * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: # <<<<<<<<<<<<<< * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.reference_start, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_unmapped); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1353, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1365, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = ((!__pyx_t_3) != 0); if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1354 + /* "HTSeq/_HTSeq.pyx":1366 * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) # <<<<<<<<<<<<<< * iv = GenomicInterval(chrom, read.reference_start, * read.reference_end, strand) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1354, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tid); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1366, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { @@ -33063,93 +32664,63 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_5}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - } else - #endif - { - __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1354, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_5); - __pyx_t_5 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1354, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } - } + __pyx_t_1 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1366, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_chrom = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1355 + /* "HTSeq/_HTSeq.pyx":1367 * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.reference_start, # <<<<<<<<<<<<<< * read.reference_end, strand) * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1355, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":1356 + /* "HTSeq/_HTSeq.pyx":1368 * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.reference_start, * read.reference_end, strand) # <<<<<<<<<<<<<< * else: * iv = None */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1356, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1355 + /* "HTSeq/_HTSeq.pyx":1367 * if not read.is_unmapped: * chrom = samfile.getrname(read.tid) * iv = GenomicInterval(chrom, read.reference_start, # <<<<<<<<<<<<<< * read.reference_end, strand) * else: */ - __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1355, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1367, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(__pyx_v_chrom); __Pyx_GIVEREF(__pyx_v_chrom); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_chrom); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_chrom); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_2); __Pyx_INCREF(__pyx_v_strand); __Pyx_GIVEREF(__pyx_v_strand); - PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_v_strand); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_v_strand); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1355, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1353 + /* "HTSeq/_HTSeq.pyx":1365 * def from_pysam_AlignedSegment(cls, read, samfile): * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: # <<<<<<<<<<<<<< @@ -33159,7 +32730,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1358 + /* "HTSeq/_HTSeq.pyx":1370 * read.reference_end, strand) * else: * iv = None # <<<<<<<<<<<<<< @@ -33172,145 +32743,112 @@ } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1360 + /* "HTSeq/_HTSeq.pyx":1372 * iv = None * seq = SequenceWithQualities( * read.query_sequence.encode(), read.query_name, b'', 'noquals') # <<<<<<<<<<<<<< * if read.query_qualities != None: * seq.qual = numpy.array(read.query_qualities) */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1360, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1372, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = NULL; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_5 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { - __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1); - if (likely(__pyx_t_7)) { + __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1); + if (likely(__pyx_t_5)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_7) { - __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else { - __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error) - } + __pyx_t_2 = (__pyx_t_5) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1372, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":1359 + /* "HTSeq/_HTSeq.pyx":1371 * else: * iv = None * seq = SequenceWithQualities( # <<<<<<<<<<<<<< * read.query_sequence.encode(), read.query_name, b'', 'noquals') * if read.query_qualities != None: */ - __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1359, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1371, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_GIVEREF(__pyx_t_2); - PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1); __Pyx_INCREF(__pyx_kp_b__12); __Pyx_GIVEREF(__pyx_kp_b__12); - PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_kp_b__12); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_kp_b__12); __Pyx_INCREF(__pyx_n_u_noquals); __Pyx_GIVEREF(__pyx_n_u_noquals); - PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_n_u_noquals); + PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_n_u_noquals); __pyx_t_2 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1359, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1371, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_seq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1361 + /* "HTSeq/_HTSeq.pyx":1373 * seq = SequenceWithQualities( * read.query_sequence.encode(), read.query_name, b'', 'noquals') * if read.query_qualities != None: # <<<<<<<<<<<<<< * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_qualities); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1361, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_qualities); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1361, __pyx_L1_error) + __pyx_t_5 = PyObject_RichCompare(__pyx_t_1, Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1373, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1361, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1373, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1362 + /* "HTSeq/_HTSeq.pyx":1374 * read.query_sequence.encode(), read.query_name, b'', 'noquals') * if read.query_qualities != None: * seq.qual = numpy.array(read.query_qualities) # <<<<<<<<<<<<<< * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_numpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_array); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_qualities); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1362, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_query_qualities); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1374, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = NULL; + __pyx_t_6 = NULL; if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_5)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_5); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - if (!__pyx_t_5) { - __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1362, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_GOTREF(__pyx_t_7); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1}; - __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1362, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1}; - __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1362, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1362, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1362, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_6)) { + PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); + __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(function); + __Pyx_DECREF_SET(__pyx_t_2, function); } } + __pyx_t_5 = (__pyx_t_6) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_6, __pyx_t_1) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); + __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1374, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_seq), __pyx_n_s_qual, __pyx_t_7) < 0) __PYX_ERR(0, 1362, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_seq), __pyx_n_s_qual, __pyx_t_5) < 0) __PYX_ERR(0, 1374, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1361 + /* "HTSeq/_HTSeq.pyx":1373 * seq = SequenceWithQualities( * read.query_sequence.encode(), read.query_name, b'', 'noquals') * if read.query_qualities != None: # <<<<<<<<<<<<<< @@ -33319,40 +32857,40 @@ */ } - /* "HTSeq/_HTSeq.pyx":1363 + /* "HTSeq/_HTSeq.pyx":1375 * if read.query_qualities != None: * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) # <<<<<<<<<<<<<< * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] */ - __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1363, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1375, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); __Pyx_INCREF(((PyObject *)__pyx_v_seq)); __Pyx_GIVEREF(((PyObject *)__pyx_v_seq)); - PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_v_seq)); + PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_seq)); __Pyx_INCREF(((PyObject *)__pyx_v_iv)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); - PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_iv)); - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error) + PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_iv)); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_a = ((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1365 + /* "HTSeq/_HTSeq.pyx":1377 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality */ - __pyx_t_7 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_7); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1365, __pyx_L1_error) - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1365, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_5 = PyObject_RichCompare(((PyObject *)__pyx_v_iv), Py_None, Py_NE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1377, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1364 + /* "HTSeq/_HTSeq.pyx":1376 * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -33360,94 +32898,94 @@ * a.inferred_insert_size = read.template_length */ { /* enter inner scope */ - __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1364, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1376, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1365 + /* "HTSeq/_HTSeq.pyx":1377 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_cigartuples); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); - if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { - __pyx_t_1 = __pyx_t_6; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_cigartuples); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) { + __pyx_t_6 = __pyx_t_1; __Pyx_INCREF(__pyx_t_6); __pyx_t_7 = 0; + __pyx_t_8 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1365, __pyx_L7_error) + __pyx_t_7 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1377, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_8 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1377, __pyx_L7_error) } - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; for (;;) { - if (likely(!__pyx_t_9)) { - if (likely(PyList_CheckExact(__pyx_t_1))) { - if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break; + if (likely(!__pyx_t_8)) { + if (likely(PyList_CheckExact(__pyx_t_6))) { + if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1365, __pyx_L7_error) + __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1377, __pyx_L7_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); #endif } else { - if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_6)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1365, __pyx_L7_error) + __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 1377, __pyx_L7_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1365, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1377, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); #endif } } else { - __pyx_t_6 = __pyx_t_9(__pyx_t_1); - if (unlikely(!__pyx_t_6)) { + __pyx_t_1 = __pyx_t_8(__pyx_t_6); + if (unlikely(!__pyx_t_1)) { PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1365, __pyx_L7_error) + else __PYX_ERR(0, 1377, __pyx_L7_error) } break; } - __Pyx_GOTREF(__pyx_t_6); + __Pyx_GOTREF(__pyx_t_1); } - if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { - PyObject* sequence = __pyx_t_6; + if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) { + PyObject* sequence = __pyx_t_1; 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, 1365, __pyx_L7_error) + __PYX_ERR(0, 1377, __pyx_L7_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0); __pyx_t_10 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_9 = PyList_GET_ITEM(sequence, 0); __pyx_t_10 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_5); + __Pyx_INCREF(__pyx_t_9); __Pyx_INCREF(__pyx_t_10); #else - __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1365, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_5); - __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1365, __pyx_L7_error) + __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1377, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_10 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1377, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); #endif - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1365, __pyx_L7_error) + __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1377, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_12 = Py_TYPE(__pyx_t_11)->tp_iternext; - index = 0; __pyx_t_5 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_5)) goto __pyx_L10_unpacking_failed; - __Pyx_GOTREF(__pyx_t_5); + index = 0; __pyx_t_9 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_9)) goto __pyx_L10_unpacking_failed; + __Pyx_GOTREF(__pyx_t_9); index = 1; __pyx_t_10 = __pyx_t_12(__pyx_t_11); if (unlikely(!__pyx_t_10)) goto __pyx_L10_unpacking_failed; __Pyx_GOTREF(__pyx_t_10); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1365, __pyx_L7_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_11), 2) < 0) __PYX_ERR(0, 1377, __pyx_L7_error) __pyx_t_12 = NULL; __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L11_unpacking_done; @@ -33455,38 +32993,38 @@ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; __pyx_t_12 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1365, __pyx_L7_error) + __PYX_ERR(0, 1377, __pyx_L7_error) __pyx_L11_unpacking_done:; } - __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_code, __pyx_t_5); - __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_code, __pyx_t_9); + __pyx_t_9 = 0; __Pyx_XDECREF_SET(__pyx_8genexpr5__pyx_v_length, __pyx_t_10); __pyx_t_10 = 0; - /* "HTSeq/_HTSeq.pyx":1364 + /* "HTSeq/_HTSeq.pyx":1376 * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.template_length */ - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1364, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); - __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_6, __pyx_8genexpr5__pyx_v_code); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1364, __pyx_L7_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_10 = __Pyx_PyObject_GetItem(__pyx_t_1, __pyx_8genexpr5__pyx_v_code); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1376, __pyx_L7_error) __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1364, __pyx_L7_error) - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1376, __pyx_L7_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_10); __Pyx_INCREF(__pyx_8genexpr5__pyx_v_length); __Pyx_GIVEREF(__pyx_8genexpr5__pyx_v_length); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_8genexpr5__pyx_v_length); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_8genexpr5__pyx_v_length); __pyx_t_10 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_7, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1364, __pyx_L7_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) __PYX_ERR(0, 1376, __pyx_L7_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_code); __pyx_8genexpr5__pyx_v_code = 0; __Pyx_XDECREF(__pyx_8genexpr5__pyx_v_length); __pyx_8genexpr5__pyx_v_length = 0; goto __pyx_L12_exit_scope; @@ -33497,21 +33035,21 @@ __pyx_L12_exit_scope:; } /* exit inner scope */ - /* "HTSeq/_HTSeq.pyx":1365 + /* "HTSeq/_HTSeq.pyx":1377 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __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, 1365, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(!__pyx_v_chrom)) { __Pyx_RaiseUnboundLocalError("chrom"); __PYX_ERR(0, 1365, __pyx_L1_error) } - 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, 1365, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_reference_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_6); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_v_chrom)) { __Pyx_RaiseUnboundLocalError("chrom"); __PYX_ERR(0, 1377, __pyx_L1_error) } + 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, 1377, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1364 + /* "HTSeq/_HTSeq.pyx":1376 * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -33522,27 +33060,27 @@ __pyx_t_14.ref_left = __pyx_t_13; __pyx_t_14.chrom = ((PyObject*)__pyx_v_chrom); __pyx_t_14.strand = __pyx_v_strand; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(((PyObject*)__pyx_t_7), 0, &__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1364, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_2 = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_6 = __pyx_f_5HTSeq_6_HTSeq_build_cigar_list(((PyObject*)__pyx_t_5), 0, &__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1376, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; } else { - /* "HTSeq/_HTSeq.pyx":1365 + /* "HTSeq/_HTSeq.pyx":1377 * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] # <<<<<<<<<<<<<< * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1365, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_6 = PyList_New(0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1377, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); + __pyx_t_2 = __pyx_t_6; + __pyx_t_6 = 0; } - /* "HTSeq/_HTSeq.pyx":1364 + /* "HTSeq/_HTSeq.pyx":1376 * seq.qual = numpy.array(read.query_qualities) * a = SAM_Alignment(seq, iv) * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( # <<<<<<<<<<<<<< @@ -33555,110 +33093,110 @@ __pyx_v_a->cigar = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1366 + /* "HTSeq/_HTSeq.pyx":1378 * a.cigar = build_cigar_list([(cigar_operation_codes[code], length) for ( * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.template_length # <<<<<<<<<<<<<< * a.aQual = read.mapping_quality * a.flag = read.flag */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_template_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1366, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_template_length); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); 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_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1378, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->inferred_insert_size = __pyx_t_13; - /* "HTSeq/_HTSeq.pyx":1367 + /* "HTSeq/_HTSeq.pyx":1379 * code, length) in read.cigartuples], read.reference_start, chrom, strand) if iv != None else [] * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality # <<<<<<<<<<<<<< * a.flag = read.flag * a.proper_pair = read.is_proper_pair */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mapping_quality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1367, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mapping_quality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1367, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyInt_As_int(__pyx_t_2); if (unlikely((__pyx_t_13 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1379, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->aQual = __pyx_t_13; - /* "HTSeq/_HTSeq.pyx":1368 + /* "HTSeq/_HTSeq.pyx":1380 * a.inferred_insert_size = read.template_length * a.aQual = read.mapping_quality * a.flag = read.flag # <<<<<<<<<<<<<< * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1368, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_flag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_a), __pyx_n_s_flag, __pyx_t_2) < 0) __PYX_ERR(0, 1368, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_a), __pyx_n_s_flag, __pyx_t_2) < 0) __PYX_ERR(0, 1380, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1369 + /* "HTSeq/_HTSeq.pyx":1381 * a.aQual = read.mapping_quality * a.flag = read.flag * a.proper_pair = read.is_proper_pair # <<<<<<<<<<<<<< * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_proper_pair); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1369, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1381, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->proper_pair = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1370 + /* "HTSeq/_HTSeq.pyx":1382 * a.flag = read.flag * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary # <<<<<<<<<<<<<< * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_secondary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1382, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1370, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1382, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->not_primary_alignment = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1371 + /* "HTSeq/_HTSeq.pyx":1383 * a.proper_pair = read.is_proper_pair * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail # <<<<<<<<<<<<<< * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_qcfail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_qcfail); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1371, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1383, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->failed_platform_qc = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1372 + /* "HTSeq/_HTSeq.pyx":1384 * a.not_primary_alignment = read.is_secondary * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate # <<<<<<<<<<<<<< * a.supplementary = read.is_supplementary * a.original_sam_line = "" */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_duplicate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1372, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_duplicate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1372, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1384, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->pcr_or_optical_duplicate = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1373 + /* "HTSeq/_HTSeq.pyx":1385 * a.failed_platform_qc = read.is_qcfail * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary # <<<<<<<<<<<<<< * a.original_sam_line = "" * a.optional_fields = read.tags */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_supplementary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1373, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1385, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_a->supplementary = __pyx_t_4; - /* "HTSeq/_HTSeq.pyx":1374 + /* "HTSeq/_HTSeq.pyx":1386 * a.pcr_or_optical_duplicate = read.is_duplicate * a.supplementary = read.is_supplementary * a.original_sam_line = "" # <<<<<<<<<<<<<< @@ -33671,45 +33209,45 @@ __Pyx_DECREF(__pyx_v_a->original_sam_line); __pyx_v_a->original_sam_line = __pyx_kp_u__12; - /* "HTSeq/_HTSeq.pyx":1375 + /* "HTSeq/_HTSeq.pyx":1387 * a.supplementary = read.is_supplementary * a.original_sam_line = "" * a.optional_fields = read.tags # <<<<<<<<<<<<<< * if read.is_paired: * # These two should be but are not always consistent */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1375, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_tags); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - 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, 1375, __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, 1387, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->optional_fields); __Pyx_DECREF(__pyx_v_a->optional_fields); __pyx_v_a->optional_fields = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1376 + /* "HTSeq/_HTSeq.pyx":1388 * a.original_sam_line = "" * a.optional_fields = read.tags * if read.is_paired: # <<<<<<<<<<<<<< * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_paired); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1376, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1388, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1378 + /* "HTSeq/_HTSeq.pyx":1390 * if read.is_paired: * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): # <<<<<<<<<<<<<< * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition(samfile.getrname( */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_unmapped); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1390, __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, 1378, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1390, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_15 = ((!__pyx_t_3) != 0); if (__pyx_t_15) { @@ -33717,133 +33255,104 @@ __pyx_t_4 = __pyx_t_15; goto __pyx_L15_bool_binop_done; } - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1390, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_int_neg_1, Py_NE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1378, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyInt_NeObjC(__pyx_t_2, __pyx_int_neg_1, -1L, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1390, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1378, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_15 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_15 < 0)) __PYX_ERR(0, 1390, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __pyx_t_15; __pyx_L15_bool_binop_done:; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1379 + /* "HTSeq/_HTSeq.pyx":1391 * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" # <<<<<<<<<<<<<< * a.mate_start = GenomicPosition(samfile.getrname( * read.mrnm), read.next_reference_start, strand) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mate_is_reverse); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1379, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1391, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { __Pyx_INCREF(__pyx_kp_u__20); - __pyx_t_1 = __pyx_kp_u__20; + __pyx_t_6 = __pyx_kp_u__20; } else { __Pyx_INCREF(__pyx_kp_u__19); - __pyx_t_1 = __pyx_kp_u__19; + __pyx_t_6 = __pyx_kp_u__19; } - __Pyx_DECREF_SET(__pyx_v_strand, ((PyObject*)__pyx_t_1)); - __pyx_t_1 = 0; + __Pyx_DECREF_SET(__pyx_v_strand, ((PyObject*)__pyx_t_6)); + __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1380 + /* "HTSeq/_HTSeq.pyx":1392 * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition(samfile.getrname( # <<<<<<<<<<<<<< * read.mrnm), read.next_reference_start, strand) * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_samfile, __pyx_n_s_getrname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1381 + /* "HTSeq/_HTSeq.pyx":1393 * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition(samfile.getrname( * read.mrnm), read.next_reference_start, strand) # <<<<<<<<<<<<<< * else: * a.mate_start = None */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1381, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = NULL; + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_mrnm); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1393, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_1 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2); + if (likely(__pyx_t_1)) { PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_1); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1380, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1380, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_6 = (__pyx_t_1) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_1, __pyx_t_5) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); + __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1392, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_next_reference_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1381, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_next_reference_start); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1393, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - /* "HTSeq/_HTSeq.pyx":1380 + /* "HTSeq/_HTSeq.pyx":1392 * if (not read.mate_is_unmapped) and (read.mrnm != -1): * strand = "-" if read.mate_is_reverse else "+" * a.mate_start = GenomicPosition(samfile.getrname( # <<<<<<<<<<<<<< * read.mrnm), read.next_reference_start, strand) * else: */ - __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1380, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1); + __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __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_2); - PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2); __Pyx_INCREF(__pyx_v_strand); __Pyx_GIVEREF(__pyx_v_strand); - PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_v_strand); - __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_strand); + __pyx_t_6 = 0; __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1380, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1392, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->mate_start); __Pyx_DECREF(((PyObject *)__pyx_v_a->mate_start)); __pyx_v_a->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1378 + /* "HTSeq/_HTSeq.pyx":1390 * if read.is_paired: * # These two should be but are not always consistent * if (not read.mate_is_unmapped) and (read.mrnm != -1): # <<<<<<<<<<<<<< @@ -33853,7 +33362,7 @@ goto __pyx_L14; } - /* "HTSeq/_HTSeq.pyx":1383 + /* "HTSeq/_HTSeq.pyx":1395 * read.mrnm), read.next_reference_start, strand) * else: * a.mate_start = None # <<<<<<<<<<<<<< @@ -33869,36 +33378,36 @@ } __pyx_L14:; - /* "HTSeq/_HTSeq.pyx":1384 + /* "HTSeq/_HTSeq.pyx":1396 * else: * a.mate_start = None * if read.is_read1: # <<<<<<<<<<<<<< * a.pe_which = intern("first") * elif read.is_read2: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1384, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1396, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1385 + /* "HTSeq/_HTSeq.pyx":1397 * a.mate_start = None * if read.is_read1: * a.pe_which = intern("first") # <<<<<<<<<<<<<< * elif read.is_read2: * a.pe_which = intern("second") */ - __pyx_t_2 = __Pyx_Intern(__pyx_n_u_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1385, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_u_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1397, __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, 1385, __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, 1397, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); __pyx_v_a->pe_which = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1384 + /* "HTSeq/_HTSeq.pyx":1396 * else: * a.mate_start = None * if read.is_read1: # <<<<<<<<<<<<<< @@ -33908,36 +33417,36 @@ goto __pyx_L17; } - /* "HTSeq/_HTSeq.pyx":1386 + /* "HTSeq/_HTSeq.pyx":1398 * if read.is_read1: * a.pe_which = intern("first") * elif read.is_read2: # <<<<<<<<<<<<<< * a.pe_which = intern("second") * else: */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_read, __pyx_n_s_is_read2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1398, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1386, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1398, __pyx_L1_error) __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { - /* "HTSeq/_HTSeq.pyx":1387 + /* "HTSeq/_HTSeq.pyx":1399 * a.pe_which = intern("first") * elif read.is_read2: * a.pe_which = intern("second") # <<<<<<<<<<<<<< * else: * a.pe_which = intern("unknown") */ - __pyx_t_2 = __Pyx_Intern(__pyx_n_u_second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1387, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_u_second); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1399, __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, 1387, __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, 1399, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); __pyx_v_a->pe_which = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; - /* "HTSeq/_HTSeq.pyx":1386 + /* "HTSeq/_HTSeq.pyx":1398 * if read.is_read1: * a.pe_which = intern("first") * elif read.is_read2: # <<<<<<<<<<<<<< @@ -33947,7 +33456,7 @@ goto __pyx_L17; } - /* "HTSeq/_HTSeq.pyx":1389 + /* "HTSeq/_HTSeq.pyx":1401 * a.pe_which = intern("second") * else: * a.pe_which = intern("unknown") # <<<<<<<<<<<<<< @@ -33955,9 +33464,9 @@ * a.pe_which = intern("not_paired_end") */ /*else*/ { - __pyx_t_2 = __Pyx_Intern(__pyx_n_u_unknown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1389, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_u_unknown); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1401, __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, 1389, __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, 1401, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); @@ -33966,7 +33475,7 @@ } __pyx_L17:; - /* "HTSeq/_HTSeq.pyx":1376 + /* "HTSeq/_HTSeq.pyx":1388 * a.original_sam_line = "" * a.optional_fields = read.tags * if read.is_paired: # <<<<<<<<<<<<<< @@ -33976,7 +33485,7 @@ goto __pyx_L13; } - /* "HTSeq/_HTSeq.pyx":1391 + /* "HTSeq/_HTSeq.pyx":1403 * a.pe_which = intern("unknown") * else: * a.pe_which = intern("not_paired_end") # <<<<<<<<<<<<<< @@ -33984,9 +33493,9 @@ * */ /*else*/ { - __pyx_t_2 = __Pyx_Intern(__pyx_n_u_not_paired_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1391, __pyx_L1_error) + __pyx_t_2 = __Pyx_Intern(__pyx_n_u_not_paired_end); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1403, __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, 1391, __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, 1403, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_a->pe_which); __Pyx_DECREF(__pyx_v_a->pe_which); @@ -33995,7 +33504,7 @@ } __pyx_L13:; - /* "HTSeq/_HTSeq.pyx":1392 + /* "HTSeq/_HTSeq.pyx":1404 * else: * a.pe_which = intern("not_paired_end") * return a # <<<<<<<<<<<<<< @@ -34007,7 +33516,7 @@ __pyx_r = ((PyObject *)__pyx_v_a); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1351 + /* "HTSeq/_HTSeq.pyx":1363 * * @classmethod * def from_pysam_AlignedSegment(cls, read, samfile): # <<<<<<<<<<<<<< @@ -34021,7 +33530,7 @@ __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_AddTraceback("HTSeq._HTSeq.SAM_Alignment.from_pysam_AlignedSegment", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -34039,7 +33548,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1395 +/* "HTSeq/_HTSeq.pyx":1407 * * @classmethod * def from_SAM_line(cls, line): # <<<<<<<<<<<<<< @@ -34087,9 +33596,9 @@ PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - int __pyx_t_5; - PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + int __pyx_t_6; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; @@ -34105,54 +33614,63 @@ struct __pyx_opt_args_5HTSeq_6_HTSeq_parse_cigar __pyx_t_19; __Pyx_RefNannySetupContext("from_SAM_line", 0); - /* "HTSeq/_HTSeq.pyx":1404 + /* "HTSeq/_HTSeq.pyx":1416 * cdef SequenceWithQualities swq * * fields = line.rstrip().split("\t") # <<<<<<<<<<<<<< * if len(fields) < 10: * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = NULL; - 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_line, __pyx_n_s_rstrip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = NULL; + 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_2, function); + __Pyx_DECREF_SET(__pyx_t_3, function); } } - if (__pyx_t_3) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1404, __pyx_L1_error) - } - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_split); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1404, __pyx_L1_error) + __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, 1416, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__42, NULL); 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_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1416, __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 && 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_1 = (__pyx_t_2) ? __Pyx_PyObject_Call2Args(__pyx_t_3, __pyx_t_2, __pyx_kp_u__21) : __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_kp_u__21); + __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1416, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_v_fields = __pyx_t_1; __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1405 + /* "HTSeq/_HTSeq.pyx":1417 * * fields = line.rstrip().split("\t") * if len(fields) < 10: # <<<<<<<<<<<<<< * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, */ - __pyx_t_4 = PyObject_Length(__pyx_v_fields); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1405, __pyx_L1_error) - __pyx_t_5 = ((__pyx_t_4 < 10) != 0); - if (unlikely(__pyx_t_5)) { + __pyx_t_5 = PyObject_Length(__pyx_v_fields); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1417, __pyx_L1_error) + __pyx_t_6 = ((__pyx_t_5 < 10) != 0); + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":1406 + /* "HTSeq/_HTSeq.pyx":1418 * fields = line.rstrip().split("\t") * if len(fields) < 10: * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." # <<<<<<<<<<<<<< @@ -34160,9 +33678,9 @@ * seq, qual) = fields[0:11] */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_SAM_line_does_not_contain_at_lea, 0, 0); - __PYX_ERR(0, 1406, __pyx_L1_error) + __PYX_ERR(0, 1418, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1405 + /* "HTSeq/_HTSeq.pyx":1417 * * fields = line.rstrip().split("\t") * if len(fields) < 10: # <<<<<<<<<<<<<< @@ -34171,14 +33689,14 @@ */ } - /* "HTSeq/_HTSeq.pyx":1408 + /* "HTSeq/_HTSeq.pyx":1420 * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, * seq, qual) = fields[0:11] # <<<<<<<<<<<<<< * optional_fields = fields[11:] * */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 0, 11, NULL, NULL, &__pyx_slice__43, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1408, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 0, 11, NULL, NULL, &__pyx_slice__35, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1420, __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; @@ -34186,13 +33704,13 @@ if (unlikely(size != 11)) { if (size > 11) __Pyx_RaiseTooManyValuesError(11); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(0, 1407, __pyx_L1_error) + __PYX_ERR(0, 1419, __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_3 = PyTuple_GET_ITEM(sequence, 1); - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2); + __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 2); __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3); __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4); __pyx_t_9 = PyTuple_GET_ITEM(sequence, 5); @@ -34202,9 +33720,9 @@ __pyx_t_13 = PyTuple_GET_ITEM(sequence, 9); __pyx_t_14 = PyTuple_GET_ITEM(sequence, 10); } else { - __pyx_t_2 = PyList_GET_ITEM(sequence, 0); - __pyx_t_3 = PyList_GET_ITEM(sequence, 1); - __pyx_t_6 = PyList_GET_ITEM(sequence, 2); + __pyx_t_3 = PyList_GET_ITEM(sequence, 0); + __pyx_t_2 = PyList_GET_ITEM(sequence, 1); + __pyx_t_4 = PyList_GET_ITEM(sequence, 2); __pyx_t_7 = PyList_GET_ITEM(sequence, 3); __pyx_t_8 = PyList_GET_ITEM(sequence, 4); __pyx_t_9 = PyList_GET_ITEM(sequence, 5); @@ -34214,9 +33732,9 @@ __pyx_t_13 = PyList_GET_ITEM(sequence, 9); __pyx_t_14 = PyList_GET_ITEM(sequence, 10); } - __Pyx_INCREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_6); + __Pyx_INCREF(__pyx_t_2); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(__pyx_t_7); __Pyx_INCREF(__pyx_t_8); __Pyx_INCREF(__pyx_t_9); @@ -34228,9 +33746,9 @@ #else { Py_ssize_t i; - PyObject** temps[11] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_6,&__pyx_t_7,&__pyx_t_8,&__pyx_t_9,&__pyx_t_10,&__pyx_t_11,&__pyx_t_12,&__pyx_t_13,&__pyx_t_14}; + PyObject** temps[11] = {&__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}; for (i=0; i < 11; i++) { - PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1407, __pyx_L1_error) + PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(item); *(temps[i]) = item; } @@ -34239,8 +33757,8 @@ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } else { Py_ssize_t index = -1; - PyObject** temps[11] = {&__pyx_t_2,&__pyx_t_3,&__pyx_t_6,&__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 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1407, __pyx_L1_error) + PyObject** temps[11] = {&__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 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 1419, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_15); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext; @@ -34249,7 +33767,7 @@ __Pyx_GOTREF(item); *(temps[index]) = item; } - if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 11) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) + if (__Pyx_IternextUnpackEndCheck(__pyx_t_16(__pyx_t_15), 11) < 0) __PYX_ERR(0, 1419, __pyx_L1_error) __pyx_t_16 = NULL; __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; goto __pyx_L5_unpacking_done; @@ -34257,34 +33775,34 @@ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0; __pyx_t_16 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); - __PYX_ERR(0, 1407, __pyx_L1_error) + __PYX_ERR(0, 1419, __pyx_L1_error) __pyx_L5_unpacking_done:; } - /* "HTSeq/_HTSeq.pyx":1407 + /* "HTSeq/_HTSeq.pyx":1419 * if len(fields) < 10: * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, # <<<<<<<<<<<<<< * seq, qual) = fields[0:11] * optional_fields = fields[11:] */ - 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, 1407, __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, 1407, __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, 1407, __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, 1407, __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, 1407, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 1407, __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, 1407, __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, 1407, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_12)->tp_name), 0))) __PYX_ERR(0, 1407, __pyx_L1_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, 1407, __pyx_L1_error) - if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1407, __pyx_L1_error) - __pyx_v_qname = ((PyObject*)__pyx_t_2); - __pyx_t_2 = 0; - __pyx_v_flag = ((PyObject*)__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, 1419, __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, 1419, __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, 1419, __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, 1419, __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, 1419, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_9))||((__pyx_t_9) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_9)->tp_name), 0))) __PYX_ERR(0, 1419, __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, 1419, __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, 1419, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_12))||((__pyx_t_12) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_12)->tp_name), 0))) __PYX_ERR(0, 1419, __pyx_L1_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, 1419, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1419, __pyx_L1_error) + __pyx_v_qname = ((PyObject*)__pyx_t_3); __pyx_t_3 = 0; - __pyx_v_rname = ((PyObject*)__pyx_t_6); - __pyx_t_6 = 0; + __pyx_v_flag = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + __pyx_v_rname = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; __pyx_v_pos = ((PyObject*)__pyx_t_7); __pyx_t_7 = 0; __pyx_v_mapq = ((PyObject*)__pyx_t_8); @@ -34302,20 +33820,20 @@ __pyx_v_qual = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1409 + /* "HTSeq/_HTSeq.pyx":1421 * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, * seq, qual) = fields[0:11] * optional_fields = fields[11:] # <<<<<<<<<<<<<< * * if seq.count("=") > 0: */ - __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 11, 0, NULL, NULL, &__pyx_slice__44, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1409, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v_fields, 11, 0, NULL, NULL, &__pyx_slice__36, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1421, __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, 1409, __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, 1421, __pyx_L1_error) __pyx_v_optional_fields = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1411 + /* "HTSeq/_HTSeq.pyx":1423 * optional_fields = fields[11:] * * if seq.count("=") > 0: # <<<<<<<<<<<<<< @@ -34324,18 +33842,18 @@ */ if (unlikely(__pyx_v_seq == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "count"); - __PYX_ERR(0, 1411, __pyx_L1_error) + __PYX_ERR(0, 1423, __pyx_L1_error) } - __pyx_t_4 = PyUnicode_Count(__pyx_v_seq, __pyx_kp_u__38, 0, PY_SSIZE_T_MAX); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1411, __pyx_L1_error) - __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_5 = PyUnicode_Count(__pyx_v_seq, __pyx_kp_u__33, 0, PY_SSIZE_T_MAX); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1423, __pyx_L1_error) + __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_14 = PyObject_RichCompare(__pyx_t_1, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_14); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1411, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_14); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1423, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - if (unlikely(__pyx_t_5)) { + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":1412 + /* "HTSeq/_HTSeq.pyx":1424 * * if seq.count("=") > 0: * raise ValueError, "Sequence in SAM file contains '=', which is not supported." # <<<<<<<<<<<<<< @@ -34343,9 +33861,9 @@ * raise ValueError, "Sequence in SAM file contains '.', which is not supported." */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Sequence_in_SAM_file_contains_wh, 0, 0); - __PYX_ERR(0, 1412, __pyx_L1_error) + __PYX_ERR(0, 1424, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1411 + /* "HTSeq/_HTSeq.pyx":1423 * optional_fields = fields[11:] * * if seq.count("=") > 0: # <<<<<<<<<<<<<< @@ -34354,7 +33872,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1413 + /* "HTSeq/_HTSeq.pyx":1425 * if seq.count("=") > 0: * raise ValueError, "Sequence in SAM file contains '=', which is not supported." * if seq.count(".") > 0: # <<<<<<<<<<<<<< @@ -34363,18 +33881,18 @@ */ if (unlikely(__pyx_v_seq == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "count"); - __PYX_ERR(0, 1413, __pyx_L1_error) + __PYX_ERR(0, 1425, __pyx_L1_error) } - __pyx_t_4 = PyUnicode_Count(__pyx_v_seq, __pyx_kp_u__8, 0, PY_SSIZE_T_MAX); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1413, __pyx_L1_error) - __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_5 = PyUnicode_Count(__pyx_v_seq, __pyx_kp_u__8, 0, PY_SSIZE_T_MAX); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1425, __pyx_L1_error) + __pyx_t_14 = PyInt_FromSsize_t(__pyx_t_5); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_1 = PyObject_RichCompare(__pyx_t_14, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_1 = PyObject_RichCompare(__pyx_t_14, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1413, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1425, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (unlikely(__pyx_t_5)) { + if (unlikely(__pyx_t_6)) { - /* "HTSeq/_HTSeq.pyx":1414 + /* "HTSeq/_HTSeq.pyx":1426 * raise ValueError, "Sequence in SAM file contains '=', which is not supported." * if seq.count(".") > 0: * raise ValueError, "Sequence in SAM file contains '.', which is not supported." # <<<<<<<<<<<<<< @@ -34382,9 +33900,9 @@ * */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Sequence_in_SAM_file_contains_wh_2, 0, 0); - __PYX_ERR(0, 1414, __pyx_L1_error) + __PYX_ERR(0, 1426, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1413 + /* "HTSeq/_HTSeq.pyx":1425 * if seq.count("=") > 0: * raise ValueError, "Sequence in SAM file contains '=', which is not supported." * if seq.count(".") > 0: # <<<<<<<<<<<<<< @@ -34393,30 +33911,30 @@ */ } - /* "HTSeq/_HTSeq.pyx":1415 + /* "HTSeq/_HTSeq.pyx":1427 * if seq.count(".") > 0: * raise ValueError, "Sequence in SAM file contains '.', which is not supported." * flagint = int(flag) # <<<<<<<<<<<<<< * * if flagint & 0x0004: # flag "query sequence is unmapped" */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1415, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1427, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_flagint = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1417 + /* "HTSeq/_HTSeq.pyx":1429 * flagint = int(flag) * * if flagint & 0x0004: # flag "query sequence is unmapped" # <<<<<<<<<<<<<< * iv = None * cigarlist = None */ - __pyx_t_5 = ((__pyx_v_flagint & 0x0004) != 0); - if (__pyx_t_5) { + __pyx_t_6 = ((__pyx_v_flagint & 0x0004) != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1418 + /* "HTSeq/_HTSeq.pyx":1430 * * if flagint & 0x0004: # flag "query sequence is unmapped" * iv = None # <<<<<<<<<<<<<< @@ -34426,7 +33944,7 @@ __Pyx_INCREF(Py_None); __pyx_v_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)Py_None); - /* "HTSeq/_HTSeq.pyx":1419 + /* "HTSeq/_HTSeq.pyx":1431 * if flagint & 0x0004: # flag "query sequence is unmapped" * iv = None * cigarlist = None # <<<<<<<<<<<<<< @@ -34436,7 +33954,7 @@ __Pyx_INCREF(Py_None); __pyx_v_cigarlist = ((PyObject*)Py_None); - /* "HTSeq/_HTSeq.pyx":1417 + /* "HTSeq/_HTSeq.pyx":1429 * flagint = int(flag) * * if flagint & 0x0004: # flag "query sequence is unmapped" # <<<<<<<<<<<<<< @@ -34446,7 +33964,7 @@ goto __pyx_L8; } - /* "HTSeq/_HTSeq.pyx":1421 + /* "HTSeq/_HTSeq.pyx":1433 * cigarlist = None * else: * if rname == "*": # <<<<<<<<<<<<<< @@ -34454,11 +33972,11 @@ * # SAM is one-based, but HTSeq is zero-based! */ /*else*/ { - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_rname, __pyx_kp_u__41, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1421, __pyx_L1_error) - __pyx_t_18 = (__pyx_t_5 != 0); + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_rname, __pyx_kp_u__34, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1433, __pyx_L1_error) + __pyx_t_18 = (__pyx_t_6 != 0); if (unlikely(__pyx_t_18)) { - /* "HTSeq/_HTSeq.pyx":1422 + /* "HTSeq/_HTSeq.pyx":1434 * else: * if rname == "*": * raise ValueError, "Malformed SAM line: RNAME == '*' although flag bit &0x0004 cleared" # <<<<<<<<<<<<<< @@ -34466,9 +33984,9 @@ * posint = int(pos) - 1 */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Malformed_SAM_line_RNAME_althoug, 0, 0); - __PYX_ERR(0, 1422, __pyx_L1_error) + __PYX_ERR(0, 1434, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1421 + /* "HTSeq/_HTSeq.pyx":1433 * cigarlist = None * else: * if rname == "*": # <<<<<<<<<<<<<< @@ -34477,23 +33995,23 @@ */ } - /* "HTSeq/_HTSeq.pyx":1424 + /* "HTSeq/_HTSeq.pyx":1436 * raise ValueError, "Malformed SAM line: RNAME == '*' although flag bit &0x0004 cleared" * # SAM is one-based, but HTSeq is zero-based! * posint = int(pos) - 1 # <<<<<<<<<<<<<< * if flagint & 0x0010: # flag "strand of the query" * strand = "-" */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1424, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1436, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_posint = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1425 + /* "HTSeq/_HTSeq.pyx":1437 * # SAM is one-based, but HTSeq is zero-based! * posint = int(pos) - 1 * if flagint & 0x0010: # flag "strand of the query" # <<<<<<<<<<<<<< @@ -34503,7 +34021,7 @@ __pyx_t_18 = ((__pyx_v_flagint & 0x0010) != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1426 + /* "HTSeq/_HTSeq.pyx":1438 * posint = int(pos) - 1 * if flagint & 0x0010: # flag "strand of the query" * strand = "-" # <<<<<<<<<<<<<< @@ -34513,7 +34031,7 @@ __Pyx_INCREF(__pyx_kp_u__20); __pyx_v_strand = __pyx_kp_u__20; - /* "HTSeq/_HTSeq.pyx":1425 + /* "HTSeq/_HTSeq.pyx":1437 * # SAM is one-based, but HTSeq is zero-based! * posint = int(pos) - 1 * if flagint & 0x0010: # flag "strand of the query" # <<<<<<<<<<<<<< @@ -34523,7 +34041,7 @@ goto __pyx_L10; } - /* "HTSeq/_HTSeq.pyx":1428 + /* "HTSeq/_HTSeq.pyx":1440 * strand = "-" * else: * strand = "+" # <<<<<<<<<<<<<< @@ -34536,7 +34054,7 @@ } __pyx_L10:; - /* "HTSeq/_HTSeq.pyx":1429 + /* "HTSeq/_HTSeq.pyx":1441 * else: * strand = "+" * cigarlist = parse_cigar(cigar, posint, rname, strand) # <<<<<<<<<<<<<< @@ -34547,41 +34065,41 @@ __pyx_t_19.ref_left = __pyx_v_posint; __pyx_t_19.chrom = __pyx_v_rname; __pyx_t_19.strand = __pyx_v_strand; - __pyx_t_14 = __pyx_f_5HTSeq_6_HTSeq_parse_cigar(__pyx_v_cigar, 0, &__pyx_t_19); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1429, __pyx_L1_error) + __pyx_t_14 = __pyx_f_5HTSeq_6_HTSeq_parse_cigar(__pyx_v_cigar, 0, &__pyx_t_19); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1441, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_v_cigarlist = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1431 + /* "HTSeq/_HTSeq.pyx":1443 * cigarlist = parse_cigar(cigar, posint, rname, strand) * iv = GenomicInterval( * rname, posint, cigarlist[-1].ref_iv.end, strand) # <<<<<<<<<<<<<< * * if qual != "*": */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_posint); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_posint); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); if (unlikely(__pyx_v_cigarlist == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1431, __pyx_L1_error) + __PYX_ERR(0, 1443, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_cigarlist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_cigarlist, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ref_iv); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_ref_iv); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1431, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_end); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1430 + /* "HTSeq/_HTSeq.pyx":1442 * strand = "+" * cigarlist = parse_cigar(cigar, posint, rname, strand) * iv = GenomicInterval( # <<<<<<<<<<<<<< * rname, posint, cigarlist[-1].ref_iv.end, strand) * */ - __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_INCREF(__pyx_v_rname); __Pyx_GIVEREF(__pyx_v_rname); @@ -34595,7 +34113,7 @@ PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_v_strand); __pyx_t_14 = 0; __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1430, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval), __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1442, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_v_iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); @@ -34603,25 +34121,25 @@ } __pyx_L8:; - /* "HTSeq/_HTSeq.pyx":1433 + /* "HTSeq/_HTSeq.pyx":1445 * rname, posint, cigarlist[-1].ref_iv.end, strand) * * if qual != "*": # <<<<<<<<<<<<<< * swq = SequenceWithQualities( * seq.upper().encode(), qname, qual.upper().encode()) */ - __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_v_qual, __pyx_kp_u__41, Py_NE)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1433, __pyx_L1_error) - __pyx_t_5 = (__pyx_t_18 != 0); - if (__pyx_t_5) { + __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_v_qual, __pyx_kp_u__34, Py_NE)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_18 != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1435 + /* "HTSeq/_HTSeq.pyx":1447 * if qual != "*": * swq = SequenceWithQualities( * seq.upper().encode(), qname, qual.upper().encode()) # <<<<<<<<<<<<<< * else: * swq = SequenceWithQualities( */ - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_seq, __pyx_n_s_upper); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_seq, __pyx_n_s_upper); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __pyx_t_12 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) { @@ -34633,15 +34151,12 @@ __Pyx_DECREF_SET(__pyx_t_14, function); } } - if (__pyx_t_12) { - __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1435, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1435, __pyx_L1_error) - } + __pyx_t_13 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_encode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_encode); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; @@ -34654,15 +34169,12 @@ __Pyx_DECREF_SET(__pyx_t_14, function); } } - if (__pyx_t_13) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - } else { - __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1435, __pyx_L1_error) - } + __pyx_t_1 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_14); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_qual, __pyx_n_s_upper); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_qual, __pyx_n_s_upper); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_11 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -34674,15 +34186,12 @@ __Pyx_DECREF_SET(__pyx_t_12, function); } } - if (__pyx_t_11) { - __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1435, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; - } else { - __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1435, __pyx_L1_error) - } + __pyx_t_13 = (__pyx_t_11) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_11) : __Pyx_PyObject_CallNoArg(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_encode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1435, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_13, __pyx_n_s_encode); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_t_13 = NULL; @@ -34695,23 +34204,20 @@ __Pyx_DECREF_SET(__pyx_t_12, function); } } - if (__pyx_t_13) { - __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1435, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - } else { - __pyx_t_14 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1435, __pyx_L1_error) - } + __pyx_t_14 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1447, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - /* "HTSeq/_HTSeq.pyx":1434 + /* "HTSeq/_HTSeq.pyx":1446 * * if qual != "*": * swq = SequenceWithQualities( # <<<<<<<<<<<<<< * seq.upper().encode(), qname, qual.upper().encode()) * else: */ - __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_12 = PyTuple_New(3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_1); @@ -34722,13 +34228,13 @@ PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_14); __pyx_t_1 = 0; __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_12, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1434, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_12, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1446, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_v_swq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1433 + /* "HTSeq/_HTSeq.pyx":1445 * rname, posint, cigarlist[-1].ref_iv.end, strand) * * if qual != "*": # <<<<<<<<<<<<<< @@ -34738,7 +34244,7 @@ goto __pyx_L11; } - /* "HTSeq/_HTSeq.pyx":1437 + /* "HTSeq/_HTSeq.pyx":1449 * seq.upper().encode(), qname, qual.upper().encode()) * else: * swq = SequenceWithQualities( # <<<<<<<<<<<<<< @@ -34747,14 +34253,14 @@ */ /*else*/ { - /* "HTSeq/_HTSeq.pyx":1438 + /* "HTSeq/_HTSeq.pyx":1450 * else: * swq = SequenceWithQualities( * seq.upper().encode(), qname, b"", "noquals") # <<<<<<<<<<<<<< * * alnmt = SAM_Alignment(swq, iv) */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_seq, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_seq, __pyx_n_s_upper); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_13 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) { @@ -34766,15 +34272,12 @@ __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_13) { - __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1438, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - } else { - __pyx_t_12 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1438, __pyx_L1_error) - } + __pyx_t_12 = (__pyx_t_13) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0; + if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1438, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_encode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -34787,23 +34290,20 @@ __Pyx_DECREF_SET(__pyx_t_1, function); } } - if (__pyx_t_12) { - __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1438, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - __pyx_t_14 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1438, __pyx_L1_error) - } + __pyx_t_14 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1450, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1437 + /* "HTSeq/_HTSeq.pyx":1449 * seq.upper().encode(), qname, qual.upper().encode()) * else: * swq = SequenceWithQualities( # <<<<<<<<<<<<<< * seq.upper().encode(), qname, b"", "noquals") * */ - __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_14); @@ -34817,7 +34317,7 @@ __Pyx_GIVEREF(__pyx_n_u_noquals); PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_n_u_noquals); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_1, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1437, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities), __pyx_t_1, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1449, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_swq = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_14); @@ -34825,14 +34325,14 @@ } __pyx_L11:; - /* "HTSeq/_HTSeq.pyx":1440 + /* "HTSeq/_HTSeq.pyx":1452 * seq.upper().encode(), qname, b"", "noquals") * * alnmt = SAM_Alignment(swq, iv) # <<<<<<<<<<<<<< * alnmt.flag = flagint * alnmt.cigar = cigarlist */ - __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(((PyObject *)__pyx_v_swq)); __Pyx_GIVEREF(((PyObject *)__pyx_v_swq)); @@ -34840,25 +34340,25 @@ __Pyx_INCREF(((PyObject *)__pyx_v_iv)); __Pyx_GIVEREF(((PyObject *)__pyx_v_iv)); PyTuple_SET_ITEM(__pyx_t_14, 1, ((PyObject *)__pyx_v_iv)); - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1440, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1452, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_alnmt = ((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1441 + /* "HTSeq/_HTSeq.pyx":1453 * * alnmt = SAM_Alignment(swq, iv) * alnmt.flag = flagint # <<<<<<<<<<<<<< * alnmt.cigar = cigarlist * alnmt.optional_fields = [ */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flagint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_flagint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_alnmt), __pyx_n_s_flag, __pyx_t_1) < 0) __PYX_ERR(0, 1441, __pyx_L1_error) + if (__Pyx_PyObject_SetAttrStr(((PyObject *)__pyx_v_alnmt), __pyx_n_s_flag, __pyx_t_1) < 0) __PYX_ERR(0, 1453, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1442 + /* "HTSeq/_HTSeq.pyx":1454 * alnmt = SAM_Alignment(swq, iv) * alnmt.flag = flagint * alnmt.cigar = cigarlist # <<<<<<<<<<<<<< @@ -34871,7 +34371,7 @@ __Pyx_DECREF(__pyx_v_alnmt->cigar); __pyx_v_alnmt->cigar = __pyx_v_cigarlist; - /* "HTSeq/_HTSeq.pyx":1443 + /* "HTSeq/_HTSeq.pyx":1455 * alnmt.flag = flagint * alnmt.cigar = cigarlist * alnmt.optional_fields = [ # <<<<<<<<<<<<<< @@ -34879,10 +34379,10 @@ * alnmt.aQual = int(mapq) */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1443, __pyx_L14_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":1444 + /* "HTSeq/_HTSeq.pyx":1456 * alnmt.cigar = cigarlist * alnmt.optional_fields = [ * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] # <<<<<<<<<<<<<< @@ -34891,25 +34391,25 @@ */ if (unlikely(__pyx_v_optional_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1444, __pyx_L14_error) + __PYX_ERR(0, 1456, __pyx_L14_error) } - __pyx_t_14 = __pyx_v_optional_fields; __Pyx_INCREF(__pyx_t_14); __pyx_t_4 = 0; + __pyx_t_14 = __pyx_v_optional_fields; __Pyx_INCREF(__pyx_t_14); __pyx_t_5 = 0; for (;;) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_14)) break; + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_14)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_12 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_4); __Pyx_INCREF(__pyx_t_12); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1444, __pyx_L14_error) + __pyx_t_12 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_5); __Pyx_INCREF(__pyx_t_12); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 1456, __pyx_L14_error) #else - __pyx_t_12 = PySequence_ITEM(__pyx_t_14, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1444, __pyx_L14_error) + __pyx_t_12 = PySequence_ITEM(__pyx_t_14, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1456, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_12); #endif __Pyx_XDECREF_SET(__pyx_8genexpr6__pyx_v_field, __pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_8genexpr6__pyx_v_field, 0, 2, NULL, NULL, &__pyx_slice__45, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1444, __pyx_L14_error) + __pyx_t_12 = __Pyx_PyObject_GetSlice(__pyx_8genexpr6__pyx_v_field, 0, 2, NULL, NULL, &__pyx_slice__37, 0, 1, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1456, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_12); - if (!(likely(PyUnicode_CheckExact(__pyx_8genexpr6__pyx_v_field))||((__pyx_8genexpr6__pyx_v_field) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_8genexpr6__pyx_v_field)->tp_name), 0))) __PYX_ERR(0, 1444, __pyx_L14_error) - __pyx_t_13 = __pyx_f_5HTSeq_6_HTSeq__parse_SAM_optional_field_value(((PyObject*)__pyx_8genexpr6__pyx_v_field)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1444, __pyx_L14_error) + if (!(likely(PyUnicode_CheckExact(__pyx_8genexpr6__pyx_v_field))||((__pyx_8genexpr6__pyx_v_field) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_8genexpr6__pyx_v_field)->tp_name), 0))) __PYX_ERR(0, 1456, __pyx_L14_error) + __pyx_t_13 = __pyx_f_5HTSeq_6_HTSeq__parse_SAM_optional_field_value(((PyObject*)__pyx_8genexpr6__pyx_v_field)); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1456, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_13); - __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1444, __pyx_L14_error) + __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1456, __pyx_L14_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); @@ -34917,7 +34417,7 @@ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_13); __pyx_t_12 = 0; __pyx_t_13 = 0; - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1443, __pyx_L14_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_11))) __PYX_ERR(0, 1455, __pyx_L14_error) __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; } __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; @@ -34929,7 +34429,7 @@ __pyx_L17_exit_scope:; } /* exit inner scope */ - /* "HTSeq/_HTSeq.pyx":1443 + /* "HTSeq/_HTSeq.pyx":1455 * alnmt.flag = flagint * alnmt.cigar = cigarlist * alnmt.optional_fields = [ # <<<<<<<<<<<<<< @@ -34942,40 +34442,40 @@ __pyx_v_alnmt->optional_fields = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1445 + /* "HTSeq/_HTSeq.pyx":1457 * alnmt.optional_fields = [ * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] * alnmt.aQual = int(mapq) # <<<<<<<<<<<<<< * alnmt.inferred_insert_size = int(isize) * alnmt.original_sam_line = line */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_mapq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_mapq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1445, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1457, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_alnmt->aQual = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1446 + /* "HTSeq/_HTSeq.pyx":1458 * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] * alnmt.aQual = int(mapq) * alnmt.inferred_insert_size = int(isize) # <<<<<<<<<<<<<< * alnmt.original_sam_line = line * */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_isize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_isize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1446, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1458, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_alnmt->inferred_insert_size = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1447 + /* "HTSeq/_HTSeq.pyx":1459 * alnmt.aQual = int(mapq) * alnmt.inferred_insert_size = int(isize) * alnmt.original_sam_line = line # <<<<<<<<<<<<<< * * if flagint & 0x0001: # flag "read is paired in sequencing" */ - 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, 1447, __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, 1459, __pyx_L1_error) __pyx_t_1 = __pyx_v_line; __Pyx_INCREF(__pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -34984,27 +34484,27 @@ __pyx_v_alnmt->original_sam_line = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1449 + /* "HTSeq/_HTSeq.pyx":1461 * alnmt.original_sam_line = line * * if flagint & 0x0001: # flag "read is paired in sequencing" # <<<<<<<<<<<<<< * if flagint & 0x0008: # flag "mate is unmapped" * alnmt.mate_start = None */ - __pyx_t_5 = ((__pyx_v_flagint & 0x0001) != 0); - if (__pyx_t_5) { + __pyx_t_6 = ((__pyx_v_flagint & 0x0001) != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1450 + /* "HTSeq/_HTSeq.pyx":1462 * * if flagint & 0x0001: # flag "read is paired in sequencing" * if flagint & 0x0008: # flag "mate is unmapped" # <<<<<<<<<<<<<< * alnmt.mate_start = None * else: */ - __pyx_t_5 = ((__pyx_v_flagint & 0x0008) != 0); - if (__pyx_t_5) { + __pyx_t_6 = ((__pyx_v_flagint & 0x0008) != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1451 + /* "HTSeq/_HTSeq.pyx":1463 * if flagint & 0x0001: # flag "read is paired in sequencing" * if flagint & 0x0008: # flag "mate is unmapped" * alnmt.mate_start = None # <<<<<<<<<<<<<< @@ -35017,7 +34517,7 @@ __Pyx_DECREF(((PyObject *)__pyx_v_alnmt->mate_start)); __pyx_v_alnmt->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)Py_None); - /* "HTSeq/_HTSeq.pyx":1450 + /* "HTSeq/_HTSeq.pyx":1462 * * if flagint & 0x0001: # flag "read is paired in sequencing" * if flagint & 0x0008: # flag "mate is unmapped" # <<<<<<<<<<<<<< @@ -35027,7 +34527,7 @@ goto __pyx_L19; } - /* "HTSeq/_HTSeq.pyx":1453 + /* "HTSeq/_HTSeq.pyx":1465 * alnmt.mate_start = None * else: * if mrnm == "*": # <<<<<<<<<<<<<< @@ -35035,11 +34535,11 @@ * posint = int(mpos) - 1 */ /*else*/ { - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_v_mrnm, __pyx_kp_u__41, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1453, __pyx_L1_error) - __pyx_t_18 = (__pyx_t_5 != 0); + __pyx_t_6 = (__Pyx_PyUnicode_Equals(__pyx_v_mrnm, __pyx_kp_u__34, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_18 = (__pyx_t_6 != 0); if (unlikely(__pyx_t_18)) { - /* "HTSeq/_HTSeq.pyx":1454 + /* "HTSeq/_HTSeq.pyx":1466 * else: * if mrnm == "*": * raise ValueError, "Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared" # <<<<<<<<<<<<<< @@ -35047,9 +34547,9 @@ * if flagint & 0x0020: # flag "strand of the mate" */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_Malformed_SAM_line_MRNM_although, 0, 0); - __PYX_ERR(0, 1454, __pyx_L1_error) + __PYX_ERR(0, 1466, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1453 + /* "HTSeq/_HTSeq.pyx":1465 * alnmt.mate_start = None * else: * if mrnm == "*": # <<<<<<<<<<<<<< @@ -35058,23 +34558,23 @@ */ } - /* "HTSeq/_HTSeq.pyx":1455 + /* "HTSeq/_HTSeq.pyx":1467 * if mrnm == "*": * raise ValueError, "Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared" * posint = int(mpos) - 1 # <<<<<<<<<<<<<< * if flagint & 0x0020: # flag "strand of the mate" * strand = "-" */ - __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_mpos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyNumber_Int(__pyx_v_mpos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_14 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_SubtractObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1467, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1455, __pyx_L1_error) + __pyx_t_17 = __Pyx_PyInt_As_int(__pyx_t_14); if (unlikely((__pyx_t_17 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1467, __pyx_L1_error) __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_v_posint = __pyx_t_17; - /* "HTSeq/_HTSeq.pyx":1456 + /* "HTSeq/_HTSeq.pyx":1468 * raise ValueError, "Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared" * posint = int(mpos) - 1 * if flagint & 0x0020: # flag "strand of the mate" # <<<<<<<<<<<<<< @@ -35084,7 +34584,7 @@ __pyx_t_18 = ((__pyx_v_flagint & 0x0020) != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1457 + /* "HTSeq/_HTSeq.pyx":1469 * posint = int(mpos) - 1 * if flagint & 0x0020: # flag "strand of the mate" * strand = "-" # <<<<<<<<<<<<<< @@ -35094,7 +34594,7 @@ __Pyx_INCREF(__pyx_kp_u__20); __Pyx_XDECREF_SET(__pyx_v_strand, __pyx_kp_u__20); - /* "HTSeq/_HTSeq.pyx":1456 + /* "HTSeq/_HTSeq.pyx":1468 * raise ValueError, "Malformed SAM line: MRNM == '*' although flag bit &0x0008 cleared" * posint = int(mpos) - 1 * if flagint & 0x0020: # flag "strand of the mate" # <<<<<<<<<<<<<< @@ -35104,7 +34604,7 @@ goto __pyx_L21; } - /* "HTSeq/_HTSeq.pyx":1459 + /* "HTSeq/_HTSeq.pyx":1471 * strand = "-" * else: * strand = "+" # <<<<<<<<<<<<<< @@ -35117,16 +34617,16 @@ } __pyx_L21:; - /* "HTSeq/_HTSeq.pyx":1460 + /* "HTSeq/_HTSeq.pyx":1472 * else: * strand = "+" * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) # <<<<<<<<<<<<<< * if alnmt.mate_start.chrom == "=": * if alnmt.iv is not None: */ - __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_posint); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyInt_From_int(__pyx_v_posint); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_mrnm); __Pyx_GIVEREF(__pyx_v_mrnm); @@ -35137,7 +34637,7 @@ __Pyx_GIVEREF(__pyx_v_strand); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_strand); __pyx_t_14 = 0; - __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_1, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1460, __pyx_L1_error) + __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_t_1, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1472, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_14); @@ -35146,29 +34646,29 @@ __pyx_v_alnmt->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1461 + /* "HTSeq/_HTSeq.pyx":1473 * strand = "+" * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) * if alnmt.mate_start.chrom == "=": # <<<<<<<<<<<<<< * if alnmt.iv is not None: * alnmt.mate_start.chrom = alnmt.iv.chrom */ - __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_v_alnmt->mate_start->__pyx_base.chrom, __pyx_kp_u__38, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1461, __pyx_L1_error) - __pyx_t_5 = (__pyx_t_18 != 0); - if (__pyx_t_5) { + __pyx_t_18 = (__Pyx_PyUnicode_Equals(__pyx_v_alnmt->mate_start->__pyx_base.chrom, __pyx_kp_u__33, Py_EQ)); if (unlikely(__pyx_t_18 < 0)) __PYX_ERR(0, 1473, __pyx_L1_error) + __pyx_t_6 = (__pyx_t_18 != 0); + if (__pyx_t_6) { - /* "HTSeq/_HTSeq.pyx":1462 + /* "HTSeq/_HTSeq.pyx":1474 * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) * if alnmt.mate_start.chrom == "=": * if alnmt.iv is not None: # <<<<<<<<<<<<<< * alnmt.mate_start.chrom = alnmt.iv.chrom * if flagint & 0x0040: */ - __pyx_t_5 = (((PyObject *)__pyx_v_alnmt->__pyx_base.__pyx_base.iv) != Py_None); - __pyx_t_18 = (__pyx_t_5 != 0); + __pyx_t_6 = (((PyObject *)__pyx_v_alnmt->__pyx_base.__pyx_base.iv) != Py_None); + __pyx_t_18 = (__pyx_t_6 != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1463 + /* "HTSeq/_HTSeq.pyx":1475 * if alnmt.mate_start.chrom == "=": * if alnmt.iv is not None: * alnmt.mate_start.chrom = alnmt.iv.chrom # <<<<<<<<<<<<<< @@ -35183,7 +34683,7 @@ __pyx_v_alnmt->mate_start->__pyx_base.chrom = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1462 + /* "HTSeq/_HTSeq.pyx":1474 * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) * if alnmt.mate_start.chrom == "=": * if alnmt.iv is not None: # <<<<<<<<<<<<<< @@ -35192,7 +34692,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1461 + /* "HTSeq/_HTSeq.pyx":1473 * strand = "+" * alnmt.mate_start = GenomicPosition(mrnm, posint, strand) * if alnmt.mate_start.chrom == "=": # <<<<<<<<<<<<<< @@ -35203,7 +34703,7 @@ } __pyx_L19:; - /* "HTSeq/_HTSeq.pyx":1464 + /* "HTSeq/_HTSeq.pyx":1476 * if alnmt.iv is not None: * alnmt.mate_start.chrom = alnmt.iv.chrom * if flagint & 0x0040: # <<<<<<<<<<<<<< @@ -35213,23 +34713,23 @@ __pyx_t_18 = ((__pyx_v_flagint & 0x0040) != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1465 + /* "HTSeq/_HTSeq.pyx":1477 * alnmt.mate_start.chrom = alnmt.iv.chrom * if flagint & 0x0040: * alnmt.pe_which = intern("first") # <<<<<<<<<<<<<< * elif flagint & 0x0080: * alnmt.pe_which = intern("second") */ - __pyx_t_14 = __Pyx_Intern(__pyx_n_u_first); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1465, __pyx_L1_error) + __pyx_t_14 = __Pyx_Intern(__pyx_n_u_first); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1477, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1465, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1477, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_14); __Pyx_GOTREF(__pyx_v_alnmt->pe_which); __Pyx_DECREF(__pyx_v_alnmt->pe_which); __pyx_v_alnmt->pe_which = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1464 + /* "HTSeq/_HTSeq.pyx":1476 * if alnmt.iv is not None: * alnmt.mate_start.chrom = alnmt.iv.chrom * if flagint & 0x0040: # <<<<<<<<<<<<<< @@ -35239,7 +34739,7 @@ goto __pyx_L24; } - /* "HTSeq/_HTSeq.pyx":1466 + /* "HTSeq/_HTSeq.pyx":1478 * if flagint & 0x0040: * alnmt.pe_which = intern("first") * elif flagint & 0x0080: # <<<<<<<<<<<<<< @@ -35249,23 +34749,23 @@ __pyx_t_18 = ((__pyx_v_flagint & 0x0080) != 0); if (__pyx_t_18) { - /* "HTSeq/_HTSeq.pyx":1467 + /* "HTSeq/_HTSeq.pyx":1479 * alnmt.pe_which = intern("first") * elif flagint & 0x0080: * alnmt.pe_which = intern("second") # <<<<<<<<<<<<<< * else: * alnmt.pe_which = intern("unknown") */ - __pyx_t_14 = __Pyx_Intern(__pyx_n_u_second); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1467, __pyx_L1_error) + __pyx_t_14 = __Pyx_Intern(__pyx_n_u_second); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1467, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1479, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_14); __Pyx_GOTREF(__pyx_v_alnmt->pe_which); __Pyx_DECREF(__pyx_v_alnmt->pe_which); __pyx_v_alnmt->pe_which = ((PyObject*)__pyx_t_14); __pyx_t_14 = 0; - /* "HTSeq/_HTSeq.pyx":1466 + /* "HTSeq/_HTSeq.pyx":1478 * if flagint & 0x0040: * alnmt.pe_which = intern("first") * elif flagint & 0x0080: # <<<<<<<<<<<<<< @@ -35275,7 +34775,7 @@ goto __pyx_L24; } - /* "HTSeq/_HTSeq.pyx":1469 + /* "HTSeq/_HTSeq.pyx":1481 * alnmt.pe_which = intern("second") * else: * alnmt.pe_which = intern("unknown") # <<<<<<<<<<<<<< @@ -35283,9 +34783,9 @@ * alnmt.mate_start = None */ /*else*/ { - __pyx_t_14 = __Pyx_Intern(__pyx_n_u_unknown); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1469, __pyx_L1_error) + __pyx_t_14 = __Pyx_Intern(__pyx_n_u_unknown); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1469, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1481, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_14); __Pyx_GOTREF(__pyx_v_alnmt->pe_which); __Pyx_DECREF(__pyx_v_alnmt->pe_which); @@ -35294,7 +34794,7 @@ } __pyx_L24:; - /* "HTSeq/_HTSeq.pyx":1449 + /* "HTSeq/_HTSeq.pyx":1461 * alnmt.original_sam_line = line * * if flagint & 0x0001: # flag "read is paired in sequencing" # <<<<<<<<<<<<<< @@ -35304,7 +34804,7 @@ goto __pyx_L18; } - /* "HTSeq/_HTSeq.pyx":1471 + /* "HTSeq/_HTSeq.pyx":1483 * alnmt.pe_which = intern("unknown") * else: * alnmt.mate_start = None # <<<<<<<<<<<<<< @@ -35318,16 +34818,16 @@ __Pyx_DECREF(((PyObject *)__pyx_v_alnmt->mate_start)); __pyx_v_alnmt->mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicPosition *)Py_None); - /* "HTSeq/_HTSeq.pyx":1472 + /* "HTSeq/_HTSeq.pyx":1484 * else: * alnmt.mate_start = None * alnmt.pe_which = intern("not_paired_end") # <<<<<<<<<<<<<< * * alnmt.proper_pair = flagint & 0x0002 > 0 */ - __pyx_t_14 = __Pyx_Intern(__pyx_n_u_not_paired_end); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1472, __pyx_L1_error) + __pyx_t_14 = __Pyx_Intern(__pyx_n_u_not_paired_end); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1484, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_14); - if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1472, __pyx_L1_error) + if (!(likely(PyUnicode_CheckExact(__pyx_t_14))||((__pyx_t_14) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_14)->tp_name), 0))) __PYX_ERR(0, 1484, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_14); __Pyx_GOTREF(__pyx_v_alnmt->pe_which); __Pyx_DECREF(__pyx_v_alnmt->pe_which); @@ -35336,7 +34836,7 @@ } __pyx_L18:; - /* "HTSeq/_HTSeq.pyx":1474 + /* "HTSeq/_HTSeq.pyx":1486 * alnmt.pe_which = intern("not_paired_end") * * alnmt.proper_pair = flagint & 0x0002 > 0 # <<<<<<<<<<<<<< @@ -35345,7 +34845,7 @@ */ __pyx_v_alnmt->proper_pair = ((__pyx_v_flagint & 0x0002) > 0); - /* "HTSeq/_HTSeq.pyx":1475 + /* "HTSeq/_HTSeq.pyx":1487 * * alnmt.proper_pair = flagint & 0x0002 > 0 * alnmt.not_primary_alignment = flagint & 0x0100 > 0 # <<<<<<<<<<<<<< @@ -35354,7 +34854,7 @@ */ __pyx_v_alnmt->not_primary_alignment = ((__pyx_v_flagint & 0x0100) > 0); - /* "HTSeq/_HTSeq.pyx":1476 + /* "HTSeq/_HTSeq.pyx":1488 * alnmt.proper_pair = flagint & 0x0002 > 0 * alnmt.not_primary_alignment = flagint & 0x0100 > 0 * alnmt.failed_platform_qc = flagint & 0x0200 > 0 # <<<<<<<<<<<<<< @@ -35363,7 +34863,7 @@ */ __pyx_v_alnmt->failed_platform_qc = ((__pyx_v_flagint & 0x0200) > 0); - /* "HTSeq/_HTSeq.pyx":1477 + /* "HTSeq/_HTSeq.pyx":1489 * alnmt.not_primary_alignment = flagint & 0x0100 > 0 * alnmt.failed_platform_qc = flagint & 0x0200 > 0 * alnmt.pcr_or_optical_duplicate = flagint & 0x0400 > 0 # <<<<<<<<<<<<<< @@ -35372,7 +34872,7 @@ */ __pyx_v_alnmt->pcr_or_optical_duplicate = ((__pyx_v_flagint & 0x0400) > 0); - /* "HTSeq/_HTSeq.pyx":1478 + /* "HTSeq/_HTSeq.pyx":1490 * alnmt.failed_platform_qc = flagint & 0x0200 > 0 * alnmt.pcr_or_optical_duplicate = flagint & 0x0400 > 0 * alnmt.supplementary = flagint & 0x0800 > 0 # <<<<<<<<<<<<<< @@ -35381,7 +34881,7 @@ */ __pyx_v_alnmt->supplementary = ((__pyx_v_flagint & 0x0800) > 0); - /* "HTSeq/_HTSeq.pyx":1480 + /* "HTSeq/_HTSeq.pyx":1492 * alnmt.supplementary = flagint & 0x0800 > 0 * * return alnmt # <<<<<<<<<<<<<< @@ -35393,7 +34893,7 @@ __pyx_r = ((PyObject *)__pyx_v_alnmt); goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1395 + /* "HTSeq/_HTSeq.pyx":1407 * * @classmethod * def from_SAM_line(cls, line): # <<<<<<<<<<<<<< @@ -35406,7 +34906,7 @@ __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); @@ -35443,7 +34943,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1483 +/* "HTSeq/_HTSeq.pyx":1495 * * property flag: * def __get__(self): # <<<<<<<<<<<<<< @@ -35470,7 +34970,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1484 + /* "HTSeq/_HTSeq.pyx":1496 * property flag: * def __get__(self): * return self._flag # <<<<<<<<<<<<<< @@ -35478,13 +34978,13 @@ * def __set__(self, value): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1484, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1496, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1483 + /* "HTSeq/_HTSeq.pyx":1495 * * property flag: * def __get__(self): # <<<<<<<<<<<<<< @@ -35503,7 +35003,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1486 +/* "HTSeq/_HTSeq.pyx":1498 * return self._flag * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -35530,17 +35030,17 @@ int __pyx_t_1; __Pyx_RefNannySetupContext("__set__", 0); - /* "HTSeq/_HTSeq.pyx":1487 + /* "HTSeq/_HTSeq.pyx":1499 * * def __set__(self, value): * self._flag = value # <<<<<<<<<<<<<< * * @property */ - __pyx_t_1 = __Pyx_PyInt_As_int(__pyx_v_value); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 1487, __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, 1499, __pyx_L1_error) __pyx_v_self->_flag = __pyx_t_1; - /* "HTSeq/_HTSeq.pyx":1486 + /* "HTSeq/_HTSeq.pyx":1498 * return self._flag * * def __set__(self, value): # <<<<<<<<<<<<<< @@ -35559,7 +35059,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1490 +/* "HTSeq/_HTSeq.pyx":1502 * * @property * def paired_end(self): # <<<<<<<<<<<<<< @@ -35587,7 +35087,7 @@ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1491 + /* "HTSeq/_HTSeq.pyx":1503 * @property * def paired_end(self): * return self.pe_which != "not_paired_end" # <<<<<<<<<<<<<< @@ -35595,14 +35095,14 @@ * @property */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->pe_which, __pyx_n_u_not_paired_end, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1491, __pyx_L1_error) - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1491, __pyx_L1_error) + __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_self->pe_which, __pyx_n_u_not_paired_end, Py_NE)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1503, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1503, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1490 + /* "HTSeq/_HTSeq.pyx":1502 * * @property * def paired_end(self): # <<<<<<<<<<<<<< @@ -35621,7 +35121,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1494 +/* "HTSeq/_HTSeq.pyx":1506 * * @property * def mate_aligned(self): # <<<<<<<<<<<<<< @@ -35649,7 +35149,7 @@ PyObject *__pyx_t_2 = NULL; __Pyx_RefNannySetupContext("__get__", 0); - /* "HTSeq/_HTSeq.pyx":1495 + /* "HTSeq/_HTSeq.pyx":1507 * @property * def mate_aligned(self): * return self.mate_start is not None # <<<<<<<<<<<<<< @@ -35658,13 +35158,13 @@ */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = (((PyObject *)__pyx_v_self->mate_start) != Py_None); - __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1495, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1507, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1494 + /* "HTSeq/_HTSeq.pyx":1506 * * @property * def mate_aligned(self): # <<<<<<<<<<<<<< @@ -35683,7 +35183,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1497 +/* "HTSeq/_HTSeq.pyx":1509 * return self.mate_start is not None * * def get_sam_line(self): # <<<<<<<<<<<<<< @@ -35727,7 +35227,7 @@ PyObject *__pyx_t_14 = NULL; __Pyx_RefNannySetupContext("get_sam_line", 0); - /* "HTSeq/_HTSeq.pyx":1498 + /* "HTSeq/_HTSeq.pyx":1510 * * def get_sam_line(self): * cdef str cigar = "" # <<<<<<<<<<<<<< @@ -35737,20 +35237,20 @@ __Pyx_INCREF(__pyx_kp_u__12); __pyx_v_cigar = __pyx_kp_u__12; - /* "HTSeq/_HTSeq.pyx":1502 + /* "HTSeq/_HTSeq.pyx":1514 * cdef CigarOperation cop * * if self.aligned: # <<<<<<<<<<<<<< * query_start = self.iv * else: */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1502, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_aligned); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1514, __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, 1502, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1514, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1503 + /* "HTSeq/_HTSeq.pyx":1515 * * if self.aligned: * query_start = self.iv # <<<<<<<<<<<<<< @@ -35762,7 +35262,7 @@ __pyx_v_query_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1502 + /* "HTSeq/_HTSeq.pyx":1514 * cdef CigarOperation cop * * if self.aligned: # <<<<<<<<<<<<<< @@ -35772,7 +35272,7 @@ goto __pyx_L3; } - /* "HTSeq/_HTSeq.pyx":1505 + /* "HTSeq/_HTSeq.pyx":1517 * query_start = self.iv * else: * query_start = GenomicPosition("*", -1) # <<<<<<<<<<<<<< @@ -35780,14 +35280,14 @@ * if self.mate_start is not None: */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1505, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1517, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_query_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; } __pyx_L3:; - /* "HTSeq/_HTSeq.pyx":1507 + /* "HTSeq/_HTSeq.pyx":1519 * query_start = GenomicPosition("*", -1) * * if self.mate_start is not None: # <<<<<<<<<<<<<< @@ -35798,7 +35298,7 @@ __pyx_t_3 = (__pyx_t_2 != 0); if (__pyx_t_3) { - /* "HTSeq/_HTSeq.pyx":1508 + /* "HTSeq/_HTSeq.pyx":1520 * * if self.mate_start is not None: * mate_start = self.mate_start # <<<<<<<<<<<<<< @@ -35810,7 +35310,7 @@ __pyx_v_mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1507 + /* "HTSeq/_HTSeq.pyx":1519 * query_start = GenomicPosition("*", -1) * * if self.mate_start is not None: # <<<<<<<<<<<<<< @@ -35820,7 +35320,7 @@ goto __pyx_L4; } - /* "HTSeq/_HTSeq.pyx":1510 + /* "HTSeq/_HTSeq.pyx":1522 * mate_start = self.mate_start * else: * mate_start = GenomicPosition("*", -1) # <<<<<<<<<<<<<< @@ -35828,14 +35328,14 @@ * if self.cigar is not None: */ /*else*/ { - __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1510, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition), __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_mate_start = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; } __pyx_L4:; - /* "HTSeq/_HTSeq.pyx":1512 + /* "HTSeq/_HTSeq.pyx":1524 * mate_start = GenomicPosition("*", -1) * * if self.cigar is not None: # <<<<<<<<<<<<<< @@ -35846,7 +35346,7 @@ __pyx_t_2 = (__pyx_t_3 != 0); if (__pyx_t_2) { - /* "HTSeq/_HTSeq.pyx":1513 + /* "HTSeq/_HTSeq.pyx":1525 * * if self.cigar is not None: * for cop in self.cigar: # <<<<<<<<<<<<<< @@ -35855,43 +35355,43 @@ */ if (unlikely(__pyx_v_self->cigar == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1513, __pyx_L1_error) + __PYX_ERR(0, 1525, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->cigar; __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_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1513, __pyx_L1_error) + __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_5); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1525, __pyx_L1_error) #else - __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1513, __pyx_L1_error) + __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); #endif - if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5HTSeq_6_HTSeq_CigarOperation))))) __PYX_ERR(0, 1513, __pyx_L1_error) + if (!(likely(((__pyx_t_5) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_5, __pyx_ptype_5HTSeq_6_HTSeq_CigarOperation))))) __PYX_ERR(0, 1525, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_cop, ((struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *)__pyx_t_5)); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1514 + /* "HTSeq/_HTSeq.pyx":1526 * if self.cigar is not None: * for cop in self.cigar: * cigar += str(cop.size) + cop.type # <<<<<<<<<<<<<< * else: * cigar = "*" */ - __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_cop->size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_cop->size); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_6, __pyx_v_cop->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyUnicode_ConcatSafe(__pyx_t_6, __pyx_v_cop->type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_v_cigar, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1514, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyUnicode_Concat(__pyx_v_cigar, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1526, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __Pyx_DECREF_SET(__pyx_v_cigar, ((PyObject*)__pyx_t_6)); __pyx_t_6 = 0; - /* "HTSeq/_HTSeq.pyx":1513 + /* "HTSeq/_HTSeq.pyx":1525 * * if self.cigar is not None: * for cop in self.cigar: # <<<<<<<<<<<<<< @@ -35901,7 +35401,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1512 + /* "HTSeq/_HTSeq.pyx":1524 * mate_start = GenomicPosition("*", -1) * * if self.cigar is not None: # <<<<<<<<<<<<<< @@ -35911,7 +35411,7 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":1516 + /* "HTSeq/_HTSeq.pyx":1528 * cigar += str(cop.size) + cop.type * else: * cigar = "*" # <<<<<<<<<<<<<< @@ -35919,12 +35419,12 @@ * return '\t'.join( */ /*else*/ { - __Pyx_INCREF(__pyx_kp_u__41); - __Pyx_DECREF_SET(__pyx_v_cigar, __pyx_kp_u__41); + __Pyx_INCREF(__pyx_kp_u__34); + __Pyx_DECREF_SET(__pyx_v_cigar, __pyx_kp_u__34); } __pyx_L5:; - /* "HTSeq/_HTSeq.pyx":1518 + /* "HTSeq/_HTSeq.pyx":1530 * cigar = "*" * * return '\t'.join( # <<<<<<<<<<<<<< @@ -35933,88 +35433,88 @@ */ __Pyx_XDECREF(__pyx_r); - /* "HTSeq/_HTSeq.pyx":1519 + /* "HTSeq/_HTSeq.pyx":1531 * * return '\t'.join( * (self.read.name, # <<<<<<<<<<<<<< * str(self.flag), * query_start.chrom, */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_read); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1520 + /* "HTSeq/_HTSeq.pyx":1532 * return '\t'.join( * (self.read.name, * str(self.flag), # <<<<<<<<<<<<<< * query_start.chrom, * str(query_start.start + 1), */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1520, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1532, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1522 + /* "HTSeq/_HTSeq.pyx":1534 * str(self.flag), * query_start.chrom, * str(query_start.start + 1), # <<<<<<<<<<<<<< * str(self.aQual), * cigar, */ - __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_query_start->start + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_long((__pyx_v_query_start->start + 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1522, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1534, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1523 + /* "HTSeq/_HTSeq.pyx":1535 * query_start.chrom, * str(query_start.start + 1), * str(self.aQual), # <<<<<<<<<<<<<< * cigar, * mate_start.chrom, */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1523, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1535, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1526 + /* "HTSeq/_HTSeq.pyx":1538 * cigar, * mate_start.chrom, * str(mate_start.pos + 1), # <<<<<<<<<<<<<< * str(self.inferred_insert_size), * self.read_as_aligned.seq.decode(), */ - __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mate_start), __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_mate_start), __pyx_n_s_pos); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1526, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1538, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "HTSeq/_HTSeq.pyx":1527 + /* "HTSeq/_HTSeq.pyx":1539 * mate_start.chrom, * str(mate_start.pos + 1), * str(self.inferred_insert_size), # <<<<<<<<<<<<<< * self.read_as_aligned.seq.decode(), * self.read_as_aligned.qualstr.decode(), */ - __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1527, __pyx_L1_error) + __pyx_t_9 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1527, __pyx_L1_error) + __pyx_t_10 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1539, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - /* "HTSeq/_HTSeq.pyx":1528 + /* "HTSeq/_HTSeq.pyx":1540 * str(mate_start.pos + 1), * str(self.inferred_insert_size), * self.read_as_aligned.seq.decode(), # <<<<<<<<<<<<<< @@ -36023,21 +35523,21 @@ */ if (unlikely(__pyx_v_self->__pyx_base.read_as_aligned->__pyx_base.seq == Py_None)) { PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%.30s'", "decode"); - __PYX_ERR(0, 1528, __pyx_L1_error) + __PYX_ERR(0, 1540, __pyx_L1_error) } - __pyx_t_9 = __Pyx_decode_bytes(__pyx_v_self->__pyx_base.read_as_aligned->__pyx_base.seq, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1528, __pyx_L1_error) + __pyx_t_9 = __Pyx_decode_bytes(__pyx_v_self->__pyx_base.read_as_aligned->__pyx_base.seq, 0, PY_SSIZE_T_MAX, NULL, NULL, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1540, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); - /* "HTSeq/_HTSeq.pyx":1529 + /* "HTSeq/_HTSeq.pyx":1541 * str(self.inferred_insert_size), * self.read_as_aligned.seq.decode(), * self.read_as_aligned.qualstr.decode(), # <<<<<<<<<<<<<< * '\t'.join(self.raw_optional_fields()))) * */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.read_as_aligned), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1529, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self->__pyx_base.read_as_aligned), __pyx_n_s_qualstr); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); - __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_decode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1529, __pyx_L1_error) + __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_decode); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; __pyx_t_12 = NULL; @@ -36050,23 +35550,20 @@ __Pyx_DECREF_SET(__pyx_t_13, function); } } - if (__pyx_t_12) { - __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1529, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - } else { - __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_13); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1529, __pyx_L1_error) - } + __pyx_t_11 = (__pyx_t_12) ? __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_12) : __Pyx_PyObject_CallNoArg(__pyx_t_13); + __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0; + if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1541, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_11); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1530 + /* "HTSeq/_HTSeq.pyx":1542 * self.read_as_aligned.seq.decode(), * self.read_as_aligned.qualstr.decode(), * '\t'.join(self.raw_optional_fields()))) # <<<<<<<<<<<<<< * * def optional_field(SAM_Alignment self, str tag): */ - __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw_optional_fields); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_12 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_raw_optional_fields); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __pyx_t_14 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) { @@ -36078,26 +35575,23 @@ __Pyx_DECREF_SET(__pyx_t_12, function); } } - if (__pyx_t_14) { - __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1530, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; - } else { - __pyx_t_13 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1530, __pyx_L1_error) - } + __pyx_t_13 = (__pyx_t_14) ? __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_14) : __Pyx_PyObject_CallNoArg(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0; + if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyUnicode_Join(__pyx_kp_u__22, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1530, __pyx_L1_error) + __pyx_t_12 = PyUnicode_Join(__pyx_kp_u__21, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1542, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; - /* "HTSeq/_HTSeq.pyx":1519 + /* "HTSeq/_HTSeq.pyx":1531 * * return '\t'.join( * (self.read.name, # <<<<<<<<<<<<<< * str(self.flag), * query_start.chrom, */ - __pyx_t_13 = PyTuple_New(12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1519, __pyx_L1_error) + __pyx_t_13 = PyTuple_New(12); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 1531, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_13); __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_6); @@ -36136,21 +35630,21 @@ __pyx_t_11 = 0; __pyx_t_12 = 0; - /* "HTSeq/_HTSeq.pyx":1518 + /* "HTSeq/_HTSeq.pyx":1530 * cigar = "*" * * return '\t'.join( # <<<<<<<<<<<<<< * (self.read.name, * str(self.flag), */ - __pyx_t_12 = PyUnicode_Join(__pyx_kp_u__22, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1518, __pyx_L1_error) + __pyx_t_12 = PyUnicode_Join(__pyx_kp_u__21, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 1530, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_12); __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __pyx_r = __pyx_t_12; __pyx_t_12 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1497 + /* "HTSeq/_HTSeq.pyx":1509 * return self.mate_start is not None * * def get_sam_line(self): # <<<<<<<<<<<<<< @@ -36183,7 +35677,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1532 +/* "HTSeq/_HTSeq.pyx":1544 * '\t'.join(self.raw_optional_fields()))) * * def optional_field(SAM_Alignment self, str tag): # <<<<<<<<<<<<<< @@ -36197,7 +35691,7 @@ PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("optional_field (wrapper)", 0); - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), (&PyUnicode_Type), 1, "tag", 1))) __PYX_ERR(0, 1532, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_tag), (&PyUnicode_Type), 1, "tag", 1))) __PYX_ERR(0, 1544, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_13SAM_Alignment_12optional_field(((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_v_self), ((PyObject*)__pyx_v_tag)); /* function exit code */ @@ -36221,7 +35715,7 @@ int __pyx_t_5; __Pyx_RefNannySetupContext("optional_field", 0); - /* "HTSeq/_HTSeq.pyx":1533 + /* "HTSeq/_HTSeq.pyx":1545 * * def optional_field(SAM_Alignment self, str tag): * res = [p for p in self.optional_fields if p[0] == tag] # <<<<<<<<<<<<<< @@ -36229,29 +35723,29 @@ * return res[0][1] */ { /* enter inner scope */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1533, __pyx_L5_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1545, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_1); if (unlikely(__pyx_v_self->optional_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1533, __pyx_L5_error) + __PYX_ERR(0, 1545, __pyx_L5_error) } __pyx_t_2 = __pyx_v_self->optional_fields; __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, 1533, __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, 1545, __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, 1533, __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, 1545, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); #endif __Pyx_XDECREF_SET(__pyx_8genexpr7__pyx_v_p, __pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr7__pyx_v_p, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1533, __pyx_L5_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_8genexpr7__pyx_v_p, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L5_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_v_tag, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1533, __pyx_L5_error) + __pyx_t_5 = (__Pyx_PyUnicode_Equals(__pyx_t_4, __pyx_v_tag, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1545, __pyx_L5_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_5) { - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr7__pyx_v_p))) __PYX_ERR(0, 1533, __pyx_L5_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_8genexpr7__pyx_v_p))) __PYX_ERR(0, 1545, __pyx_L5_error) } } __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -36265,18 +35759,18 @@ __pyx_v_res = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1534 + /* "HTSeq/_HTSeq.pyx":1546 * def optional_field(SAM_Alignment self, str tag): * res = [p for p in self.optional_fields if p[0] == tag] * if len(res) == 1: # <<<<<<<<<<<<<< * return res[0][1] * else: */ - __pyx_t_3 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1534, __pyx_L1_error) + __pyx_t_3 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1546, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_3 == 1) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1535 + /* "HTSeq/_HTSeq.pyx":1547 * res = [p for p in self.optional_fields if p[0] == tag] * if len(res) == 1: * return res[0][1] # <<<<<<<<<<<<<< @@ -36284,16 +35778,16 @@ * if len(res) == 0: */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_res, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1535, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_res, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1547, __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, 1535, __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, 1547, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1534 + /* "HTSeq/_HTSeq.pyx":1546 * def optional_field(SAM_Alignment self, str tag): * res = [p for p in self.optional_fields if p[0] == tag] * if len(res) == 1: # <<<<<<<<<<<<<< @@ -36302,7 +35796,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1537 + /* "HTSeq/_HTSeq.pyx":1549 * return res[0][1] * else: * if len(res) == 0: # <<<<<<<<<<<<<< @@ -36310,24 +35804,24 @@ * else: */ /*else*/ { - __pyx_t_3 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1537, __pyx_L1_error) + __pyx_t_3 = PyList_GET_SIZE(__pyx_v_res); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1549, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_3 == 0) != 0); if (unlikely(__pyx_t_5)) { - /* "HTSeq/_HTSeq.pyx":1538 + /* "HTSeq/_HTSeq.pyx":1550 * else: * if len(res) == 0: * raise KeyError, "SAM optional field tag %s not found" % tag # <<<<<<<<<<<<<< * else: * raise ValueError, "SAM optional field tag %s not unique" % tag */ - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_SAM_optional_field_tag_s_not_fou, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1538, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_SAM_optional_field_tag_s_not_fou, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1550, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_builtin_KeyError, __pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1538, __pyx_L1_error) + __PYX_ERR(0, 1550, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1537 + /* "HTSeq/_HTSeq.pyx":1549 * return res[0][1] * else: * if len(res) == 0: # <<<<<<<<<<<<<< @@ -36336,7 +35830,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1540 + /* "HTSeq/_HTSeq.pyx":1552 * raise KeyError, "SAM optional field tag %s not found" % tag * else: * raise ValueError, "SAM optional field tag %s not unique" % tag # <<<<<<<<<<<<<< @@ -36344,15 +35838,15 @@ * def raw_optional_fields(self): */ /*else*/ { - __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_SAM_optional_field_tag_s_not_uni, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1540, __pyx_L1_error) + __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_SAM_optional_field_tag_s_not_uni, __pyx_v_tag); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1552, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_2, 0, 0); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __PYX_ERR(0, 1540, __pyx_L1_error) + __PYX_ERR(0, 1552, __pyx_L1_error) } } - /* "HTSeq/_HTSeq.pyx":1532 + /* "HTSeq/_HTSeq.pyx":1544 * '\t'.join(self.raw_optional_fields()))) * * def optional_field(SAM_Alignment self, str tag): # <<<<<<<<<<<<<< @@ -36375,7 +35869,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1542 +/* "HTSeq/_HTSeq.pyx":1554 * raise ValueError, "SAM optional field tag %s not unique" % tag * * def raw_optional_fields(self): # <<<<<<<<<<<<<< @@ -36412,19 +35906,19 @@ int __pyx_t_8; __Pyx_RefNannySetupContext("raw_optional_fields", 0); - /* "HTSeq/_HTSeq.pyx":1543 + /* "HTSeq/_HTSeq.pyx":1555 * * def raw_optional_fields(self): * res = [] # <<<<<<<<<<<<<< * for op in self.optional_fields: * if op[1].__class__ == str: */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1543, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1555, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_res = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1544 + /* "HTSeq/_HTSeq.pyx":1556 * def raw_optional_fields(self): * res = [] * for op in self.optional_fields: # <<<<<<<<<<<<<< @@ -36433,53 +35927,53 @@ */ if (unlikely(__pyx_v_self->optional_fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(0, 1544, __pyx_L1_error) + __PYX_ERR(0, 1556, __pyx_L1_error) } __pyx_t_1 = __pyx_v_self->optional_fields; __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, 1544, __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, 1556, __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, 1544, __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, 1556, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_op, __pyx_t_3); __pyx_t_3 = 0; - /* "HTSeq/_HTSeq.pyx":1545 + /* "HTSeq/_HTSeq.pyx":1557 * res = [] * for op in self.optional_fields: * if op[1].__class__ == str: # <<<<<<<<<<<<<< * if len(op[1]) == 1: * tc = "A" */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyUnicode_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1545, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1557, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1546 + /* "HTSeq/_HTSeq.pyx":1558 * for op in self.optional_fields: * if op[1].__class__ == str: * if len(op[1]) == 1: # <<<<<<<<<<<<<< * tc = "A" * else: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, 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_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1546, __pyx_L1_error) + __pyx_t_6 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1558, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_5 = ((__pyx_t_6 == 1) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1547 + /* "HTSeq/_HTSeq.pyx":1559 * if op[1].__class__ == str: * if len(op[1]) == 1: * tc = "A" # <<<<<<<<<<<<<< @@ -36489,7 +35983,7 @@ __Pyx_INCREF(__pyx_n_u_A); __Pyx_XDECREF_SET(__pyx_v_tc, __pyx_n_u_A); - /* "HTSeq/_HTSeq.pyx":1546 + /* "HTSeq/_HTSeq.pyx":1558 * for op in self.optional_fields: * if op[1].__class__ == str: * if len(op[1]) == 1: # <<<<<<<<<<<<<< @@ -36499,7 +35993,7 @@ goto __pyx_L6; } - /* "HTSeq/_HTSeq.pyx":1549 + /* "HTSeq/_HTSeq.pyx":1561 * tc = "A" * else: * tc = "Z" # <<<<<<<<<<<<<< @@ -36512,7 +36006,7 @@ } __pyx_L6:; - /* "HTSeq/_HTSeq.pyx":1545 + /* "HTSeq/_HTSeq.pyx":1557 * res = [] * for op in self.optional_fields: * if op[1].__class__ == str: # <<<<<<<<<<<<<< @@ -36522,25 +36016,25 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":1550 + /* "HTSeq/_HTSeq.pyx":1562 * else: * tc = "Z" * elif op[1].__class__ == int: # <<<<<<<<<<<<<< * tc = "i" * elif op[1].__class__ == float: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyInt_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1550, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1562, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1551 + /* "HTSeq/_HTSeq.pyx":1563 * tc = "Z" * elif op[1].__class__ == int: * tc = "i" # <<<<<<<<<<<<<< @@ -36550,7 +36044,7 @@ __Pyx_INCREF(__pyx_n_u_i); __Pyx_XDECREF_SET(__pyx_v_tc, __pyx_n_u_i); - /* "HTSeq/_HTSeq.pyx":1550 + /* "HTSeq/_HTSeq.pyx":1562 * else: * tc = "Z" * elif op[1].__class__ == int: # <<<<<<<<<<<<<< @@ -36560,25 +36054,25 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":1552 + /* "HTSeq/_HTSeq.pyx":1564 * elif op[1].__class__ == int: * tc = "i" * elif op[1].__class__ == float: # <<<<<<<<<<<<<< * tc = "j" * else: */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_t_4, ((PyObject *)(&PyFloat_Type)), Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1552, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1564, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1553 + /* "HTSeq/_HTSeq.pyx":1565 * tc = "i" * elif op[1].__class__ == float: * tc = "j" # <<<<<<<<<<<<<< @@ -36588,7 +36082,7 @@ __Pyx_INCREF(__pyx_n_u_j); __Pyx_XDECREF_SET(__pyx_v_tc, __pyx_n_u_j); - /* "HTSeq/_HTSeq.pyx":1552 + /* "HTSeq/_HTSeq.pyx":1564 * elif op[1].__class__ == int: * tc = "i" * elif op[1].__class__ == float: # <<<<<<<<<<<<<< @@ -36598,7 +36092,7 @@ goto __pyx_L5; } - /* "HTSeq/_HTSeq.pyx":1555 + /* "HTSeq/_HTSeq.pyx":1567 * tc = "j" * else: * tc = "H" # <<<<<<<<<<<<<< @@ -36611,21 +36105,21 @@ } __pyx_L5:; - /* "HTSeq/_HTSeq.pyx":1556 + /* "HTSeq/_HTSeq.pyx":1568 * else: * tc = "H" * res.append(":".join([op[0], tc, str(op[1])])) # <<<<<<<<<<<<<< * return res * */ - __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_op, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_op, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyUnicode_Type)), __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_GIVEREF(__pyx_t_3); PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); @@ -36636,13 +36130,13 @@ PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_7); __pyx_t_3 = 0; __pyx_t_7 = 0; - __pyx_t_7 = PyUnicode_Join(__pyx_kp_u__10, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_7 = PyUnicode_Join(__pyx_kp_u__10, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1556, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_res, __pyx_t_7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 1568, __pyx_L1_error) __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - /* "HTSeq/_HTSeq.pyx":1544 + /* "HTSeq/_HTSeq.pyx":1556 * def raw_optional_fields(self): * res = [] * for op in self.optional_fields: # <<<<<<<<<<<<<< @@ -36652,7 +36146,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1557 + /* "HTSeq/_HTSeq.pyx":1569 * tc = "H" * res.append(":".join([op[0], tc, str(op[1])])) * return res # <<<<<<<<<<<<<< @@ -36664,7 +36158,7 @@ __pyx_r = __pyx_v_res; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1542 + /* "HTSeq/_HTSeq.pyx":1554 * raise ValueError, "SAM optional field tag %s not unique" % tag * * def raw_optional_fields(self): # <<<<<<<<<<<<<< @@ -36691,7 +36185,7 @@ /* "HTSeq/_HTSeq.pxd":51 * - * cdef class SAM_Alignment( AlignmentWithSequenceReversal ): + * cdef class SAM_Alignment(AlignmentWithSequenceReversal): * cdef public list cigar # <<<<<<<<<<<<<< * cdef public int aQual * cdef public GenomicPosition mate_start @@ -36795,7 +36289,7 @@ } /* "HTSeq/_HTSeq.pxd":52 - * cdef class SAM_Alignment( AlignmentWithSequenceReversal ): + * cdef class SAM_Alignment(AlignmentWithSequenceReversal): * cdef public list cigar * cdef public int aQual # <<<<<<<<<<<<<< * cdef public GenomicPosition mate_start @@ -37679,8 +37173,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) + * cdef tuple state + * cdef object _dict */ /* Python wrapper */ @@ -37697,9 +37191,9 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_13SAM_Alignment_16__reduce_cython__(struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *__pyx_v_self) { + PyObject *__pyx_v_state = 0; + PyObject *__pyx_v__dict = 0; int __pyx_v_use_setstate; - PyObject *__pyx_v_state = NULL; - PyObject *__pyx_v__dict = NULL; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; @@ -37716,30 +37210,30 @@ int __pyx_t_12; __Pyx_RefNannySetupContext("__reduce_cython__", 0); - /* "(tree fragment)":3 - * def __reduce_cython__(self): + /* "(tree fragment)":5 + * cdef object _dict * cdef bint use_setstate * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) # <<<<<<<<<<<<<< * _dict = getattr(self, '__dict__', None) * if _dict is not None: */ - __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_self->_flag); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_self->aQual); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->failed_platform_qc); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_v_self->failed_platform_qc); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_self->inferred_insert_size); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->not_primary_alignment); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyBool_FromLong(__pyx_v_self->not_primary_alignment); if (unlikely(!__pyx_t_5)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->pcr_or_optical_duplicate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_v_self->pcr_or_optical_duplicate); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->proper_pair); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_self->proper_pair); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_self->supplementary); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_self->supplementary); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyTuple_New(17); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(17); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); @@ -37795,19 +37289,19 @@ __pyx_v_state = ((PyObject*)__pyx_t_9); __pyx_t_9 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * cdef bint use_setstate * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<< * if _dict is not None: * state += (_dict,) */ - __pyx_t_9 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_9 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __pyx_v__dict = __pyx_t_9; __pyx_t_9 = 0; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -37818,25 +37312,25 @@ __pyx_t_11 = (__pyx_t_10 != 0); if (__pyx_t_11) { - /* "(tree fragment)":6 + /* "(tree fragment)":8 * _dict = getattr(self, '__dict__', None) * if _dict is not None: * state += (_dict,) # <<<<<<<<<<<<<< * use_setstate = True * else: */ - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v__dict); __Pyx_GIVEREF(__pyx_v__dict); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v__dict); - __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 6, __pyx_L1_error) + __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 8, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_8)); __pyx_t_8 = 0; - /* "(tree fragment)":7 + /* "(tree fragment)":9 * if _dict is not None: * state += (_dict,) * use_setstate = True # <<<<<<<<<<<<<< @@ -37845,7 +37339,7 @@ */ __pyx_v_use_setstate = 1; - /* "(tree fragment)":5 + /* "(tree fragment)":7 * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) * _dict = getattr(self, '__dict__', None) * if _dict is not None: # <<<<<<<<<<<<<< @@ -37855,7 +37349,7 @@ goto __pyx_L3; } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * use_setstate = True * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.cigar is not None or self.iv is not None or self.mate_start is not None or self.optional_fields is not None or self.original_sam_line is not None or self.pe_which is not None or self.read_as_aligned is not None # <<<<<<<<<<<<<< @@ -37927,7 +37421,7 @@ } __pyx_L3:; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.cigar is not None or self.iv is not None or self.mate_start is not None or self.optional_fields is not None or self.original_sam_line is not None or self.pe_which is not None or self.read_as_aligned is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -37937,7 +37431,7 @@ __pyx_t_11 = (__pyx_v_use_setstate != 0); if (__pyx_t_11) { - /* "(tree fragment)":11 + /* "(tree fragment)":13 * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.cigar is not None or self.iv is not None or self.mate_start is not None or self.optional_fields is not None or self.original_sam_line is not None or self.pe_which is not None or self.read_as_aligned is not None * if use_setstate: * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, None), state # <<<<<<<<<<<<<< @@ -37945,9 +37439,9 @@ * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SAM_Alignment); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 11, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_pyx_unpickle_SAM_Alignment); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); - __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -37958,7 +37452,7 @@ __Pyx_INCREF(Py_None); __Pyx_GIVEREF(Py_None); PyTuple_SET_ITEM(__pyx_t_9, 2, Py_None); - __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_7 = PyTuple_New(3); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 13, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); @@ -37973,7 +37467,7 @@ __pyx_t_7 = 0; goto __pyx_L0; - /* "(tree fragment)":10 + /* "(tree fragment)":12 * else: * use_setstate = self._read is not None or self._read_as_sequenced is not None or self.cigar is not None or self.iv is not None or self.mate_start is not None or self.optional_fields is not None or self.original_sam_line is not None or self.pe_which is not None or self.read_as_aligned is not None * if use_setstate: # <<<<<<<<<<<<<< @@ -37982,7 +37476,7 @@ */ } - /* "(tree fragment)":13 + /* "(tree fragment)":15 * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, None), state * else: * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) # <<<<<<<<<<<<<< @@ -37991,9 +37485,9 @@ */ /*else*/ { __Pyx_XDECREF(__pyx_r); - __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyx_unpickle_SAM_Alignment); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 13, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_pyx_unpickle_SAM_Alignment); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self)))); @@ -38004,7 +37498,7 @@ __Pyx_INCREF(__pyx_v_state); __Pyx_GIVEREF(__pyx_v_state); PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_state); - __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 13, __pyx_L1_error) + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 15, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); @@ -38019,8 +37513,8 @@ /* "(tree fragment)":1 * def __reduce_cython__(self): # <<<<<<<<<<<<<< - * cdef bint use_setstate - * state = (self._flag, self._read, self._read_as_sequenced, self.aQual, self.cigar, self.failed_platform_qc, self.inferred_insert_size, self.iv, self.mate_start, self.not_primary_alignment, self.optional_fields, self.original_sam_line, self.pcr_or_optical_duplicate, self.pe_which, self.proper_pair, self.read_as_aligned, self.supplementary) + * cdef tuple state + * cdef object _dict */ /* function exit code */ @@ -38044,7 +37538,7 @@ return __pyx_r; } -/* "(tree fragment)":14 +/* "(tree fragment)":16 * else: * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -38070,17 +37564,17 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__setstate_cython__", 0); - /* "(tree fragment)":15 + /* "(tree fragment)":17 * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) * def __setstate_cython__(self, __pyx_state): * __pyx_unpickle_SAM_Alignment__set_state(self, __pyx_state) # <<<<<<<<<<<<<< */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 15, __pyx_L1_error) - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_SAM_Alignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 15, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 17, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_SAM_Alignment__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 17, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":14 + /* "(tree fragment)":16 * else: * return __pyx_unpickle_SAM_Alignment, (type(self), 0xf6933f3, state) * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<< @@ -38100,7 +37594,7 @@ return __pyx_r; } -/* "HTSeq/_HTSeq.pyx":1564 +/* "HTSeq/_HTSeq.pyx":1576 * ########################### * * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): # <<<<<<<<<<<<<< @@ -38110,8 +37604,8 @@ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_15quotesafe_split(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_f_5HTSeq_6_HTSeq_quotesafe_split(PyObject *__pyx_v_s, CYTHON_UNUSED int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_quotesafe_split *__pyx_optional_args) { - PyObject *__pyx_v_split = ((PyObject*)__pyx_kp_b__48); - PyObject *__pyx_v_quote = ((PyObject*)__pyx_kp_b__49); + PyObject *__pyx_v_split = ((PyObject*)__pyx_kp_b__39); + PyObject *__pyx_v_quote = ((PyObject*)__pyx_kp_b__40); PyObject *__pyx_v_l = 0; int __pyx_v_i; int __pyx_v_begin_token; @@ -38138,19 +37632,19 @@ } } - /* "HTSeq/_HTSeq.pyx":1565 + /* "HTSeq/_HTSeq.pyx":1577 * * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): * cdef list l = [] # <<<<<<<<<<<<<< * cdef int i = 0 * cdef int begin_token = 0 */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1577, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_v_l = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1566 + /* "HTSeq/_HTSeq.pyx":1578 * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): * cdef list l = [] * cdef int i = 0 # <<<<<<<<<<<<<< @@ -38159,7 +37653,7 @@ */ __pyx_v_i = 0; - /* "HTSeq/_HTSeq.pyx":1567 + /* "HTSeq/_HTSeq.pyx":1579 * cdef list l = [] * cdef int i = 0 * cdef int begin_token = 0 # <<<<<<<<<<<<<< @@ -38168,7 +37662,7 @@ */ __pyx_v_begin_token = 0; - /* "HTSeq/_HTSeq.pyx":1568 + /* "HTSeq/_HTSeq.pyx":1580 * cdef int i = 0 * cdef int begin_token = 0 * cdef bint in_quote = False # <<<<<<<<<<<<<< @@ -38177,7 +37671,7 @@ */ __pyx_v_in_quote = 0; - /* "HTSeq/_HTSeq.pyx":1569 + /* "HTSeq/_HTSeq.pyx":1581 * cdef int begin_token = 0 * cdef bint in_quote = False * cdef char * s_c = s # <<<<<<<<<<<<<< @@ -38186,12 +37680,12 @@ */ if (unlikely(__pyx_v_s == Py_None)) { PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found"); - __PYX_ERR(0, 1569, __pyx_L1_error) + __PYX_ERR(0, 1581, __pyx_L1_error) } - __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1569, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyBytes_AsWritableString(__pyx_v_s); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) __PYX_ERR(0, 1581, __pyx_L1_error) __pyx_v_s_c = __pyx_t_2; - /* "HTSeq/_HTSeq.pyx":1570 + /* "HTSeq/_HTSeq.pyx":1582 * cdef bint in_quote = False * cdef char * s_c = s * cdef char split_c = split[0] # <<<<<<<<<<<<<< @@ -38200,12 +37694,12 @@ */ if (unlikely(__pyx_v_split == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1570, __pyx_L1_error) + __PYX_ERR(0, 1582, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GetItemInt(__pyx_v_split, 0, 1); if (unlikely(__pyx_t_3 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1570, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GetItemInt(__pyx_v_split, 0, 1); if (unlikely(__pyx_t_3 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1582, __pyx_L1_error) __pyx_v_split_c = __pyx_t_3; - /* "HTSeq/_HTSeq.pyx":1571 + /* "HTSeq/_HTSeq.pyx":1583 * cdef char * s_c = s * cdef char split_c = split[0] * cdef char quote_c = quote[0] # <<<<<<<<<<<<<< @@ -38214,12 +37708,12 @@ */ if (unlikely(__pyx_v_quote == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1571, __pyx_L1_error) + __PYX_ERR(0, 1583, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyBytes_GetItemInt(__pyx_v_quote, 0, 1); if (unlikely(__pyx_t_3 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1571, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyBytes_GetItemInt(__pyx_v_quote, 0, 1); if (unlikely(__pyx_t_3 == ((char)((char)-1)) && PyErr_Occurred())) __PYX_ERR(0, 1583, __pyx_L1_error) __pyx_v_quote_c = __pyx_t_3; - /* "HTSeq/_HTSeq.pyx":1572 + /* "HTSeq/_HTSeq.pyx":1584 * cdef char split_c = split[0] * cdef char quote_c = quote[0] * if len(split) != 1: # <<<<<<<<<<<<<< @@ -38228,13 +37722,13 @@ */ if (unlikely(__pyx_v_split == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1572, __pyx_L1_error) + __PYX_ERR(0, 1584, __pyx_L1_error) } - __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_split); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1572, __pyx_L1_error) + __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_split); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1584, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 != 1) != 0); if (unlikely(__pyx_t_5)) { - /* "HTSeq/_HTSeq.pyx":1573 + /* "HTSeq/_HTSeq.pyx":1585 * cdef char quote_c = quote[0] * if len(split) != 1: * raise ValueError, "'split' must be length 1" # <<<<<<<<<<<<<< @@ -38242,9 +37736,9 @@ * raise ValueError, "'quote' must be length 1" */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_split_must_be_length_1, 0, 0); - __PYX_ERR(0, 1573, __pyx_L1_error) + __PYX_ERR(0, 1585, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1572 + /* "HTSeq/_HTSeq.pyx":1584 * cdef char split_c = split[0] * cdef char quote_c = quote[0] * if len(split) != 1: # <<<<<<<<<<<<<< @@ -38253,7 +37747,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1574 + /* "HTSeq/_HTSeq.pyx":1586 * if len(split) != 1: * raise ValueError, "'split' must be length 1" * if len(quote) != 1: # <<<<<<<<<<<<<< @@ -38262,13 +37756,13 @@ */ if (unlikely(__pyx_v_quote == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(0, 1574, __pyx_L1_error) + __PYX_ERR(0, 1586, __pyx_L1_error) } - __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_quote); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1574, __pyx_L1_error) + __pyx_t_4 = PyBytes_GET_SIZE(__pyx_v_quote); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1586, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 != 1) != 0); if (unlikely(__pyx_t_5)) { - /* "HTSeq/_HTSeq.pyx":1575 + /* "HTSeq/_HTSeq.pyx":1587 * raise ValueError, "'split' must be length 1" * if len(quote) != 1: * raise ValueError, "'quote' must be length 1" # <<<<<<<<<<<<<< @@ -38276,9 +37770,9 @@ * if s_c[i] == quote_c: */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_quote_must_be_length_1, 0, 0); - __PYX_ERR(0, 1575, __pyx_L1_error) + __PYX_ERR(0, 1587, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1574 + /* "HTSeq/_HTSeq.pyx":1586 * if len(split) != 1: * raise ValueError, "'split' must be length 1" * if len(quote) != 1: # <<<<<<<<<<<<<< @@ -38287,7 +37781,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1576 + /* "HTSeq/_HTSeq.pyx":1588 * if len(quote) != 1: * raise ValueError, "'quote' must be length 1" * while s_c[i] != 0: # <<<<<<<<<<<<<< @@ -38298,7 +37792,7 @@ __pyx_t_5 = (((__pyx_v_s_c[__pyx_v_i]) != 0) != 0); if (!__pyx_t_5) break; - /* "HTSeq/_HTSeq.pyx":1577 + /* "HTSeq/_HTSeq.pyx":1589 * raise ValueError, "'quote' must be length 1" * while s_c[i] != 0: * if s_c[i] == quote_c: # <<<<<<<<<<<<<< @@ -38308,7 +37802,7 @@ __pyx_t_5 = (((__pyx_v_s_c[__pyx_v_i]) == __pyx_v_quote_c) != 0); if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1578 + /* "HTSeq/_HTSeq.pyx":1590 * while s_c[i] != 0: * if s_c[i] == quote_c: * in_quote = not in_quote # <<<<<<<<<<<<<< @@ -38317,7 +37811,7 @@ */ __pyx_v_in_quote = (!(__pyx_v_in_quote != 0)); - /* "HTSeq/_HTSeq.pyx":1577 + /* "HTSeq/_HTSeq.pyx":1589 * raise ValueError, "'quote' must be length 1" * while s_c[i] != 0: * if s_c[i] == quote_c: # <<<<<<<<<<<<<< @@ -38327,7 +37821,7 @@ goto __pyx_L7; } - /* "HTSeq/_HTSeq.pyx":1579 + /* "HTSeq/_HTSeq.pyx":1591 * if s_c[i] == quote_c: * in_quote = not in_quote * elif (not in_quote) and s_c[i] == split_c: # <<<<<<<<<<<<<< @@ -38345,7 +37839,7 @@ __pyx_L8_bool_binop_done:; if (__pyx_t_5) { - /* "HTSeq/_HTSeq.pyx":1580 + /* "HTSeq/_HTSeq.pyx":1592 * in_quote = not in_quote * elif (not in_quote) and s_c[i] == split_c: * l.append(s[begin_token: i]) # <<<<<<<<<<<<<< @@ -38354,14 +37848,14 @@ */ if (unlikely(__pyx_v_s == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1580, __pyx_L1_error) + __PYX_ERR(0, 1592, __pyx_L1_error) } - __pyx_t_1 = PySequence_GetSlice(__pyx_v_s, __pyx_v_begin_token, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_1 = PySequence_GetSlice(__pyx_v_s, __pyx_v_begin_token, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1580, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1592, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1581 + /* "HTSeq/_HTSeq.pyx":1593 * elif (not in_quote) and s_c[i] == split_c: * l.append(s[begin_token: i]) * begin_token = i + 1 # <<<<<<<<<<<<<< @@ -38370,7 +37864,7 @@ */ __pyx_v_begin_token = (__pyx_v_i + 1); - /* "HTSeq/_HTSeq.pyx":1579 + /* "HTSeq/_HTSeq.pyx":1591 * if s_c[i] == quote_c: * in_quote = not in_quote * elif (not in_quote) and s_c[i] == split_c: # <<<<<<<<<<<<<< @@ -38380,7 +37874,7 @@ } __pyx_L7:; - /* "HTSeq/_HTSeq.pyx":1582 + /* "HTSeq/_HTSeq.pyx":1594 * l.append(s[begin_token: i]) * begin_token = i + 1 * i += 1 # <<<<<<<<<<<<<< @@ -38390,7 +37884,7 @@ __pyx_v_i = (__pyx_v_i + 1); } - /* "HTSeq/_HTSeq.pyx":1583 + /* "HTSeq/_HTSeq.pyx":1595 * begin_token = i + 1 * i += 1 * l.append(s[begin_token:]) # <<<<<<<<<<<<<< @@ -38399,14 +37893,14 @@ */ if (unlikely(__pyx_v_s == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(0, 1583, __pyx_L1_error) + __PYX_ERR(0, 1595, __pyx_L1_error) } - __pyx_t_1 = PySequence_GetSlice(__pyx_v_s, __pyx_v_begin_token, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_t_1 = PySequence_GetSlice(__pyx_v_s, __pyx_v_begin_token, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1583, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_l, __pyx_t_1); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 1595, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1584 + /* "HTSeq/_HTSeq.pyx":1596 * i += 1 * l.append(s[begin_token:]) * if in_quote: # <<<<<<<<<<<<<< @@ -38416,16 +37910,16 @@ __pyx_t_5 = (__pyx_v_in_quote != 0); if (unlikely(__pyx_t_5)) { - /* "HTSeq/_HTSeq.pyx":1585 + /* "HTSeq/_HTSeq.pyx":1597 * l.append(s[begin_token:]) * if in_quote: * raise ValueError, "unmatched quote" # <<<<<<<<<<<<<< * return l */ __Pyx_Raise(__pyx_builtin_ValueError, __pyx_kp_u_unmatched_quote, 0, 0); - __PYX_ERR(0, 1585, __pyx_L1_error) + __PYX_ERR(0, 1597, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1584 + /* "HTSeq/_HTSeq.pyx":1596 * i += 1 * l.append(s[begin_token:]) * if in_quote: # <<<<<<<<<<<<<< @@ -38434,7 +37928,7 @@ */ } - /* "HTSeq/_HTSeq.pyx":1586 + /* "HTSeq/_HTSeq.pyx":1598 * if in_quote: * raise ValueError, "unmatched quote" * return l # <<<<<<<<<<<<<< @@ -38444,7 +37938,7 @@ __pyx_r = __pyx_v_l; goto __pyx_L0; - /* "HTSeq/_HTSeq.pyx":1564 + /* "HTSeq/_HTSeq.pyx":1576 * ########################### * * cpdef list quotesafe_split(bytes s, bytes split=b';', bytes quote=b'"'): # <<<<<<<<<<<<<< @@ -38476,8 +37970,8 @@ { static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_s_3,&__pyx_n_s_split,&__pyx_n_s_quote,0}; PyObject* values[3] = {0,0,0}; - values[1] = ((PyObject*)__pyx_kp_b__48); - values[2] = ((PyObject*)__pyx_kp_b__49); + values[1] = ((PyObject*)__pyx_kp_b__39); + values[2] = ((PyObject*)__pyx_kp_b__40); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -38510,7 +38004,7 @@ } } if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "quotesafe_split") < 0)) __PYX_ERR(0, 1564, __pyx_L3_error) + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "quotesafe_split") < 0)) __PYX_ERR(0, 1576, __pyx_L3_error) } } else { switch (PyTuple_GET_SIZE(__pyx_args)) { @@ -38529,15 +38023,15 @@ } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("quotesafe_split", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1564, __pyx_L3_error) + __Pyx_RaiseArgtupleInvalid("quotesafe_split", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1576, __pyx_L3_error) __pyx_L3_error:; __Pyx_AddTraceback("HTSeq._HTSeq.quotesafe_split", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyBytes_Type), 1, "s", 1))) __PYX_ERR(0, 1564, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_split), (&PyBytes_Type), 1, "split", 1))) __PYX_ERR(0, 1564, __pyx_L1_error) - if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_quote), (&PyBytes_Type), 1, "quote", 1))) __PYX_ERR(0, 1564, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_s), (&PyBytes_Type), 1, "s", 1))) __PYX_ERR(0, 1576, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_split), (&PyBytes_Type), 1, "split", 1))) __PYX_ERR(0, 1576, __pyx_L1_error) + if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_quote), (&PyBytes_Type), 1, "quote", 1))) __PYX_ERR(0, 1576, __pyx_L1_error) __pyx_r = __pyx_pf_5HTSeq_6_HTSeq_14quotesafe_split(__pyx_self, __pyx_v_s, __pyx_v_split, __pyx_v_quote); /* function exit code */ @@ -38559,7 +38053,7 @@ __pyx_t_2.__pyx_n = 2; __pyx_t_2.split = __pyx_v_split; __pyx_t_2.quote = __pyx_v_quote; - __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_quotesafe_split(__pyx_v_s, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1564, __pyx_L1_error) + __pyx_t_1 = __pyx_f_5HTSeq_6_HTSeq_quotesafe_split(__pyx_v_s, 0, &__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; @@ -38578,13 +38072,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x77bfdf2: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment = {"__pyx_unpickle_Alignment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment = {"__pyx_unpickle_Alignment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -38656,8 +38150,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_16__pyx_unpickle_Alignment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -38665,12 +38159,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_Alignment", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x77bfdf2: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) @@ -38678,38 +38172,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x77bfdf2) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0x77bfdf2: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) * __pyx_result = Alignment.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0x77bfdf2: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = Alignment.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x77, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x77, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -38723,110 +38217,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x77bfdf2: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) * __pyx_result = Alignment.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Alignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_Alignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) * __pyx_result = Alignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -38834,22 +38271,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = Alignment.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_Alignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_Alignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_Alignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_Alignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x77bfdf2 = (_read, iv))" % __pyx_checksum) * __pyx_result = Alignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -38858,7 +38295,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -38872,8 +38309,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x77bfdf2: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -38882,7 +38319,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_Alignment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -38893,7 +38329,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -38912,10 +38348,9 @@ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_Alignment__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result.iv = __pyx_state[1] # <<<<<<<<<<<<<< @@ -38924,11 +38359,11 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_read); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_read)); @@ -38936,18 +38371,18 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->iv)); __pyx_v___pyx_result->iv = ((struct __pyx_obj_5HTSeq_6_HTSeq_GenomicInterval *)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result.iv = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -38955,36 +38390,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 2) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._read = __pyx_state[0]; __pyx_result.iv = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[2]) # <<<<<<<<<<<<<< */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -38996,45 +38431,15 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result.iv = __pyx_state[1] * if len(__pyx_state) > 2 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -39042,7 +38447,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -39058,7 +38463,6 @@ __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_Alignment__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -39069,13 +38473,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x1b7eeff: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal = {"__pyx_unpickle_AlignmentWithSequenceReversal", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal = {"__pyx_unpickle_AlignmentWithSequenceReversal", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_19__pyx_unpickle_AlignmentWithSequenceReversal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -39147,8 +38551,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_18__pyx_unpickle_AlignmentWithSequenceReversal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -39156,12 +38560,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_AlignmentWithSequenceReversal", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x1b7eeff: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) @@ -39169,38 +38573,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x1b7eeff) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0x1b7eeff: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0x1b7eeff: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x1b, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x1b, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -39214,110 +38618,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x1b7eeff: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; - if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { - PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2); - __Pyx_INCREF(__pyx_t_6); - __Pyx_INCREF(function); - __Pyx_DECREF_SET(__pyx_t_2, function); - } - } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __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_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -39325,22 +38672,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_AlignmentWithSequenceReversal__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_AlignmentWithSequenceReversal__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x1b7eeff = (_read, _read_as_sequenced, iv, read_as_aligned))" % __pyx_checksum) * __pyx_result = AlignmentWithSequenceReversal.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -39349,7 +38696,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -39363,8 +38710,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_AlignmentWithSequenceReversal(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x1b7eeff: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -39373,7 +38720,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_AlignmentWithSequenceReversal", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -39384,7 +38730,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -39403,10 +38749,9 @@ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_AlignmentWithSequenceReversal__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3] # <<<<<<<<<<<<<< @@ -39415,11 +38760,11 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._read)); @@ -39427,11 +38772,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->_read_as_sequenced); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->_read_as_sequenced)); @@ -39439,11 +38784,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.iv)); @@ -39451,18 +38796,18 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->read_as_aligned); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->read_as_aligned)); __pyx_v___pyx_result->read_as_aligned = ((struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -39470,36 +38815,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 4) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<< */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -39511,45 +38856,15 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3] * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -39557,7 +38872,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_AlignmentWithSequenceReversal__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_AlignmentWithSequenceReversal__set_state(AlignmentWithSequenceReversal __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -39573,7 +38888,6 @@ __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_AlignmentWithSequenceReversal__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -39584,13 +38898,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x482c176: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment = {"__pyx_unpickle_BowtieAlignment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment = {"__pyx_unpickle_BowtieAlignment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -39662,8 +38976,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_20__pyx_unpickle_BowtieAlignment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -39671,12 +38985,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_BowtieAlignment", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x482c176: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) @@ -39684,38 +38998,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0x482c176) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0x482c176: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) * __pyx_result = BowtieAlignment.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0x482c176: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = BowtieAlignment.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x48, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0x48, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -39729,110 +39043,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0x482c176: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) * __pyx_result = BowtieAlignment.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_BowtieAlignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_BowtieAlignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) * __pyx_result = BowtieAlignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -39840,22 +39097,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = BowtieAlignment.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_BowtieAlignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_BowtieAlignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_BowtieAlignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_BowtieAlignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0x482c176 = (_read, _read_as_sequenced, iv, read_as_aligned, reserved, substitutions))" % __pyx_checksum) * __pyx_result = BowtieAlignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -39864,7 +39121,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -39878,8 +39135,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x482c176: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -39888,7 +39145,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_BowtieAlignment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -39899,7 +39155,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -39918,10 +39174,9 @@ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *__pyx_t_9 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_BowtieAlignment__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3]; __pyx_result.reserved = __pyx_state[4]; __pyx_result.substitutions = __pyx_state[5] # <<<<<<<<<<<<<< @@ -39930,11 +39185,11 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._read); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._read)); @@ -39942,11 +39197,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_as_sequenced); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._read_as_sequenced)); @@ -39954,11 +39209,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.iv)); @@ -39966,11 +39221,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.read_as_aligned); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.read_as_aligned)); @@ -39978,11 +39233,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->reserved); __Pyx_DECREF(__pyx_v___pyx_result->reserved); @@ -39990,18 +39245,18 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->substitutions); __Pyx_DECREF(__pyx_v___pyx_result->substitutions); __pyx_v___pyx_result->substitutions = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3]; __pyx_result.reserved = __pyx_state[4]; __pyx_result.substitutions = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -40009,36 +39264,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_4 = ((__pyx_t_3 > 6) != 0); if (__pyx_t_4) { } else { __pyx_t_2 = __pyx_t_4; goto __pyx_L4_bool_binop_done; } - __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = (__pyx_t_4 != 0); __pyx_t_2 = __pyx_t_5; __pyx_L4_bool_binop_done:; if (__pyx_t_2) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3]; __pyx_result.reserved = __pyx_state[4]; __pyx_result.substitutions = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[6]) # <<<<<<<<<<<<<< */ - __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_7))) { @@ -40050,45 +39305,15 @@ __Pyx_DECREF_SET(__pyx_t_7, function); } } - if (!__pyx_t_8) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) { - PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_6}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - #endif - { - __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_9); - __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL; - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - } + __pyx_t_1 = (__pyx_t_8) ? __Pyx_PyObject_Call2Args(__pyx_t_7, __pyx_t_8, __pyx_t_6) : __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_6); + __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): * __pyx_result._read = __pyx_state[0]; __pyx_result._read_as_sequenced = __pyx_state[1]; __pyx_result.iv = __pyx_state[2]; __pyx_result.read_as_aligned = __pyx_state[3]; __pyx_result.reserved = __pyx_state[4]; __pyx_result.substitutions = __pyx_state[5] * if len(__pyx_state) > 6 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -40096,7 +39321,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -40112,7 +39337,6 @@ __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); - __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_BowtieAlignment__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -40123,13 +39347,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xb5bd29c: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation = {"__pyx_unpickle_CigarOperation", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation = {"__pyx_unpickle_CigarOperation", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_23__pyx_unpickle_CigarOperation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -40201,8 +39425,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_22__pyx_unpickle_CigarOperation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -40210,12 +39434,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_CigarOperation", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0xb5bd29c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) @@ -40223,38 +39447,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xb5bd29c) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0xb5bd29c: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) * __pyx_result = CigarOperation.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0xb5bd29c: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = CigarOperation.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xb5, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -40268,110 +39492,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0xb5bd29c: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) * __pyx_result = CigarOperation.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_CigarOperation), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) * __pyx_result = CigarOperation.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -40379,22 +39546,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = CigarOperation.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_CigarOperation__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_CigarOperation__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_CigarOperation *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xb5bd29c = (query_from, query_to, ref_iv, size, type))" % __pyx_checksum) * __pyx_result = CigarOperation.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -40403,7 +39570,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -40417,8 +39584,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_CigarOperation(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xb5bd29c: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -40427,7 +39594,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_CigarOperation", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -40438,7 +39604,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -40458,10 +39624,9 @@ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_CigarOperation__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): * __pyx_result.query_from = __pyx_state[0]; __pyx_result.query_to = __pyx_state[1]; __pyx_result.ref_iv = __pyx_state[2]; __pyx_result.size = __pyx_state[3]; __pyx_result.type = __pyx_state[4] # <<<<<<<<<<<<<< @@ -40470,29 +39635,29 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->query_from = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->query_to = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->ref_iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->ref_iv)); @@ -40500,27 +39665,27 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->size = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->type); __Pyx_DECREF(__pyx_v___pyx_result->type); __pyx_v___pyx_result->type = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): * __pyx_result.query_from = __pyx_state[0]; __pyx_result.query_to = __pyx_state[1]; __pyx_result.ref_iv = __pyx_state[2]; __pyx_result.size = __pyx_state[3]; __pyx_result.type = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -40528,36 +39693,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 5) != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result.query_from = __pyx_state[0]; __pyx_result.query_to = __pyx_state[1]; __pyx_result.ref_iv = __pyx_state[2]; __pyx_result.size = __pyx_state[3]; __pyx_result.type = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[5]) # <<<<<<<<<<<<<< */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -40569,45 +39734,15 @@ __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (!__pyx_t_9) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): * __pyx_result.query_from = __pyx_state[0]; __pyx_result.query_to = __pyx_state[1]; __pyx_result.ref_iv = __pyx_state[2]; __pyx_result.size = __pyx_state[3]; __pyx_result.type = __pyx_state[4] * if len(__pyx_state) > 5 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -40615,7 +39750,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_CigarOperation__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_CigarOperation__set_state(CigarOperation __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -40631,7 +39766,6 @@ __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_CigarOperation__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -40642,13 +39776,13 @@ /* "(tree fragment)":1 * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xf6933f3: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* Python wrapper */ static PyObject *__pyx_pw_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment = {"__pyx_unpickle_SAM_Alignment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment, METH_VARARGS|METH_KEYWORDS, 0}; +static PyMethodDef __pyx_mdef_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment = {"__pyx_unpickle_SAM_Alignment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment, METH_VARARGS|METH_KEYWORDS, 0}; static PyObject *__pyx_pw_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v___pyx_type = 0; long __pyx_v___pyx_checksum; @@ -40720,8 +39854,8 @@ } static PyObject *__pyx_pf_5HTSeq_6_HTSeq_24__pyx_unpickle_SAM_Alignment(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) { - PyObject *__pyx_v___pyx_PickleError = NULL; - PyObject *__pyx_v___pyx_result = NULL; + PyObject *__pyx_v___pyx_PickleError = 0; + PyObject *__pyx_v___pyx_result = 0; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; @@ -40729,12 +39863,12 @@ PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; - int __pyx_t_7; + int __pyx_t_6; __Pyx_RefNannySetupContext("__pyx_unpickle_SAM_Alignment", 0); - /* "(tree fragment)":2 - * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0xf6933f3: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) @@ -40742,38 +39876,38 @@ __pyx_t_1 = ((__pyx_v___pyx_checksum != 0xf6933f3) != 0); if (__pyx_t_1) { - /* "(tree fragment)":3 - * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":5 + * cdef object __pyx_result * if __pyx_checksum != 0xf6933f3: * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<< * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) * __pyx_result = SAM_Alignment.__new__(__pyx_type) */ - __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_n_s_PickleError); __Pyx_GIVEREF(__pyx_n_s_PickleError); PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_PickleError); - __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_2, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 3, __pyx_L1_error) + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_t_2); __pyx_v___pyx_PickleError = __pyx_t_2; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":4 + /* "(tree fragment)":6 * if __pyx_checksum != 0xf6933f3: * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) # <<<<<<<<<<<<<< * __pyx_result = SAM_Alignment.__new__(__pyx_type) * if __pyx_state is not None: */ - __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xf6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 4, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_s_vs_0xf6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 6, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_INCREF(__pyx_v___pyx_PickleError); @@ -40787,110 +39921,53 @@ __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_5) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - #endif - { - __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_6); - __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL; - __Pyx_GIVEREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 4, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } - } + __pyx_t_3 = (__pyx_t_5) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_5, __pyx_t_4) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); + __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 6, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(2, 4, __pyx_L1_error) + __PYX_ERR(2, 6, __pyx_L1_error) - /* "(tree fragment)":2 - * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): + /* "(tree fragment)":4 + * cdef object __pyx_PickleError + * cdef object __pyx_result * if __pyx_checksum != 0xf6933f3: # <<<<<<<<<<<<<< * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) */ } - /* "(tree fragment)":5 + /* "(tree fragment)":7 * from pickle import PickleError as __pyx_PickleError * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) * __pyx_result = SAM_Alignment.__new__(__pyx_type) # <<<<<<<<<<<<<< * if __pyx_state is not None: * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) */ - __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 5, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment), __pyx_n_s_new); if (unlikely(!__pyx_t_2)) __PYX_ERR(2, 7, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_2); - __pyx_t_6 = NULL; + __pyx_t_4 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) { - __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2); - if (likely(__pyx_t_6)) { + __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_6); + __Pyx_INCREF(__pyx_t_4); __Pyx_INCREF(function); __Pyx_DECREF_SET(__pyx_t_2, function); } } - if (!__pyx_t_6) { - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) { - PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v___pyx_type}; - __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_GOTREF(__pyx_t_3); - } else - #endif - { - __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_4); - __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL; - __Pyx_INCREF(__pyx_v___pyx_type); - __Pyx_GIVEREF(__pyx_v___pyx_type); - PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v___pyx_type); - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 5, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } - } + __pyx_t_3 = (__pyx_t_4) ? __Pyx_PyObject_Call2Args(__pyx_t_2, __pyx_t_4, __pyx_v___pyx_type) : __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v___pyx_type); + __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0; + if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v___pyx_result = __pyx_t_3; __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) * __pyx_result = SAM_Alignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -40898,22 +39975,22 @@ * return __pyx_result */ __pyx_t_1 = (__pyx_v___pyx_state != Py_None); - __pyx_t_7 = (__pyx_t_1 != 0); - if (__pyx_t_7) { + __pyx_t_6 = (__pyx_t_1 != 0); + if (__pyx_t_6) { - /* "(tree fragment)":7 + /* "(tree fragment)":9 * __pyx_result = SAM_Alignment.__new__(__pyx_type) * if __pyx_state is not None: * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) # <<<<<<<<<<<<<< * return __pyx_result * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): */ - if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 7, __pyx_L1_error) - __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_SAM_Alignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 7, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_v___pyx_state)->tp_name), 0))) __PYX_ERR(2, 9, __pyx_L1_error) + __pyx_t_3 = __pyx_f_5HTSeq_6_HTSeq___pyx_unpickle_SAM_Alignment__set_state(((struct __pyx_obj_5HTSeq_6_HTSeq_SAM_Alignment *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_3)) __PYX_ERR(2, 9, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - /* "(tree fragment)":6 + /* "(tree fragment)":8 * raise __pyx_PickleError("Incompatible checksums (%s vs 0xf6933f3 = (_flag, _read, _read_as_sequenced, aQual, cigar, failed_platform_qc, inferred_insert_size, iv, mate_start, not_primary_alignment, optional_fields, original_sam_line, pcr_or_optical_duplicate, pe_which, proper_pair, read_as_aligned, supplementary))" % __pyx_checksum) * __pyx_result = SAM_Alignment.__new__(__pyx_type) * if __pyx_state is not None: # <<<<<<<<<<<<<< @@ -40922,7 +39999,7 @@ */ } - /* "(tree fragment)":8 + /* "(tree fragment)":10 * if __pyx_state is not None: * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result # <<<<<<<<<<<<<< @@ -40936,8 +40013,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xf6933f3: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ /* function exit code */ @@ -40946,7 +40023,6 @@ __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_SAM_Alignment", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -40957,7 +40033,7 @@ return __pyx_r; } -/* "(tree fragment)":9 +/* "(tree fragment)":11 * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -40977,10 +40053,9 @@ PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; __Pyx_RefNannySetupContext("__pyx_unpickle_SAM_Alignment__set_state", 0); - /* "(tree fragment)":10 + /* "(tree fragment)":12 * return __pyx_result * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): * __pyx_result._flag = __pyx_state[0]; __pyx_result._read = __pyx_state[1]; __pyx_result._read_as_sequenced = __pyx_state[2]; __pyx_result.aQual = __pyx_state[3]; __pyx_result.cigar = __pyx_state[4]; __pyx_result.failed_platform_qc = __pyx_state[5]; __pyx_result.inferred_insert_size = __pyx_state[6]; __pyx_result.iv = __pyx_state[7]; __pyx_result.mate_start = __pyx_state[8]; __pyx_result.not_primary_alignment = __pyx_state[9]; __pyx_result.optional_fields = __pyx_state[10]; __pyx_result.original_sam_line = __pyx_state[11]; __pyx_result.pcr_or_optical_duplicate = __pyx_state[12]; __pyx_result.pe_which = __pyx_state[13]; __pyx_result.proper_pair = __pyx_state[14]; __pyx_result.read_as_aligned = __pyx_state[15]; __pyx_result.supplementary = __pyx_state[16] # <<<<<<<<<<<<<< @@ -40989,20 +40064,20 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->_flag = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base._read); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base._read)); @@ -41010,11 +40085,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base._read_as_sequenced); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base._read_as_sequenced)); @@ -41022,20 +40097,20 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->aQual = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->cigar); __Pyx_DECREF(__pyx_v___pyx_result->cigar); @@ -41043,29 +40118,29 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 5, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->failed_platform_qc = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 6, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __pyx_L1_error) + __pyx_t_2 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_2 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->inferred_insert_size = __pyx_t_2; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 7, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.__pyx_base.iv); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.__pyx_base.iv)); @@ -41073,11 +40148,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 8, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->mate_start); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->mate_start)); @@ -41085,20 +40160,20 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 9, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->not_primary_alignment = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 10, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->optional_fields); __Pyx_DECREF(__pyx_v___pyx_result->optional_fields); @@ -41106,11 +40181,11 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 11, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->original_sam_line); __Pyx_DECREF(__pyx_v___pyx_result->original_sam_line); @@ -41118,20 +40193,20 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 12, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->pcr_or_optical_duplicate = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 13, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __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(2, 10, __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(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->pe_which); __Pyx_DECREF(__pyx_v___pyx_result->pe_which); @@ -41139,20 +40214,20 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 14, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->proper_pair = __pyx_t_3; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 15, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 10, __pyx_L1_error) + if (!(likely(((__pyx_t_1) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_1, __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities))))) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.read_as_aligned); __Pyx_DECREF(((PyObject *)__pyx_v___pyx_result->__pyx_base.read_as_aligned)); @@ -41160,15 +40235,15 @@ __pyx_t_1 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 10, __pyx_L1_error) + __PYX_ERR(2, 12, __pyx_L1_error) } - __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 16, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 10, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) __PYX_ERR(2, 12, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v___pyx_result->supplementary = __pyx_t_3; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): * __pyx_result._flag = __pyx_state[0]; __pyx_result._read = __pyx_state[1]; __pyx_result._read_as_sequenced = __pyx_state[2]; __pyx_result.aQual = __pyx_state[3]; __pyx_result.cigar = __pyx_state[4]; __pyx_result.failed_platform_qc = __pyx_state[5]; __pyx_result.inferred_insert_size = __pyx_state[6]; __pyx_result.iv = __pyx_state[7]; __pyx_result.mate_start = __pyx_state[8]; __pyx_result.not_primary_alignment = __pyx_state[9]; __pyx_result.optional_fields = __pyx_state[10]; __pyx_result.original_sam_line = __pyx_state[11]; __pyx_result.pcr_or_optical_duplicate = __pyx_state[12]; __pyx_result.pe_which = __pyx_state[13]; __pyx_result.proper_pair = __pyx_state[14]; __pyx_result.read_as_aligned = __pyx_state[15]; __pyx_result.supplementary = __pyx_state[16] * if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -41176,36 +40251,36 @@ */ if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); - __PYX_ERR(2, 11, __pyx_L1_error) + __PYX_ERR(2, 13, __pyx_L1_error) } - __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_4 = PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_5 = ((__pyx_t_4 > 17) != 0); if (__pyx_t_5) { } else { __pyx_t_3 = __pyx_t_5; goto __pyx_L4_bool_binop_done; } - __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 11, __pyx_L1_error) + __pyx_t_5 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(2, 13, __pyx_L1_error) __pyx_t_6 = (__pyx_t_5 != 0); __pyx_t_3 = __pyx_t_6; __pyx_L4_bool_binop_done:; if (__pyx_t_3) { - /* "(tree fragment)":12 + /* "(tree fragment)":14 * __pyx_result._flag = __pyx_state[0]; __pyx_result._read = __pyx_state[1]; __pyx_result._read_as_sequenced = __pyx_state[2]; __pyx_result.aQual = __pyx_state[3]; __pyx_result.cigar = __pyx_state[4]; __pyx_result.failed_platform_qc = __pyx_state[5]; __pyx_result.inferred_insert_size = __pyx_state[6]; __pyx_result.iv = __pyx_state[7]; __pyx_result.mate_start = __pyx_state[8]; __pyx_result.not_primary_alignment = __pyx_state[9]; __pyx_result.optional_fields = __pyx_state[10]; __pyx_result.original_sam_line = __pyx_state[11]; __pyx_result.pcr_or_optical_duplicate = __pyx_state[12]; __pyx_result.pe_which = __pyx_state[13]; __pyx_result.proper_pair = __pyx_state[14]; __pyx_result.read_as_aligned = __pyx_state[15]; __pyx_result.supplementary = __pyx_state[16] * if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'): * __pyx_result.__dict__.update(__pyx_state[17]) # <<<<<<<<<<<<<< */ - __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_8)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; if (unlikely(__pyx_v___pyx_state == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(2, 12, __pyx_L1_error) + __PYX_ERR(2, 14, __pyx_L1_error) } - __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 12, __pyx_L1_error) + __pyx_t_7 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 17, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(2, 14, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_7); __pyx_t_9 = NULL; if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) { @@ -41217,45 +40292,15 @@ __Pyx_DECREF_SET(__pyx_t_8, function); } } - if (!__pyx_t_9) { - __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_GOTREF(__pyx_t_1); - } else { - #if CYTHON_FAST_PYCALL - if (PyFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - #if CYTHON_FAST_PYCCALL - if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) { - PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_7}; - __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - } else - #endif - { - __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_10); - __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL; - __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_7); - __pyx_t_7 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 12, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - } - } + __pyx_t_1 = (__pyx_t_9) ? __Pyx_PyObject_Call2Args(__pyx_t_8, __pyx_t_9, __pyx_t_7) : __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_7); + __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 14, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":11 + /* "(tree fragment)":13 * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): * __pyx_result._flag = __pyx_state[0]; __pyx_result._read = __pyx_state[1]; __pyx_result._read_as_sequenced = __pyx_state[2]; __pyx_result.aQual = __pyx_state[3]; __pyx_result.cigar = __pyx_state[4]; __pyx_result.failed_platform_qc = __pyx_state[5]; __pyx_result.inferred_insert_size = __pyx_state[6]; __pyx_result.iv = __pyx_state[7]; __pyx_result.mate_start = __pyx_state[8]; __pyx_result.not_primary_alignment = __pyx_state[9]; __pyx_result.optional_fields = __pyx_state[10]; __pyx_result.original_sam_line = __pyx_state[11]; __pyx_result.pcr_or_optical_duplicate = __pyx_state[12]; __pyx_result.pe_which = __pyx_state[13]; __pyx_result.proper_pair = __pyx_state[14]; __pyx_result.read_as_aligned = __pyx_state[15]; __pyx_result.supplementary = __pyx_state[16] * if len(__pyx_state) > 17 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<< @@ -41263,7 +40308,7 @@ */ } - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_SAM_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_SAM_Alignment__set_state(SAM_Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -41279,7 +40324,6 @@ __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); __Pyx_AddTraceback("HTSeq._HTSeq.__pyx_unpickle_SAM_Alignment__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -41288,7 +40332,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":215 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -41326,8 +40370,9 @@ int __pyx_t_4; int __pyx_t_5; int __pyx_t_6; - PyObject *__pyx_t_7 = NULL; - char *__pyx_t_8; + PyArray_Descr *__pyx_t_7; + PyObject *__pyx_t_8 = NULL; + char *__pyx_t_9; if (__pyx_v_info == NULL) { PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete"); return -1; @@ -41336,7 +40381,7 @@ __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None); __Pyx_GIVEREF(__pyx_v_info->obj); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":222 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":265 * * cdef int i, ndim * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -41345,7 +40390,7 @@ */ __pyx_v_endian_detector = 1; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":223 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":266 * cdef int i, ndim * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -41354,7 +40399,7 @@ */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":225 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":268 * cdef bint little_endian = ((&endian_detector)[0] != 0) * * ndim = PyArray_NDIM(self) # <<<<<<<<<<<<<< @@ -41363,11 +40408,11 @@ */ __pyx_v_ndim = PyArray_NDIM(__pyx_v_self); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_C_CONTIGUOUS) == PyBUF_C_CONTIGUOUS) != 0); @@ -41377,53 +40422,53 @@ goto __pyx_L4_bool_binop_done; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":228 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":271 * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not C contiguous") * */ - __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_C_CONTIGUOUS) != 0)) != 0); + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_C_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L4_bool_binop_done:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ if (unlikely(__pyx_t_1)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 229, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 272, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 229, __pyx_L1_error) + __PYX_ERR(3, 272, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":227 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":270 * ndim = PyArray_NDIM(self) * * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ __pyx_t_2 = (((__pyx_v_flags & PyBUF_F_CONTIGUOUS) == PyBUF_F_CONTIGUOUS) != 0); @@ -41433,49 +40478,49 @@ goto __pyx_L7_bool_binop_done; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":232 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":275 * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): # <<<<<<<<<<<<<< * raise ValueError(u"ndarray is not Fortran contiguous") * */ - __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_F_CONTIGUOUS) != 0)) != 0); + __pyx_t_2 = ((!(PyArray_CHKFLAGS(__pyx_v_self, NPY_ARRAY_F_CONTIGUOUS) != 0)) != 0); __pyx_t_1 = __pyx_t_2; __pyx_L7_bool_binop_done:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ if (unlikely(__pyx_t_1)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 233, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 276, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 233, __pyx_L1_error) + __PYX_ERR(3, 276, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":231 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":274 * raise ValueError(u"ndarray is not C contiguous") * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) # <<<<<<<<<<<<<< - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":235 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":278 * raise ValueError(u"ndarray is not Fortran contiguous") * * info.buf = PyArray_DATA(self) # <<<<<<<<<<<<<< @@ -41484,7 +40529,7 @@ */ __pyx_v_info->buf = PyArray_DATA(__pyx_v_self); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":236 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":279 * * info.buf = PyArray_DATA(self) * info.ndim = ndim # <<<<<<<<<<<<<< @@ -41493,7 +40538,7 @@ */ __pyx_v_info->ndim = __pyx_v_ndim; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -41503,7 +40548,7 @@ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":240 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":283 * # Allocate new buffer for strides and shape info. * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) # <<<<<<<<<<<<<< @@ -41512,7 +40557,7 @@ */ __pyx_v_info->strides = ((Py_ssize_t *)PyObject_Malloc((((sizeof(Py_ssize_t)) * 2) * ((size_t)__pyx_v_ndim)))); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":241 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":284 * # This is allocated as one block, strides first. * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim # <<<<<<<<<<<<<< @@ -41521,7 +40566,7 @@ */ __pyx_v_info->shape = (__pyx_v_info->strides + __pyx_v_ndim); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":242 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":285 * info.strides = PyObject_Malloc(sizeof(Py_ssize_t) * 2 * ndim) * info.shape = info.strides + ndim * for i in range(ndim): # <<<<<<<<<<<<<< @@ -41533,7 +40578,7 @@ for (__pyx_t_6 = 0; __pyx_t_6 < __pyx_t_5; __pyx_t_6+=1) { __pyx_v_i = __pyx_t_6; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":243 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":286 * info.shape = info.strides + ndim * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] # <<<<<<<<<<<<<< @@ -41542,7 +40587,7 @@ */ (__pyx_v_info->strides[__pyx_v_i]) = (PyArray_STRIDES(__pyx_v_self)[__pyx_v_i]); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":244 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":287 * for i in range(ndim): * info.strides[i] = PyArray_STRIDES(self)[i] * info.shape[i] = PyArray_DIMS(self)[i] # <<<<<<<<<<<<<< @@ -41552,7 +40597,7 @@ (__pyx_v_info->shape[__pyx_v_i]) = (PyArray_DIMS(__pyx_v_self)[__pyx_v_i]); } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":237 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":280 * info.buf = PyArray_DATA(self) * info.ndim = ndim * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -41562,7 +40607,7 @@ goto __pyx_L9; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":246 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":289 * info.shape[i] = PyArray_DIMS(self)[i] * else: * info.strides = PyArray_STRIDES(self) # <<<<<<<<<<<<<< @@ -41572,7 +40617,7 @@ /*else*/ { __pyx_v_info->strides = ((Py_ssize_t *)PyArray_STRIDES(__pyx_v_self)); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":247 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":290 * else: * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) # <<<<<<<<<<<<<< @@ -41583,7 +40628,7 @@ } __pyx_L9:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":248 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":291 * info.strides = PyArray_STRIDES(self) * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL # <<<<<<<<<<<<<< @@ -41592,7 +40637,7 @@ */ __pyx_v_info->suboffsets = NULL; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":249 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":292 * info.shape = PyArray_DIMS(self) * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) # <<<<<<<<<<<<<< @@ -41601,7 +40646,7 @@ */ __pyx_v_info->itemsize = PyArray_ITEMSIZE(__pyx_v_self); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":250 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":293 * info.suboffsets = NULL * info.itemsize = PyArray_ITEMSIZE(self) * info.readonly = not PyArray_ISWRITEABLE(self) # <<<<<<<<<<<<<< @@ -41610,28 +40655,29 @@ */ __pyx_v_info->readonly = (!(PyArray_ISWRITEABLE(__pyx_v_self) != 0)); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":253 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":296 * * cdef int t * cdef char* f = NULL # <<<<<<<<<<<<<< - * cdef dtype descr = self.descr + * cdef dtype descr = PyArray_DESCR(self) * cdef int offset */ __pyx_v_f = NULL; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":254 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":297 * cdef int t * cdef char* f = NULL - * cdef dtype descr = self.descr # <<<<<<<<<<<<<< + * cdef dtype descr = PyArray_DESCR(self) # <<<<<<<<<<<<<< * cdef int offset * */ - __pyx_t_3 = ((PyObject *)__pyx_v_self->descr); + __pyx_t_7 = PyArray_DESCR(__pyx_v_self); + __pyx_t_3 = ((PyObject *)__pyx_t_7); __Pyx_INCREF(__pyx_t_3); __pyx_v_descr = ((PyArray_Descr *)__pyx_t_3); __pyx_t_3 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":257 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":300 * cdef int offset * * info.obj = self # <<<<<<<<<<<<<< @@ -41644,7 +40690,7 @@ __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = ((PyObject *)__pyx_v_self); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< @@ -41654,7 +40700,7 @@ __pyx_t_1 = ((!(PyDataType_HASFIELDS(__pyx_v_descr) != 0)) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":260 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":303 * * if not PyDataType_HASFIELDS(descr): * t = descr.type_num # <<<<<<<<<<<<<< @@ -41664,7 +40710,7 @@ __pyx_t_4 = __pyx_v_descr->type_num; __pyx_v_t = __pyx_t_4; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -41684,7 +40730,7 @@ } __pyx_L15_next_or:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":262 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":305 * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -41701,7 +40747,7 @@ __pyx_t_1 = __pyx_t_2; __pyx_L14_bool_binop_done:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -41710,20 +40756,20 @@ */ if (unlikely(__pyx_t_1)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 263, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 306, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 263, __pyx_L1_error) + __PYX_ERR(3, 306, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":261 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":304 * if not PyDataType_HASFIELDS(descr): * t = descr.type_num * if ((descr.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -41732,7 +40778,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":264 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":307 * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" # <<<<<<<<<<<<<< @@ -41743,206 +40789,206 @@ case NPY_BYTE: __pyx_v_f = ((char *)"b"); break; + case NPY_UBYTE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":265 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":308 * raise ValueError(u"Non-native byte order not supported") * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" */ - case NPY_UBYTE: __pyx_v_f = ((char *)"B"); break; + case NPY_SHORT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":266 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":309 * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" */ - case NPY_SHORT: __pyx_v_f = ((char *)"h"); break; + case NPY_USHORT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":267 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":310 * elif t == NPY_UBYTE: f = "B" * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" */ - case NPY_USHORT: __pyx_v_f = ((char *)"H"); break; + case NPY_INT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":268 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":311 * elif t == NPY_SHORT: f = "h" * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" */ - case NPY_INT: __pyx_v_f = ((char *)"i"); break; + case NPY_UINT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":269 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":312 * elif t == NPY_USHORT: f = "H" * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" */ - case NPY_UINT: __pyx_v_f = ((char *)"I"); break; + case NPY_LONG: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":270 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":313 * elif t == NPY_INT: f = "i" * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" */ - case NPY_LONG: __pyx_v_f = ((char *)"l"); break; + case NPY_ULONG: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":271 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":314 * elif t == NPY_UINT: f = "I" * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" */ - case NPY_ULONG: __pyx_v_f = ((char *)"L"); break; + case NPY_LONGLONG: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":272 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":315 * elif t == NPY_LONG: f = "l" * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" */ - case NPY_LONGLONG: __pyx_v_f = ((char *)"q"); break; + case NPY_ULONGLONG: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":273 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":316 * elif t == NPY_ULONG: f = "L" * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" */ - case NPY_ULONGLONG: __pyx_v_f = ((char *)"Q"); break; + case NPY_FLOAT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":274 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":317 * elif t == NPY_LONGLONG: f = "q" * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" */ - case NPY_FLOAT: __pyx_v_f = ((char *)"f"); break; + case NPY_DOUBLE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":275 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":318 * elif t == NPY_ULONGLONG: f = "Q" * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" */ - case NPY_DOUBLE: __pyx_v_f = ((char *)"d"); break; + case NPY_LONGDOUBLE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":276 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":319 * elif t == NPY_FLOAT: f = "f" * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" */ - case NPY_LONGDOUBLE: __pyx_v_f = ((char *)"g"); break; + case NPY_CFLOAT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":277 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":320 * elif t == NPY_DOUBLE: f = "d" * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" */ - case NPY_CFLOAT: __pyx_v_f = ((char *)"Zf"); break; + case NPY_CDOUBLE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":278 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":321 * elif t == NPY_LONGDOUBLE: f = "g" * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" */ - case NPY_CDOUBLE: __pyx_v_f = ((char *)"Zd"); break; + case NPY_CLONGDOUBLE: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":279 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":322 * elif t == NPY_CFLOAT: f = "Zf" * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f = "O" * else: */ - case NPY_CLONGDOUBLE: __pyx_v_f = ((char *)"Zg"); break; + case NPY_OBJECT: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":280 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":323 * elif t == NPY_CDOUBLE: f = "Zd" * elif t == NPY_CLONGDOUBLE: f = "Zg" * elif t == NPY_OBJECT: f = "O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - case NPY_OBJECT: __pyx_v_f = ((char *)"O"); break; default: - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":282 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":325 * elif t == NPY_OBJECT: f = "O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< * info.format = f * return */ - __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_7 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_7)) __PYX_ERR(3, 282, __pyx_L1_error) - __Pyx_GOTREF(__pyx_t_7); + __pyx_t_8 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 325, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 282, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 325, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 282, __pyx_L1_error) + __PYX_ERR(3, 325, __pyx_L1_error) break; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":283 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":326 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f # <<<<<<<<<<<<<< @@ -41951,7 +40997,7 @@ */ __pyx_v_info->format = __pyx_v_f; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":284 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":327 * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * info.format = f * return # <<<<<<<<<<<<<< @@ -41961,7 +41007,7 @@ __pyx_r = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":259 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":302 * info.obj = self * * if not PyDataType_HASFIELDS(descr): # <<<<<<<<<<<<<< @@ -41970,7 +41016,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":286 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":329 * return * else: * info.format = PyObject_Malloc(_buffer_format_string_len) # <<<<<<<<<<<<<< @@ -41980,7 +41026,7 @@ /*else*/ { __pyx_v_info->format = ((char *)PyObject_Malloc(0xFF)); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":287 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":330 * else: * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment # <<<<<<<<<<<<<< @@ -41989,7 +41035,7 @@ */ (__pyx_v_info->format[0]) = '^'; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":288 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":331 * info.format = PyObject_Malloc(_buffer_format_string_len) * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 # <<<<<<<<<<<<<< @@ -41998,17 +41044,17 @@ */ __pyx_v_offset = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":289 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":332 * info.format[0] = c'^' # Native data types, manual alignment * offset = 0 * f = _util_dtypestring(descr, info.format + 1, # <<<<<<<<<<<<<< * info.format + _buffer_format_string_len, * &offset) */ - __pyx_t_8 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_8 == ((char *)NULL))) __PYX_ERR(3, 289, __pyx_L1_error) - __pyx_v_f = __pyx_t_8; + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_descr, (__pyx_v_info->format + 1), (__pyx_v_info->format + 0xFF), (&__pyx_v_offset)); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 332, __pyx_L1_error) + __pyx_v_f = __pyx_t_9; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":292 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":335 * info.format + _buffer_format_string_len, * &offset) * f[0] = c'\0' # Terminate format string # <<<<<<<<<<<<<< @@ -42018,7 +41064,7 @@ (__pyx_v_f[0]) = '\x00'; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":215 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":258 * # experimental exception made for __getbuffer__ and __releasebuffer__ * # -- the details of this may change. * def __getbuffer__(ndarray self, Py_buffer* info, int flags): # <<<<<<<<<<<<<< @@ -42031,7 +41077,7 @@ goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_7); + __Pyx_XDECREF(__pyx_t_8); __Pyx_AddTraceback("numpy.ndarray.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; if (__pyx_v_info->obj != NULL) { @@ -42050,7 +41096,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":294 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -42074,7 +41120,7 @@ int __pyx_t_1; __Pyx_RefNannySetupContext("__releasebuffer__", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":295 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -42084,7 +41130,7 @@ __pyx_t_1 = (PyArray_HASFIELDS(__pyx_v_self) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":296 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":339 * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) # <<<<<<<<<<<<<< @@ -42093,7 +41139,7 @@ */ PyObject_Free(__pyx_v_info->format); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":295 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":338 * * def __releasebuffer__(ndarray self, Py_buffer* info): * if PyArray_HASFIELDS(self): # <<<<<<<<<<<<<< @@ -42102,7 +41148,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -42112,7 +41158,7 @@ __pyx_t_1 = (((sizeof(npy_intp)) != (sizeof(Py_ssize_t))) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":298 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":341 * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): * PyObject_Free(info.strides) # <<<<<<<<<<<<<< @@ -42121,7 +41167,7 @@ */ PyObject_Free(__pyx_v_info->strides); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":297 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":340 * if PyArray_HASFIELDS(self): * PyObject_Free(info.format) * if sizeof(npy_intp) != sizeof(Py_ssize_t): # <<<<<<<<<<<<<< @@ -42130,7 +41176,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":294 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":337 * f[0] = c'\0' # Terminate format string * * def __releasebuffer__(ndarray self, Py_buffer* info): # <<<<<<<<<<<<<< @@ -42142,7 +41188,7 @@ __Pyx_RefNannyFinishContext(); } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":775 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -42156,7 +41202,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew1", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":776 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":822 * * cdef inline object PyArray_MultiIterNew1(a): * return PyArray_MultiIterNew(1, a) # <<<<<<<<<<<<<< @@ -42164,13 +41210,13 @@ * cdef inline object PyArray_MultiIterNew2(a, b): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 776, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(1, ((void *)__pyx_v_a)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 822, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":775 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":821 * ctypedef npy_cdouble complex_t * * cdef inline object PyArray_MultiIterNew1(a): # <<<<<<<<<<<<<< @@ -42189,7 +41235,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -42203,7 +41249,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew2", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":779 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":825 * * cdef inline object PyArray_MultiIterNew2(a, b): * return PyArray_MultiIterNew(2, a, b) # <<<<<<<<<<<<<< @@ -42211,13 +41257,13 @@ * cdef inline object PyArray_MultiIterNew3(a, b, c): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 779, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(2, ((void *)__pyx_v_a), ((void *)__pyx_v_b)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 825, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":778 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":824 * return PyArray_MultiIterNew(1, a) * * cdef inline object PyArray_MultiIterNew2(a, b): # <<<<<<<<<<<<<< @@ -42236,7 +41282,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":781 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -42250,7 +41296,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew3", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":782 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":828 * * cdef inline object PyArray_MultiIterNew3(a, b, c): * return PyArray_MultiIterNew(3, a, b, c) # <<<<<<<<<<<<<< @@ -42258,13 +41304,13 @@ * cdef inline object PyArray_MultiIterNew4(a, b, c, d): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 782, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(3, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 828, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":781 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":827 * return PyArray_MultiIterNew(2, a, b) * * cdef inline object PyArray_MultiIterNew3(a, b, c): # <<<<<<<<<<<<<< @@ -42283,7 +41329,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -42297,7 +41343,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew4", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":785 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":831 * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): * return PyArray_MultiIterNew(4, a, b, c, d) # <<<<<<<<<<<<<< @@ -42305,13 +41351,13 @@ * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 785, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(4, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 831, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":784 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":830 * return PyArray_MultiIterNew(3, a, b, c) * * cdef inline object PyArray_MultiIterNew4(a, b, c, d): # <<<<<<<<<<<<<< @@ -42330,7 +41376,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":787 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -42344,7 +41390,7 @@ PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("PyArray_MultiIterNew5", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":788 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":834 * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): * return PyArray_MultiIterNew(5, a, b, c, d, e) # <<<<<<<<<<<<<< @@ -42352,13 +41398,13 @@ * cdef inline tuple PyDataType_SHAPE(dtype d): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 788, __pyx_L1_error) + __pyx_t_1 = PyArray_MultiIterNew(5, ((void *)__pyx_v_a), ((void *)__pyx_v_b), ((void *)__pyx_v_c), ((void *)__pyx_v_d), ((void *)__pyx_v_e)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 834, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":787 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":833 * return PyArray_MultiIterNew(4, a, b, c, d) * * cdef inline object PyArray_MultiIterNew5(a, b, c, d, e): # <<<<<<<<<<<<<< @@ -42377,7 +41423,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -42391,7 +41437,7 @@ int __pyx_t_1; __Pyx_RefNannySetupContext("PyDataType_SHAPE", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -42401,7 +41447,7 @@ __pyx_t_1 = (PyDataType_HASSUBARRAY(__pyx_v_d) != 0); if (__pyx_t_1) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":792 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":838 * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): * return d.subarray.shape # <<<<<<<<<<<<<< @@ -42413,7 +41459,7 @@ __pyx_r = ((PyObject*)__pyx_v_d->subarray->shape); goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":791 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":837 * * cdef inline tuple PyDataType_SHAPE(dtype d): * if PyDataType_HASSUBARRAY(d): # <<<<<<<<<<<<<< @@ -42422,7 +41468,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":794 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":840 * return d.subarray.shape * else: * return () # <<<<<<<<<<<<<< @@ -42436,7 +41482,7 @@ goto __pyx_L0; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":790 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":836 * return PyArray_MultiIterNew(5, a, b, c, d, e) * * cdef inline tuple PyDataType_SHAPE(dtype d): # <<<<<<<<<<<<<< @@ -42451,7 +41497,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":796 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -42480,7 +41526,7 @@ char *__pyx_t_9; __Pyx_RefNannySetupContext("_util_dtypestring", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":801 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":847 * * cdef dtype child * cdef int endian_detector = 1 # <<<<<<<<<<<<<< @@ -42489,7 +41535,7 @@ */ __pyx_v_endian_detector = 1; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":802 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":848 * cdef dtype child * cdef int endian_detector = 1 * cdef bint little_endian = ((&endian_detector)[0] != 0) # <<<<<<<<<<<<<< @@ -42498,7 +41544,7 @@ */ __pyx_v_little_endian = ((((char *)(&__pyx_v_endian_detector))[0]) != 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -42507,21 +41553,21 @@ */ if (unlikely(__pyx_v_descr->names == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); - __PYX_ERR(3, 805, __pyx_L1_error) + __PYX_ERR(3, 851, __pyx_L1_error) } __pyx_t_1 = __pyx_v_descr->names; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= 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_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 805, __pyx_L1_error) + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(3, 851, __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(3, 805, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 851, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); #endif __Pyx_XDECREF_SET(__pyx_v_childname, __pyx_t_3); __pyx_t_3 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":806 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":852 * * for childname in descr.names: * fields = descr.fields[childname] # <<<<<<<<<<<<<< @@ -42530,15 +41576,15 @@ */ if (unlikely(__pyx_v_descr->fields == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); - __PYX_ERR(3, 806, __pyx_L1_error) + __PYX_ERR(3, 852, __pyx_L1_error) } - __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 806, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_v_descr->fields, __pyx_v_childname); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 806, __pyx_L1_error) + if (!(likely(PyTuple_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "tuple", Py_TYPE(__pyx_t_3)->tp_name), 0))) __PYX_ERR(3, 852, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_fields, ((PyObject*)__pyx_t_3)); __pyx_t_3 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":807 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":853 * for childname in descr.names: * fields = descr.fields[childname] * child, new_offset = fields # <<<<<<<<<<<<<< @@ -42551,7 +41597,7 @@ if (unlikely(size != 2)) { if (size > 2) __Pyx_RaiseTooManyValuesError(2); else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size); - __PYX_ERR(3, 807, __pyx_L1_error) + __PYX_ERR(3, 853, __pyx_L1_error) } #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); @@ -42559,51 +41605,51 @@ __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(3, 807, __pyx_L1_error) + __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 807, __pyx_L1_error) + __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); #endif } else { - __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 807, __pyx_L1_error) + __Pyx_RaiseNoneNotIterableError(); __PYX_ERR(3, 853, __pyx_L1_error) } - if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 807, __pyx_L1_error) + if (!(likely(((__pyx_t_3) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_3, __pyx_ptype_5numpy_dtype))))) __PYX_ERR(3, 853, __pyx_L1_error) __Pyx_XDECREF_SET(__pyx_v_child, ((PyArray_Descr *)__pyx_t_3)); __pyx_t_3 = 0; __Pyx_XDECREF_SET(__pyx_v_new_offset, __pyx_t_4); __pyx_t_4 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * */ - __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 809, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 809, __pyx_L1_error) + __pyx_t_3 = PyNumber_Subtract(__pyx_v_new_offset, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 809, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_5 == (int)-1) && PyErr_Occurred())) __PYX_ERR(3, 855, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_6 = ((((__pyx_v_end - __pyx_v_f) - ((int)__pyx_t_5)) < 15) != 0); if (unlikely(__pyx_t_6)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":810 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 810, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 856, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 810, __pyx_L1_error) + __PYX_ERR(3, 856, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":809 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":855 * child, new_offset = fields * * if (end - f) - (new_offset - offset[0]) < 15: # <<<<<<<<<<<<<< @@ -42612,7 +41658,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -42632,7 +41678,7 @@ } __pyx_L8_next_or:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":813 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":859 * * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): # <<<<<<<<<<<<<< @@ -42649,7 +41695,7 @@ __pyx_t_6 = __pyx_t_7; __pyx_L7_bool_binop_done:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -42658,20 +41704,20 @@ */ if (unlikely(__pyx_t_6)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":860 * if ((child.byteorder == c'>' and little_endian) or * (child.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * # One could encode it in the format string and have Cython * # complain instead, BUT: < and > in format strings also imply */ - __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 814, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 860, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); __Pyx_Raise(__pyx_t_3, 0, 0, 0); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __PYX_ERR(3, 814, __pyx_L1_error) + __PYX_ERR(3, 860, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":812 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":858 * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") * * if ((child.byteorder == c'>' and little_endian) or # <<<<<<<<<<<<<< @@ -42680,7 +41726,7 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":824 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":870 * * # Output padding bytes * while offset[0] < new_offset: # <<<<<<<<<<<<<< @@ -42688,15 +41734,15 @@ * f += 1 */ while (1) { - __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 824, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_offset[0])); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 870, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 824, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_t_3, __pyx_v_new_offset, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 824, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 870, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (!__pyx_t_6) break; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":825 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":871 * # Output padding bytes * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte # <<<<<<<<<<<<<< @@ -42705,7 +41751,7 @@ */ (__pyx_v_f[0]) = 0x78; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":826 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":872 * while offset[0] < new_offset: * f[0] = 120 # "x"; pad byte * f += 1 # <<<<<<<<<<<<<< @@ -42714,7 +41760,7 @@ */ __pyx_v_f = (__pyx_v_f + 1); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":827 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":873 * f[0] = 120 # "x"; pad byte * f += 1 * offset[0] += 1 # <<<<<<<<<<<<<< @@ -42725,7 +41771,7 @@ (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + 1); } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":829 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":875 * offset[0] += 1 * * offset[0] += child.itemsize # <<<<<<<<<<<<<< @@ -42735,7 +41781,7 @@ __pyx_t_8 = 0; (__pyx_v_offset[__pyx_t_8]) = ((__pyx_v_offset[__pyx_t_8]) + __pyx_v_child->elsize); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -42745,19 +41791,19 @@ __pyx_t_6 = ((!(PyDataType_HASFIELDS(__pyx_v_child) != 0)) != 0); if (__pyx_t_6) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":832 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":878 * * if not PyDataType_HASFIELDS(child): * t = child.type_num # <<<<<<<<<<<<<< * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") */ - __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 832, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_child->type_num); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 878, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_4); __pyx_t_4 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -42767,20 +41813,20 @@ __pyx_t_6 = (((__pyx_v_end - __pyx_v_f) < 5) != 0); if (unlikely(__pyx_t_6)) { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 834, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 880, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(3, 834, __pyx_L1_error) + __PYX_ERR(3, 880, __pyx_L1_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":833 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":879 * if not PyDataType_HASFIELDS(child): * t = child.type_num * if end - f < 5: # <<<<<<<<<<<<<< @@ -42789,252 +41835,252 @@ */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":837 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":883 * * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" # <<<<<<<<<<<<<< * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 837, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_BYTE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 883, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 837, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 837, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 883, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 98; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":838 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":884 * # Until ticket #99 is fixed, use integers to avoid warnings * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" # <<<<<<<<<<<<<< * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 838, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UBYTE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 884, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 838, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 838, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 884, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 66; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":839 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":885 * if t == NPY_BYTE: f[0] = 98 #"b" * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" # <<<<<<<<<<<<<< * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 839, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_SHORT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 885, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 839, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 839, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 885, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x68; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":840 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":886 * elif t == NPY_UBYTE: f[0] = 66 #"B" * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" # <<<<<<<<<<<<<< * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 840, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_USHORT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 886, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 840, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 840, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 886, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 72; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":841 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":887 * elif t == NPY_SHORT: f[0] = 104 #"h" * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" # <<<<<<<<<<<<<< * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 841, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_INT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 887, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 841, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 841, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 887, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x69; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":842 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":888 * elif t == NPY_USHORT: f[0] = 72 #"H" * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" # <<<<<<<<<<<<<< * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 842, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_UINT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 888, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 842, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 842, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 888, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 73; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":843 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":889 * elif t == NPY_INT: f[0] = 105 #"i" * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" # <<<<<<<<<<<<<< * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 843, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 889, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 843, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 843, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 889, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x6C; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":844 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":890 * elif t == NPY_UINT: f[0] = 73 #"I" * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" # <<<<<<<<<<<<<< * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 844, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 890, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 844, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 844, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 890, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 76; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":845 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":891 * elif t == NPY_LONG: f[0] = 108 #"l" * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" # <<<<<<<<<<<<<< * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 845, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGLONG); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 891, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 845, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 845, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 891, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x71; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":846 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":892 * elif t == NPY_ULONG: f[0] = 76 #"L" * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" # <<<<<<<<<<<<<< * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 846, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_ULONGLONG); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 892, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 846, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 846, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 892, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 81; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":847 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":893 * elif t == NPY_LONGLONG: f[0] = 113 #"q" * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" # <<<<<<<<<<<<<< * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 847, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_FLOAT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 893, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 847, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 847, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 893, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x66; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":848 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":894 * elif t == NPY_ULONGLONG: f[0] = 81 #"Q" * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" # <<<<<<<<<<<<<< * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 848, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_DOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 894, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 848, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 848, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 894, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x64; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":849 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":895 * elif t == NPY_FLOAT: f[0] = 102 #"f" * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" # <<<<<<<<<<<<<< * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 849, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_LONGDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 895, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 849, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 849, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 895, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 0x67; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":850 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":896 * elif t == NPY_DOUBLE: f[0] = 100 #"d" * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf # <<<<<<<<<<<<<< * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 850, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CFLOAT); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 896, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 850, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 850, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 896, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -43043,18 +42089,18 @@ goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":851 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":897 * elif t == NPY_LONGDOUBLE: f[0] = 103 #"g" * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd # <<<<<<<<<<<<<< * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 851, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CDOUBLE); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 851, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 851, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 897, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -43063,18 +42109,18 @@ goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":852 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":898 * elif t == NPY_CFLOAT: f[0] = 90; f[1] = 102; f += 1 # Zf * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg # <<<<<<<<<<<<<< * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: */ - __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 852, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_CLONGDOUBLE); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 898, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 852, __pyx_L1_error) + __pyx_t_4 = PyObject_RichCompare(__pyx_v_t, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 852, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 898, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; if (__pyx_t_6) { (__pyx_v_f[0]) = 90; @@ -43083,25 +42129,25 @@ goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":853 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":899 * elif t == NPY_CDOUBLE: f[0] = 90; f[1] = 100; f += 1 # Zd * elif t == NPY_CLONGDOUBLE: f[0] = 90; f[1] = 103; f += 1 # Zg * elif t == NPY_OBJECT: f[0] = 79 #"O" # <<<<<<<<<<<<<< * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) */ - __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 853, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyInt_From_enum__NPY_TYPES(NPY_OBJECT); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 899, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 853, __pyx_L1_error) + __pyx_t_3 = PyObject_RichCompare(__pyx_v_t, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 853, __pyx_L1_error) + __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(3, 899, __pyx_L1_error) __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (likely(__pyx_t_6)) { (__pyx_v_f[0]) = 79; goto __pyx_L15; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":855 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":901 * elif t == NPY_OBJECT: f[0] = 79 #"O" * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) # <<<<<<<<<<<<<< @@ -43109,18 +42155,18 @@ * else: */ /*else*/ { - __pyx_t_3 = PyUnicode_Format(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 855, __pyx_L1_error) + __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_unknown_dtype_code_in_numpy_pxd, __pyx_v_t); if (unlikely(!__pyx_t_3)) __PYX_ERR(3, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 855, __pyx_L1_error) + __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 901, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_Raise(__pyx_t_4, 0, 0, 0); __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __PYX_ERR(3, 855, __pyx_L1_error) + __PYX_ERR(3, 901, __pyx_L1_error) } __pyx_L15:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":856 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":902 * else: * raise ValueError(u"unknown dtype code in numpy.pxd (%d)" % t) * f += 1 # <<<<<<<<<<<<<< @@ -43129,7 +42175,7 @@ */ __pyx_v_f = (__pyx_v_f + 1); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":831 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":877 * offset[0] += child.itemsize * * if not PyDataType_HASFIELDS(child): # <<<<<<<<<<<<<< @@ -43139,7 +42185,7 @@ goto __pyx_L13; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":860 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":906 * # Cython ignores struct boundary information ("T{...}"), * # so don't output it * f = _util_dtypestring(child, f, end, offset) # <<<<<<<<<<<<<< @@ -43147,12 +42193,12 @@ * */ /*else*/ { - __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 860, __pyx_L1_error) + __pyx_t_9 = __pyx_f_5numpy__util_dtypestring(__pyx_v_child, __pyx_v_f, __pyx_v_end, __pyx_v_offset); if (unlikely(__pyx_t_9 == ((char *)NULL))) __PYX_ERR(3, 906, __pyx_L1_error) __pyx_v_f = __pyx_t_9; } __pyx_L13:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":805 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":851 * cdef tuple fields * * for childname in descr.names: # <<<<<<<<<<<<<< @@ -43162,7 +42208,7 @@ } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":861 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":907 * # so don't output it * f = _util_dtypestring(child, f, end, offset) * return f # <<<<<<<<<<<<<< @@ -43172,7 +42218,7 @@ __pyx_r = __pyx_v_f; goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":796 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":842 * return () * * cdef inline char* _util_dtypestring(dtype descr, char* f, char* end, int* offset) except NULL: # <<<<<<<<<<<<<< @@ -43197,166 +42243,120 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977 - * +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * cdef PyObject* baseptr - * if base is None: + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) */ static CYTHON_INLINE void __pyx_f_5numpy_set_array_base(PyArrayObject *__pyx_v_arr, PyObject *__pyx_v_base) { - PyObject *__pyx_v_baseptr; __Pyx_RefNannyDeclarations - int __pyx_t_1; - int __pyx_t_2; __Pyx_RefNannySetupContext("set_array_base", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":979 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1023 + * * cdef inline void set_array_base(ndarray arr, object base): - * cdef PyObject* baseptr - * if base is None: # <<<<<<<<<<<<<< - * baseptr = NULL - * else: - */ - __pyx_t_1 = (__pyx_v_base == Py_None); - __pyx_t_2 = (__pyx_t_1 != 0); - if (__pyx_t_2) { - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":980 - * cdef PyObject* baseptr - * if base is None: - * baseptr = NULL # <<<<<<<<<<<<<< - * else: - * Py_INCREF(base) # important to do this before decref below! + * Py_INCREF(base) # important to do this before stealing the reference below! # <<<<<<<<<<<<<< + * PyArray_SetBaseObject(arr, base) + * */ - __pyx_v_baseptr = NULL; + Py_INCREF(__pyx_v_base); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":979 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1024 * cdef inline void set_array_base(ndarray arr, object base): - * cdef PyObject* baseptr - * if base is None: # <<<<<<<<<<<<<< - * baseptr = NULL - * else: - */ - goto __pyx_L3; - } - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":982 - * baseptr = NULL - * else: - * Py_INCREF(base) # important to do this before decref below! # <<<<<<<<<<<<<< - * baseptr = base - * Py_XDECREF(arr.base) - */ - /*else*/ { - Py_INCREF(__pyx_v_base); - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":983 - * else: - * Py_INCREF(base) # important to do this before decref below! - * baseptr = base # <<<<<<<<<<<<<< - * Py_XDECREF(arr.base) - * arr.base = baseptr - */ - __pyx_v_baseptr = ((PyObject *)__pyx_v_base); - } - __pyx_L3:; - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":984 - * Py_INCREF(base) # important to do this before decref below! - * baseptr = base - * Py_XDECREF(arr.base) # <<<<<<<<<<<<<< - * arr.base = baseptr - * - */ - Py_XDECREF(__pyx_v_arr->base); - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":985 - * baseptr = base - * Py_XDECREF(arr.base) - * arr.base = baseptr # <<<<<<<<<<<<<< + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) # <<<<<<<<<<<<<< * * cdef inline object get_array_base(ndarray arr): */ - __pyx_v_arr->base = __pyx_v_baseptr; + (void)(PyArray_SetBaseObject(__pyx_v_arr, __pyx_v_base)); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":977 - * + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1022 + * int _import_umath() except -1 * * cdef inline void set_array_base(ndarray arr, object base): # <<<<<<<<<<<<<< - * cdef PyObject* baseptr - * if base is None: + * Py_INCREF(base) # important to do this before stealing the reference below! + * PyArray_SetBaseObject(arr, base) */ /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":987 - * arr.base = baseptr +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * if arr.base is NULL: - * return None + * base = PyArray_BASE(arr) + * if base is NULL: */ static CYTHON_INLINE PyObject *__pyx_f_5numpy_get_array_base(PyArrayObject *__pyx_v_arr) { + PyObject *__pyx_v_base; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; __Pyx_RefNannySetupContext("get_array_base", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":988 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1027 * * cdef inline object get_array_base(ndarray arr): - * if arr.base is NULL: # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) # <<<<<<<<<<<<<< + * if base is NULL: * return None - * else: */ - __pyx_t_1 = ((__pyx_v_arr->base == NULL) != 0); - if (__pyx_t_1) { + __pyx_v_base = PyArray_BASE(__pyx_v_arr); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":989 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 * cdef inline object get_array_base(ndarray arr): - * if arr.base is NULL: + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< + * return None + * return base + */ + __pyx_t_1 = ((__pyx_v_base == NULL) != 0); + if (__pyx_t_1) { + + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1029 + * base = PyArray_BASE(arr) + * if base is NULL: * return None # <<<<<<<<<<<<<< - * else: - * return arr.base + * return base + * */ __Pyx_XDECREF(__pyx_r); __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":988 - * + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1028 * cdef inline object get_array_base(ndarray arr): - * if arr.base is NULL: # <<<<<<<<<<<<<< + * base = PyArray_BASE(arr) + * if base is NULL: # <<<<<<<<<<<<<< * return None - * else: + * return base */ } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":991 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1030 + * if base is NULL: * return None - * else: - * return arr.base # <<<<<<<<<<<<<< - * + * return base # <<<<<<<<<<<<<< * + * # Versions of the import_* functions which are more suitable for */ - /*else*/ { - __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_arr->base)); - __pyx_r = ((PyObject *)__pyx_v_arr->base); - goto __pyx_L0; - } + __Pyx_XDECREF(__pyx_r); + __Pyx_INCREF(((PyObject *)__pyx_v_base)); + __pyx_r = ((PyObject *)__pyx_v_base); + goto __pyx_L0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":987 - * arr.base = baseptr + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1026 + * PyArray_SetBaseObject(arr, base) * * cdef inline object get_array_base(ndarray arr): # <<<<<<<<<<<<<< - * if arr.base is NULL: - * return None + * base = PyArray_BASE(arr) + * if base is NULL: */ /* function exit code */ @@ -43366,7 +42366,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":996 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -43387,7 +42387,7 @@ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_array", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -43403,16 +42403,16 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":998 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1036 * cdef inline int import_array() except -1: * try: * _import_array() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.multiarray failed to import") */ - __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 998, __pyx_L3_error) + __pyx_t_4 = _import_array(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1036, __pyx_L3_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -43426,7 +42426,7 @@ goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":999 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1037 * try: * _import_array() * except Exception: # <<<<<<<<<<<<<< @@ -43436,28 +42436,28 @@ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_array", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 999, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1037, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1000, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1038, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(3, 1000, __pyx_L5_except_error) + __PYX_ERR(3, 1038, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":997 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1035 * # Cython code. * cdef inline int import_array() except -1: * try: # <<<<<<<<<<<<<< @@ -43472,7 +42472,7 @@ __pyx_L8_try_end:; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":996 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1034 * # Versions of the import_* functions which are more suitable for * # Cython code. * cdef inline int import_array() except -1: # <<<<<<<<<<<<<< @@ -43495,7 +42495,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1002 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -43516,7 +42516,7 @@ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_umath", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -43532,16 +42532,16 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1004 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1042 * cdef inline int import_umath() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1004, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1042, __pyx_L3_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -43555,7 +42555,7 @@ goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1005 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1043 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -43565,28 +42565,28 @@ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_umath", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1005, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1043, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1006 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1006, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1044, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(3, 1006, __pyx_L5_except_error) + __PYX_ERR(3, 1044, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1003 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1041 * * cdef inline int import_umath() except -1: * try: # <<<<<<<<<<<<<< @@ -43601,7 +42601,7 @@ __pyx_L8_try_end:; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1002 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1040 * raise ImportError("numpy.core.multiarray failed to import") * * cdef inline int import_umath() except -1: # <<<<<<<<<<<<<< @@ -43624,7 +42624,7 @@ return __pyx_r; } -/* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 +/* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -43645,7 +42645,7 @@ PyObject *__pyx_t_8 = NULL; __Pyx_RefNannySetupContext("import_ufunc", 0); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -43661,16 +42661,16 @@ __Pyx_XGOTREF(__pyx_t_3); /*try:*/ { - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1010 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1048 * cdef inline int import_ufunc() except -1: * try: * _import_umath() # <<<<<<<<<<<<<< * except Exception: * raise ImportError("numpy.core.umath failed to import") */ - __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1010, __pyx_L3_error) + __pyx_t_4 = _import_umath(); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(3, 1048, __pyx_L3_error) - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -43684,7 +42684,7 @@ goto __pyx_L8_try_end; __pyx_L3_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1011 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1049 * try: * _import_umath() * except Exception: # <<<<<<<<<<<<<< @@ -43693,26 +42693,26 @@ __pyx_t_4 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0]))); if (__pyx_t_4) { __Pyx_AddTraceback("numpy.import_ufunc", __pyx_clineno, __pyx_lineno, __pyx_filename); - if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1011, __pyx_L5_except_error) + if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) __PYX_ERR(3, 1049, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_GOTREF(__pyx_t_6); __Pyx_GOTREF(__pyx_t_7); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1012 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1050 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< */ - __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1012, __pyx_L5_except_error) + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ImportError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(3, 1050, __pyx_L5_except_error) __Pyx_GOTREF(__pyx_t_8); __Pyx_Raise(__pyx_t_8, 0, 0, 0); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __PYX_ERR(3, 1012, __pyx_L5_except_error) + __PYX_ERR(3, 1050, __pyx_L5_except_error) } goto __pyx_L5_except_error; __pyx_L5_except_error:; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1009 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1047 * * cdef inline int import_ufunc() except -1: * try: # <<<<<<<<<<<<<< @@ -43727,7 +42727,7 @@ __pyx_L8_try_end:; } - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -43888,8 +42888,8 @@ {"is_contained_in", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_15is_contained_in, METH_O, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_14is_contained_in}, {"contains", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_17contains, METH_O, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_16contains}, {"overlaps", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_19overlaps, METH_O, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_18overlaps}, - {"range", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_21range, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_20range}, - {"range_d", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_23range_d, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_22range_d}, + {"range", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_21range, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_20range}, + {"range_d", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_23range_d, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_22range_d}, {"extend_to_include", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_25extend_to_include, METH_O, __pyx_doc_5HTSeq_6_HTSeq_15GenomicInterval_24extend_to_include}, {"copy", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15GenomicInterval_27copy, METH_NOARGS, 0}, {0, 0, 0, 0} @@ -44149,14 +43149,14 @@ } static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_Sequence[] = { - {"get_reverse_complement", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement, METH_NOARGS, 0}, + {"get_reverse_complement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_3get_reverse_complement, METH_VARARGS|METH_KEYWORDS, 0}, {"__getstate__", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_13__getstate__, METH_NOARGS, 0}, {"__setstate__", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_15__setstate__, METH_O, 0}, {"__reduce__", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_17__reduce__, METH_NOARGS, 0}, - {"write_to_fasta_file", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_19write_to_fasta_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_8Sequence_18write_to_fasta_file}, + {"write_to_fasta_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_19write_to_fasta_file, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5HTSeq_6_HTSeq_8Sequence_18write_to_fasta_file}, {"add_bases_to_count_array", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_21add_bases_to_count_array, METH_O, 0}, - {"trim_left_end", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_23trim_left_end, METH_VARARGS|METH_KEYWORDS, 0}, - {"trim_right_end", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_25trim_right_end, METH_VARARGS|METH_KEYWORDS, 0}, + {"trim_left_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_23trim_left_end, METH_VARARGS|METH_KEYWORDS, 0}, + {"trim_right_end", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_8Sequence_25trim_right_end, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -44340,11 +43340,11 @@ static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_SequenceWithQualities[] = { {"write_to_fastq_file", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_7write_to_fastq_file, METH_O, 0}, - {"get_fastq_str", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_9get_fastq_str, METH_VARARGS|METH_KEYWORDS, 0}, - {"get_reverse_complement", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement, METH_NOARGS, 0}, + {"get_fastq_str", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_9get_fastq_str, METH_VARARGS|METH_KEYWORDS, 0}, + {"get_reverse_complement", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_11get_reverse_complement, METH_VARARGS|METH_KEYWORDS, 0}, {"add_qual_to_count_array", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_13add_qual_to_count_array, METH_O, 0}, - {"trim_left_end_with_quals", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_15trim_left_end_with_quals, METH_VARARGS|METH_KEYWORDS, 0}, - {"trim_right_end_with_quals", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_17trim_right_end_with_quals, METH_VARARGS|METH_KEYWORDS, 0}, + {"trim_left_end_with_quals", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_15trim_left_end_with_quals, METH_VARARGS|METH_KEYWORDS, 0}, + {"trim_right_end_with_quals", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_21SequenceWithQualities_17trim_right_end_with_quals, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -45006,8 +44006,8 @@ static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_SAM_Alignment[] = { {"to_pysam_AlignedSegment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_1to_pysam_AlignedSegment, METH_O, 0}, {"to_pysam_AlignedRead", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_3to_pysam_AlignedRead, METH_O, 0}, - {"from_pysam_AlignedRead", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_5from_pysam_AlignedRead, METH_VARARGS|METH_KEYWORDS, 0}, - {"from_pysam_AlignedSegment", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_7from_pysam_AlignedSegment, METH_VARARGS|METH_KEYWORDS, 0}, + {"from_pysam_AlignedRead", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_5from_pysam_AlignedRead, METH_VARARGS|METH_KEYWORDS, 0}, + {"from_pysam_AlignedSegment", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_7from_pysam_AlignedSegment, METH_VARARGS|METH_KEYWORDS, 0}, {"from_SAM_line", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_9from_SAM_line, METH_O, 0}, {"get_sam_line", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_11get_sam_line, METH_NOARGS, 0}, {"optional_field", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13SAM_Alignment_13optional_field, METH_O, 0}, @@ -45242,8 +44242,8 @@ } static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_ChromVector[] = { - {"create", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_1create, METH_VARARGS|METH_KEYWORDS, 0}, - {"_create_view", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_3_create_view, METH_VARARGS|METH_KEYWORDS, 0}, + {"create", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_1create, METH_VARARGS|METH_KEYWORDS, 0}, + {"_create_view", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_3_create_view, METH_VARARGS|METH_KEYWORDS, 0}, {"values", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_13values, METH_NOARGS, 0}, {"steps", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_15steps, METH_NOARGS, 0}, {"apply", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11ChromVector_17apply, METH_O, 0}, @@ -45511,9 +44511,9 @@ } static PyMethodDef __pyx_methods_5HTSeq_6_HTSeq_GenomicArray[] = { - {"add_chrom", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_7add_chrom, METH_VARARGS|METH_KEYWORDS, 0}, + {"add_chrom", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_7add_chrom, METH_VARARGS|METH_KEYWORDS, 0}, {"__reduce__", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_9__reduce__, METH_NOARGS, 0}, - {"write_bedgraph_file", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_11write_bedgraph_file, METH_VARARGS|METH_KEYWORDS, 0}, + {"write_bedgraph_file", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_11write_bedgraph_file, METH_VARARGS|METH_KEYWORDS, 0}, {"steps", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_12GenomicArray_13steps, METH_NOARGS, 0}, {0, 0, 0, 0} }; @@ -46023,9 +45023,9 @@ static PyMethodDef __pyx_methods[] = { {"reverse_complement", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_9reverse_complement, METH_O, __pyx_doc_5HTSeq_6_HTSeq_8reverse_complement}, - {"parse_cigar", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_11parse_cigar, METH_VARARGS|METH_KEYWORDS, 0}, - {"build_cigar_list", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_13build_cigar_list, METH_VARARGS|METH_KEYWORDS, 0}, - {"quotesafe_split", (PyCFunction)__pyx_pw_5HTSeq_6_HTSeq_15quotesafe_split, METH_VARARGS|METH_KEYWORDS, 0}, + {"parse_cigar", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_11parse_cigar, METH_VARARGS|METH_KEYWORDS, 0}, + {"build_cigar_list", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_13build_cigar_list, METH_VARARGS|METH_KEYWORDS, 0}, + {"quotesafe_split", (PyCFunction)(void*)(PyCFunctionWithKeywords)__pyx_pw_5HTSeq_6_HTSeq_15quotesafe_split, METH_VARARGS|METH_KEYWORDS, 0}, {0, 0, 0, 0} }; @@ -46060,31 +45060,48 @@ NULL /* m_free */ }; #endif +#ifndef CYTHON_SMALL_CODE +#if defined(__clang__) + #define CYTHON_SMALL_CODE +#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) + #define CYTHON_SMALL_CODE __attribute__((cold)) +#else + #define CYTHON_SMALL_CODE +#endif +#endif static __Pyx_StringTabEntry __pyx_string_tab[] = { {&__pyx_n_u_A, __pyx_k_A, sizeof(__pyx_k_A), 0, 1, 0, 1}, {&__pyx_n_b_ACGTacgt, __pyx_k_ACGTacgt, sizeof(__pyx_k_ACGTacgt), 0, 0, 0, 1}, {&__pyx_n_s_AlignedRead, __pyx_k_AlignedRead, sizeof(__pyx_k_AlignedRead), 0, 0, 1, 1}, {&__pyx_n_s_AlignedSegment, __pyx_k_AlignedSegment, sizeof(__pyx_k_AlignedSegment), 0, 0, 1, 1}, + {&__pyx_n_s_Alignment, __pyx_k_Alignment, sizeof(__pyx_k_Alignment), 0, 0, 1, 1}, + {&__pyx_n_s_AlignmentWithSequenceReversal, __pyx_k_AlignmentWithSequenceReversal, sizeof(__pyx_k_AlignmentWithSequenceReversal), 0, 0, 1, 1}, {&__pyx_kp_u_Automatic_adding_of_chromosomes, __pyx_k_Automatic_adding_of_chromosomes, sizeof(__pyx_k_Automatic_adding_of_chromosomes), 0, 1, 0, 0}, + {&__pyx_n_s_BowtieAlignment, __pyx_k_BowtieAlignment, sizeof(__pyx_k_BowtieAlignment), 0, 0, 1, 1}, {&__pyx_n_u_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 1, 0, 1}, {&__pyx_kp_u_Cannot_assign_to_zero_length_int, __pyx_k_Cannot_assign_to_zero_length_int, sizeof(__pyx_k_Cannot_assign_to_zero_length_int), 0, 1, 0, 0}, {&__pyx_kp_u_Cannot_extend_an_interval_to_inc, __pyx_k_Cannot_extend_an_interval_to_inc, sizeof(__pyx_k_Cannot_extend_an_interval_to_inc), 0, 1, 0, 0}, {&__pyx_kp_u_Cannot_extend_an_interval_to_inc_2, __pyx_k_Cannot_extend_an_interval_to_inc_2, sizeof(__pyx_k_Cannot_extend_an_interval_to_inc_2), 0, 1, 0, 0}, {&__pyx_kp_u_Cannot_extend_an_interval_to_inc_3, __pyx_k_Cannot_extend_an_interval_to_inc_3, sizeof(__pyx_k_Cannot_extend_an_interval_to_inc_3), 0, 1, 0, 0}, {&__pyx_kp_u_Cannot_subset_to_zero_length_int, __pyx_k_Cannot_subset_to_zero_length_int, sizeof(__pyx_k_Cannot_subset_to_zero_length_int), 0, 1, 0, 0}, + {&__pyx_n_s_ChromVector, __pyx_k_ChromVector, sizeof(__pyx_k_ChromVector), 0, 0, 1, 1}, {&__pyx_n_s_ChromVector_steps, __pyx_k_ChromVector_steps, sizeof(__pyx_k_ChromVector_steps), 0, 0, 1, 1}, {&__pyx_n_s_ChromVector_unpickle, __pyx_k_ChromVector_unpickle, sizeof(__pyx_k_ChromVector_unpickle), 0, 0, 1, 1}, {&__pyx_kp_u_Chromosome_name_mismatch, __pyx_k_Chromosome_name_mismatch, sizeof(__pyx_k_Chromosome_name_mismatch), 0, 1, 0, 0}, + {&__pyx_n_s_CigarOperation, __pyx_k_CigarOperation, sizeof(__pyx_k_CigarOperation), 0, 0, 1, 1}, {&__pyx_n_u_D, __pyx_k_D, sizeof(__pyx_k_D), 0, 1, 0, 1}, {&__pyx_kp_u_Format_string_allocated_too_shor, __pyx_k_Format_string_allocated_too_shor, sizeof(__pyx_k_Format_string_allocated_too_shor), 0, 1, 0, 0}, {&__pyx_kp_u_Format_string_allocated_too_shor_2, __pyx_k_Format_string_allocated_too_shor_2, sizeof(__pyx_k_Format_string_allocated_too_shor_2), 0, 1, 0, 0}, {&__pyx_n_u_G, __pyx_k_G, sizeof(__pyx_k_G), 0, 1, 0, 1}, + {&__pyx_n_s_GenomicArray, __pyx_k_GenomicArray, sizeof(__pyx_k_GenomicArray), 0, 0, 1, 1}, {&__pyx_n_s_GenomicArray_steps, __pyx_k_GenomicArray_steps, sizeof(__pyx_k_GenomicArray_steps), 0, 0, 1, 1}, {&__pyx_n_s_GenomicArray_unpickle, __pyx_k_GenomicArray_unpickle, sizeof(__pyx_k_GenomicArray_unpickle), 0, 0, 1, 1}, + {&__pyx_n_s_GenomicInterval, __pyx_k_GenomicInterval, sizeof(__pyx_k_GenomicInterval), 0, 0, 1, 1}, {&__pyx_n_s_GenomicInterval_from_directional, __pyx_k_GenomicInterval_from_directional, sizeof(__pyx_k_GenomicInterval_from_directional), 0, 0, 1, 1}, {&__pyx_n_s_GenomicInterval_range, __pyx_k_GenomicInterval_range, sizeof(__pyx_k_GenomicInterval_range), 0, 0, 1, 1}, {&__pyx_n_s_GenomicInterval_ranged, __pyx_k_GenomicInterval_ranged, sizeof(__pyx_k_GenomicInterval_ranged), 0, 0, 1, 1}, + {&__pyx_n_s_GenomicPosition, __pyx_k_GenomicPosition, sizeof(__pyx_k_GenomicPosition), 0, 0, 1, 1}, {&__pyx_n_u_H, __pyx_k_H, sizeof(__pyx_k_H), 0, 1, 0, 1}, {&__pyx_n_s_HTSeq, __pyx_k_HTSeq, sizeof(__pyx_k_HTSeq), 0, 0, 1, 1}, {&__pyx_n_s_HTSeq__HTSeq, __pyx_k_HTSeq__HTSeq, sizeof(__pyx_k_HTSeq__HTSeq), 0, 0, 1, 1}, @@ -46129,10 +45146,13 @@ {&__pyx_kp_u_Required_assignment_signature_no, __pyx_k_Required_assignment_signature_no, sizeof(__pyx_k_Required_assignment_signature_no), 0, 1, 0, 0}, {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1}, {&__pyx_n_u_S, __pyx_k_S, sizeof(__pyx_k_S), 0, 1, 0, 1}, + {&__pyx_n_s_SAM_Alignment, __pyx_k_SAM_Alignment, sizeof(__pyx_k_SAM_Alignment), 0, 0, 1, 1}, {&__pyx_kp_u_SAM_line_does_not_contain_at_lea, __pyx_k_SAM_line_does_not_contain_at_lea, sizeof(__pyx_k_SAM_line_does_not_contain_at_lea), 0, 1, 0, 0}, {&__pyx_kp_u_SAM_optional_field_tag_s_not_fou, __pyx_k_SAM_optional_field_tag_s_not_fou, sizeof(__pyx_k_SAM_optional_field_tag_s_not_fou), 0, 1, 0, 0}, {&__pyx_kp_u_SAM_optional_field_tag_s_not_uni, __pyx_k_SAM_optional_field_tag_s_not_uni, sizeof(__pyx_k_SAM_optional_field_tag_s_not_uni), 0, 1, 0, 0}, {&__pyx_kp_u_SAM_optional_field_with_illegal, __pyx_k_SAM_optional_field_with_illegal, sizeof(__pyx_k_SAM_optional_field_with_illegal), 0, 1, 0, 0}, + {&__pyx_n_s_Sequence, __pyx_k_Sequence, sizeof(__pyx_k_Sequence), 0, 0, 1, 1}, + {&__pyx_n_s_SequenceWithQualities, __pyx_k_SequenceWithQualities, sizeof(__pyx_k_SequenceWithQualities), 0, 0, 1, 1}, {&__pyx_kp_u_Sequence_in_SAM_file_contains_wh, __pyx_k_Sequence_in_SAM_file_contains_wh, sizeof(__pyx_k_Sequence_in_SAM_file_contains_wh), 0, 1, 0, 0}, {&__pyx_kp_u_Sequence_in_SAM_file_contains_wh_2, __pyx_k_Sequence_in_SAM_file_contains_wh_2, sizeof(__pyx_k_Sequence_in_SAM_file_contains_wh_2), 0, 1, 0, 0}, {&__pyx_kp_u_Start_of_interval_is_after_its_e, __pyx_k_Start_of_interval_is_after_its_e, sizeof(__pyx_k_Start_of_interval_is_after_its_e), 0, 1, 0, 0}, @@ -46159,24 +45179,24 @@ {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0}, {&__pyx_kp_u__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 1, 0, 0}, {&__pyx_kp_u__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 1, 0, 0}, + {&__pyx_kp_u__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 1, 0, 0}, {&__pyx_kp_u__22, __pyx_k__22, sizeof(__pyx_k__22), 0, 1, 0, 0}, - {&__pyx_kp_u__23, __pyx_k__23, sizeof(__pyx_k__23), 0, 1, 0, 0}, + {&__pyx_kp_u__25, __pyx_k__25, sizeof(__pyx_k__25), 0, 1, 0, 0}, + {&__pyx_kp_b__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 0, 0}, {&__pyx_kp_u__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 1, 0, 0}, - {&__pyx_kp_b__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 0, 0}, {&__pyx_kp_u__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 1, 0, 0}, {&__pyx_kp_u__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 1, 0, 0}, {&__pyx_kp_u__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 1, 0, 0}, {&__pyx_kp_u__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 1, 0, 0}, + {&__pyx_kp_u__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 1, 0, 0}, + {&__pyx_kp_u__31, __pyx_k__31, sizeof(__pyx_k__31), 0, 1, 0, 0}, + {&__pyx_kp_u__32, __pyx_k__32, sizeof(__pyx_k__32), 0, 1, 0, 0}, {&__pyx_kp_u__33, __pyx_k__33, sizeof(__pyx_k__33), 0, 1, 0, 0}, - {&__pyx_kp_u__35, __pyx_k__35, sizeof(__pyx_k__35), 0, 1, 0, 0}, - {&__pyx_kp_u__36, __pyx_k__36, sizeof(__pyx_k__36), 0, 1, 0, 0}, - {&__pyx_kp_u__37, __pyx_k__37, sizeof(__pyx_k__37), 0, 1, 0, 0}, - {&__pyx_kp_u__38, __pyx_k__38, sizeof(__pyx_k__38), 0, 1, 0, 0}, + {&__pyx_kp_b__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 0, 0, 0}, + {&__pyx_kp_u__34, __pyx_k__34, sizeof(__pyx_k__34), 0, 1, 0, 0}, + {&__pyx_kp_b__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 0, 0, 0}, {&__pyx_kp_u__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 1, 0, 0}, - {&__pyx_kp_b__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 0, 0, 0}, - {&__pyx_kp_u__41, __pyx_k__41, sizeof(__pyx_k__41), 0, 1, 0, 0}, - {&__pyx_kp_b__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 0, 0, 0}, - {&__pyx_kp_b__49, __pyx_k__49, sizeof(__pyx_k__49), 0, 0, 0, 0}, + {&__pyx_kp_b__40, __pyx_k__40, sizeof(__pyx_k__40), 0, 0, 0, 0}, {&__pyx_kp_u__5, __pyx_k__5, sizeof(__pyx_k__5), 0, 1, 0, 0}, {&__pyx_kp_u__6, __pyx_k__6, sizeof(__pyx_k__6), 0, 1, 0, 0}, {&__pyx_kp_u__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 1, 0, 0}, @@ -46374,6 +45394,7 @@ {&__pyx_n_s_reference_end, __pyx_k_reference_end, sizeof(__pyx_k_reference_end), 0, 0, 1, 1}, {&__pyx_n_s_reference_id, __pyx_k_reference_id, sizeof(__pyx_k_reference_id), 0, 0, 1, 1}, {&__pyx_n_s_reference_start, __pyx_k_reference_start, sizeof(__pyx_k_reference_start), 0, 0, 1, 1}, + {&__pyx_n_s_rename, __pyx_k_rename, sizeof(__pyx_k_rename), 0, 0, 1, 1}, {&__pyx_n_u_revcomp_of, __pyx_k_revcomp_of, sizeof(__pyx_k_revcomp_of), 0, 1, 0, 1}, {&__pyx_n_s_rfrom, __pyx_k_rfrom, sizeof(__pyx_k_rfrom), 0, 0, 1, 1}, {&__pyx_n_s_rstrip, __pyx_k_rstrip, sizeof(__pyx_k_rstrip), 0, 0, 1, 1}, @@ -46453,23 +45474,23 @@ {&__pyx_n_s_zeros, __pyx_k_zeros, sizeof(__pyx_k_zeros), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; -static int __Pyx_InitCachedBuiltins(void) { +static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) { __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 67, __pyx_L1_error) __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 166, __pyx_L1_error) __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 240, __pyx_L1_error) __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) __PYX_ERR(0, 352, __pyx_L1_error) __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 433, __pyx_L1_error) __pyx_builtin_open = __Pyx_GetBuiltinName(__pyx_n_s_open); if (!__pyx_builtin_open) __PYX_ERR(0, 597, __pyx_L1_error) - __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 718, __pyx_L1_error) - __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1229, __pyx_L1_error) - __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 1244, __pyx_L1_error) - __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 810, __pyx_L1_error) + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 723, __pyx_L1_error) + __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1241, __pyx_L1_error) + __pyx_builtin_ImportError = __Pyx_GetBuiltinName(__pyx_n_s_ImportError); if (!__pyx_builtin_ImportError) __PYX_ERR(0, 1256, __pyx_L1_error) + __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(3, 856, __pyx_L1_error) return 0; __pyx_L1_error:; return -1; } -static int __Pyx_InitCachedConstants(void) { +static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0); @@ -46496,267 +45517,148 @@ __Pyx_GIVEREF(__pyx_tuple__14); __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_addval, 447, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 447, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":599 - * f = open(file_or_filename, "w") - * if track_options == "": - * f.write("track type=bedGraph\n") # <<<<<<<<<<<<<< - * else: - * f.write("track type=bedGraph %s\n" % track_options) - */ - __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_u_track_type_bedGraph); if (unlikely(!__pyx_tuple__21)) __PYX_ERR(0, 599, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__21); - __Pyx_GIVEREF(__pyx_tuple__21); - /* "HTSeq/_HTSeq.pyx":627 - * - * def _make_translation_table_for_complementation(): - * return bytes.maketrans(b'ACGTacgt', b'TGCAtgca') # <<<<<<<<<<<<<< - * - * cdef bytes _translation_table_for_complementation = _make_translation_table_for_complementation() - */ - __pyx_tuple__24 = PyTuple_Pack(2, __pyx_n_b_ACGTacgt, __pyx_n_b_TGCAtgca); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 627, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__24); - __Pyx_GIVEREF(__pyx_tuple__24); - - /* "HTSeq/_HTSeq.pyx":635 - * work with extended IUPAC nucleotide letters or RNA.""" - * - * return seq[::-1].translate(_translation_table_for_complementation) # <<<<<<<<<<<<<< - * - * base_to_column = {'A': 0, 'C': 1, 'G': 2, 'T': 3, 'N': 4} - */ - __pyx_slice__25 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__25)) __PYX_ERR(0, 635, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__25); - __Pyx_GIVEREF(__pyx_slice__25); - - /* "HTSeq/_HTSeq.pyx":893 - * fastq_file.write("@%s\n" % self.name) - * fastq_file.write(self.seq.decode() + "\n") - * fastq_file.write("+\n") # <<<<<<<<<<<<<< - * fastq_file.write(self.qualstr.decode() + "\n") - * - */ - __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_u__29); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 893, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__30); - __Pyx_GIVEREF(__pyx_tuple__30); - - /* "HTSeq/_HTSeq.pyx":906 - * reverse_complement(self.seq), - * "revcomp_of_" + self.name, - * self._qualstr[::-1], # <<<<<<<<<<<<<< - * self._qualscale) - * if self._qualarr is not None: - */ - __pyx_slice__31 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__31)) __PYX_ERR(0, 906, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__31); - __Pyx_GIVEREF(__pyx_slice__31); - - /* "HTSeq/_HTSeq.pyx":909 - * self._qualscale) - * if self._qualarr is not None: - * res._qualarr = self._qualarr[::-1] # <<<<<<<<<<<<<< - * return res - * - */ - __pyx_slice__32 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__32)) __PYX_ERR(0, 909, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__32); - __Pyx_GIVEREF(__pyx_slice__32); - - /* "HTSeq/_HTSeq.pyx":1087 - * cdef int positionint - * (readId, strand, chrom, position, read, qual, - * self.reserved, self.substitutions) = bowtie_line.split('\t') # <<<<<<<<<<<<<< - * positionint = int(position) - * AlignmentWithSequenceReversal.__init__(self, - */ - __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_u__22); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 1087, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__34); - __Pyx_GIVEREF(__pyx_tuple__34); - - /* "HTSeq/_HTSeq.pyx":1245 - * import pysam - * except ImportError: - * sys.stderr.write( # <<<<<<<<<<<<<< - * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") - * raise - */ - __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_u_Please_Install_PySam_to_use_this); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 1245, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__39); - __Pyx_GIVEREF(__pyx_tuple__39); - - /* "HTSeq/_HTSeq.pyx":1277 - * import pysam - * except ImportError: - * sys.stderr.write( # <<<<<<<<<<<<<< - * "Please Install PySam to use this functionality (http://code.google.com/p/pysam/)") - * raise + * + * def _make_translation_table_for_complementation(): + * return bytes.maketrans(b'ACGTacgt', b'TGCAtgca') # <<<<<<<<<<<<<< + * + * cdef bytes _translation_table_for_complementation = _make_translation_table_for_complementation() */ - __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_u_Please_Install_PySam_to_use_this); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 1277, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__40); - __Pyx_GIVEREF(__pyx_tuple__40); + __pyx_tuple__23 = PyTuple_Pack(2, __pyx_n_b_ACGTacgt, __pyx_n_b_TGCAtgca); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 627, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__23); + __Pyx_GIVEREF(__pyx_tuple__23); - /* "HTSeq/_HTSeq.pyx":1404 - * cdef SequenceWithQualities swq + /* "HTSeq/_HTSeq.pyx":635 + * work with extended IUPAC nucleotide letters or RNA.""" * - * fields = line.rstrip().split("\t") # <<<<<<<<<<<<<< - * if len(fields) < 10: - * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." + * return seq[::-1].translate(_translation_table_for_complementation) # <<<<<<<<<<<<<< + * + * base_to_column = {'A': 0, 'C': 1, 'G': 2, 'T': 3, 'N': 4} */ - __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u__22); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 1404, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__42); - __Pyx_GIVEREF(__pyx_tuple__42); + __pyx_slice__24 = PySlice_New(Py_None, Py_None, __pyx_int_neg_1); if (unlikely(!__pyx_slice__24)) __PYX_ERR(0, 635, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__24); + __Pyx_GIVEREF(__pyx_slice__24); - /* "HTSeq/_HTSeq.pyx":1408 + /* "HTSeq/_HTSeq.pyx":1420 * raise ValueError, "SAM line does not contain at least 11 tab-delimited fields." * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, * seq, qual) = fields[0:11] # <<<<<<<<<<<<<< * optional_fields = fields[11:] * */ - __pyx_slice__43 = PySlice_New(__pyx_int_0, __pyx_int_11, Py_None); if (unlikely(!__pyx_slice__43)) __PYX_ERR(0, 1408, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__43); - __Pyx_GIVEREF(__pyx_slice__43); + __pyx_slice__35 = PySlice_New(__pyx_int_0, __pyx_int_11, Py_None); if (unlikely(!__pyx_slice__35)) __PYX_ERR(0, 1420, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__35); + __Pyx_GIVEREF(__pyx_slice__35); - /* "HTSeq/_HTSeq.pyx":1409 + /* "HTSeq/_HTSeq.pyx":1421 * (qname, flag, rname, pos, mapq, cigar, mrnm, mpos, isize, * seq, qual) = fields[0:11] * optional_fields = fields[11:] # <<<<<<<<<<<<<< * * if seq.count("=") > 0: */ - __pyx_slice__44 = PySlice_New(__pyx_int_11, Py_None, Py_None); if (unlikely(!__pyx_slice__44)) __PYX_ERR(0, 1409, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__44); - __Pyx_GIVEREF(__pyx_slice__44); + __pyx_slice__36 = PySlice_New(__pyx_int_11, Py_None, Py_None); if (unlikely(!__pyx_slice__36)) __PYX_ERR(0, 1421, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__36); + __Pyx_GIVEREF(__pyx_slice__36); - /* "HTSeq/_HTSeq.pyx":1444 + /* "HTSeq/_HTSeq.pyx":1456 * alnmt.cigar = cigarlist * alnmt.optional_fields = [ * (field[:2], _parse_SAM_optional_field_value(field)) for field in optional_fields] # <<<<<<<<<<<<<< * alnmt.aQual = int(mapq) * alnmt.inferred_insert_size = int(isize) */ - __pyx_slice__45 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__45)) __PYX_ERR(0, 1444, __pyx_L1_error) - __Pyx_GOTREF(__pyx_slice__45); - __Pyx_GIVEREF(__pyx_slice__45); + __pyx_slice__37 = PySlice_New(Py_None, __pyx_int_2, Py_None); if (unlikely(!__pyx_slice__37)) __PYX_ERR(0, 1456, __pyx_L1_error) + __Pyx_GOTREF(__pyx_slice__37); + __Pyx_GIVEREF(__pyx_slice__37); - /* "HTSeq/_HTSeq.pyx":1505 + /* "HTSeq/_HTSeq.pyx":1517 * query_start = self.iv * else: * query_start = GenomicPosition("*", -1) # <<<<<<<<<<<<<< * * if self.mate_start is not None: */ - __pyx_tuple__46 = PyTuple_Pack(2, __pyx_kp_u__41, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 1505, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__46); - __Pyx_GIVEREF(__pyx_tuple__46); - - /* "HTSeq/_HTSeq.pyx":1510 - * mate_start = self.mate_start - * else: - * mate_start = GenomicPosition("*", -1) # <<<<<<<<<<<<<< - * - * if self.cigar is not None: - */ - __pyx_tuple__47 = PyTuple_Pack(2, __pyx_kp_u__41, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 1510, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__47); - __Pyx_GIVEREF(__pyx_tuple__47); + __pyx_tuple__38 = PyTuple_Pack(2, __pyx_kp_u__34, __pyx_int_neg_1); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 1517, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__38); + __Pyx_GIVEREF(__pyx_tuple__38); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":229 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":272 * if ((flags & pybuf.PyBUF_C_CONTIGUOUS == pybuf.PyBUF_C_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_C_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_C_CONTIGUOUS)): * raise ValueError(u"ndarray is not C contiguous") # <<<<<<<<<<<<<< * * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) */ - __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(3, 229, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__50); - __Pyx_GIVEREF(__pyx_tuple__50); + __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_C_contiguous); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(3, 272, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__41); + __Pyx_GIVEREF(__pyx_tuple__41); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":233 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":276 * if ((flags & pybuf.PyBUF_F_CONTIGUOUS == pybuf.PyBUF_F_CONTIGUOUS) - * and not PyArray_CHKFLAGS(self, NPY_F_CONTIGUOUS)): + * and not PyArray_CHKFLAGS(self, NPY_ARRAY_F_CONTIGUOUS)): * raise ValueError(u"ndarray is not Fortran contiguous") # <<<<<<<<<<<<<< * * info.buf = PyArray_DATA(self) */ - __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(3, 233, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__51); - __Pyx_GIVEREF(__pyx_tuple__51); + __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_u_ndarray_is_not_Fortran_contiguou); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(3, 276, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__42); + __Pyx_GIVEREF(__pyx_tuple__42); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":263 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":306 * if ((descr.byteorder == c'>' and little_endian) or * (descr.byteorder == c'<' and not little_endian)): * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< * if t == NPY_BYTE: f = "b" * elif t == NPY_UBYTE: f = "B" */ - __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(3, 263, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__52); - __Pyx_GIVEREF(__pyx_tuple__52); + __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(3, 306, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__43); + __Pyx_GIVEREF(__pyx_tuple__43); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":810 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":856 * * if (end - f) - (new_offset - offset[0]) < 15: * raise RuntimeError(u"Format string allocated too short, see comment in numpy.pxd") # <<<<<<<<<<<<<< * * if ((child.byteorder == c'>' and little_endian) or */ - __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(3, 810, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__53); - __Pyx_GIVEREF(__pyx_tuple__53); - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":814 - * if ((child.byteorder == c'>' and little_endian) or - * (child.byteorder == c'<' and not little_endian)): - * raise ValueError(u"Non-native byte order not supported") # <<<<<<<<<<<<<< - * # One could encode it in the format string and have Cython - * # complain instead, BUT: < and > in format strings also imply - */ - __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_u_Non_native_byte_order_not_suppor); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(3, 814, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__54); - __Pyx_GIVEREF(__pyx_tuple__54); + __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(3, 856, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__44); + __Pyx_GIVEREF(__pyx_tuple__44); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":834 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":880 * t = child.type_num * if end - f < 5: * raise RuntimeError(u"Format string allocated too short.") # <<<<<<<<<<<<<< * * # Until ticket #99 is fixed, use integers to avoid warnings */ - __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(3, 834, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__55); - __Pyx_GIVEREF(__pyx_tuple__55); + __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_u_Format_string_allocated_too_shor_2); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(3, 880, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__45); + __Pyx_GIVEREF(__pyx_tuple__45); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1000 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1038 * _import_array() * except Exception: * raise ImportError("numpy.core.multiarray failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_umath() except -1: */ - __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(3, 1000, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__56); - __Pyx_GIVEREF(__pyx_tuple__56); + __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_multiarray_failed_to); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(3, 1038, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__46); + __Pyx_GIVEREF(__pyx_tuple__46); - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1006 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1044 * _import_umath() * except Exception: * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< * * cdef inline int import_ufunc() except -1: */ - __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(3, 1006, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__57); - __Pyx_GIVEREF(__pyx_tuple__57); - - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1012 - * _import_umath() - * except Exception: - * raise ImportError("numpy.core.umath failed to import") # <<<<<<<<<<<<<< - */ - __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(3, 1012, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__58); - __Pyx_GIVEREF(__pyx_tuple__58); + __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_u_numpy_core_umath_failed_to_impor); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(3, 1044, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__47); + __Pyx_GIVEREF(__pyx_tuple__47); /* "HTSeq/_HTSeq.pyx":253 * @@ -46765,10 +45667,10 @@ * strand = intern(strand) * if strand.se is not strand_minus: */ - __pyx_tuple__59 = PyTuple_Pack(4, __pyx_n_s_chrom, __pyx_n_s_start_d, __pyx_n_s_length, __pyx_n_s_strand); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 253, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__59); - __Pyx_GIVEREF(__pyx_tuple__59); - __pyx_codeobj__60 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_GenomicInterval_from_directional, 253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__60)) __PYX_ERR(0, 253, __pyx_L1_error) + __pyx_tuple__48 = PyTuple_Pack(4, __pyx_n_s_chrom, __pyx_n_s_start_d, __pyx_n_s_length, __pyx_n_s_strand); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 253, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__48); + __Pyx_GIVEREF(__pyx_tuple__48); + __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_GenomicInterval_from_directional, 253, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 253, __pyx_L1_error) /* "HTSeq/_HTSeq.pyx":477 * @@ -46777,10 +45679,10 @@ * cv = ChromVector() * cv.array = array */ - __pyx_tuple__61 = PyTuple_Pack(6, __pyx_n_s_array, __pyx_n_s_iv, __pyx_n_s_offset, __pyx_n_s_is_vector_of_sets, __pyx_n_s_storage_2, __pyx_n_s_cv); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 477, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__61); - __Pyx_GIVEREF(__pyx_tuple__61); - __pyx_codeobj__62 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_ChromVector_unpickle, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__62)) __PYX_ERR(0, 477, __pyx_L1_error) + __pyx_tuple__50 = PyTuple_Pack(6, __pyx_n_s_array, __pyx_n_s_iv, __pyx_n_s_offset, __pyx_n_s_is_vector_of_sets, __pyx_n_s_storage_2, __pyx_n_s_cv); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 477, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__50); + __Pyx_GIVEREF(__pyx_tuple__50); + __pyx_codeobj__51 = (PyObject*)__Pyx_PyCode_New(5, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_ChromVector_unpickle, 477, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__51)) __PYX_ERR(0, 477, __pyx_L1_error) /* "HTSeq/_HTSeq.pyx":615 * @@ -46789,10 +45691,10 @@ * ga = GenomicArray({}, stranded, typecode) * ga.chrom_vectors = chrom_vectors */ - __pyx_tuple__63 = PyTuple_Pack(4, __pyx_n_s_stranded, __pyx_n_s_typecode, __pyx_n_s_chrom_vectors, __pyx_n_s_ga); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 615, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__63); - __Pyx_GIVEREF(__pyx_tuple__63); - __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_GenomicArray_unpickle, 615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 615, __pyx_L1_error) + __pyx_tuple__52 = PyTuple_Pack(4, __pyx_n_s_stranded, __pyx_n_s_typecode, __pyx_n_s_chrom_vectors, __pyx_n_s_ga); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 615, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__52); + __Pyx_GIVEREF(__pyx_tuple__52); + __pyx_codeobj__53 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_GenomicArray_unpickle, 615, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__53)) __PYX_ERR(0, 615, __pyx_L1_error) /* "HTSeq/_HTSeq.pyx":626 * @@ -46801,44 +45703,44 @@ * return bytes.maketrans(b'ACGTacgt', b'TGCAtgca') * */ - __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_make_translation_table_for_comp, 626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 626, __pyx_L1_error) + __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_python3_src_HTSeq__HTSeq_pyx, __pyx_n_s_make_translation_table_for_comp, 626, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 626, __pyx_L1_error) - /* "HTSeq/_HTSeq.pyx":1148 + /* "HTSeq/_HTSeq.pyx":1160 * return True * * _re_cigar_codes = re.compile('([MIDNSHP=X])') # <<<<<<<<<<<<<< * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): */ - __pyx_tuple__66 = PyTuple_Pack(1, __pyx_kp_u_MIDNSHP_X); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 1148, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__66); - __Pyx_GIVEREF(__pyx_tuple__66); + __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_u_MIDNSHP_X); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 1160, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__55); + __Pyx_GIVEREF(__pyx_tuple__55); /* "(tree fragment)":1 * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x77bfdf2: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ - __pyx_tuple__67 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__67); - __Pyx_GIVEREF(__pyx_tuple__67); - __pyx_codeobj__68 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Alignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__68)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__69 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__69)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__69); - __Pyx_GIVEREF(__pyx_tuple__69); - __pyx_codeobj__70 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__69, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AlignmentWithSequ, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__70)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__71 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__71)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__71); - __Pyx_GIVEREF(__pyx_tuple__71); - __pyx_codeobj__72 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__71, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BowtieAlignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__72)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__73 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__73)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__73); - __Pyx_GIVEREF(__pyx_tuple__73); - __pyx_codeobj__74 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__73, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CigarOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__74)) __PYX_ERR(2, 1, __pyx_L1_error) - __pyx_tuple__75 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__75)) __PYX_ERR(2, 1, __pyx_L1_error) - __Pyx_GOTREF(__pyx_tuple__75); - __Pyx_GIVEREF(__pyx_tuple__75); - __pyx_codeobj__76 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__75, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SAM_Alignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__76)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__56 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__56); + __Pyx_GIVEREF(__pyx_tuple__56); + __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_Alignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__58 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__58); + __Pyx_GIVEREF(__pyx_tuple__58); + __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_AlignmentWithSequ, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__60 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__60); + __Pyx_GIVEREF(__pyx_tuple__60); + __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_BowtieAlignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__62 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__62); + __Pyx_GIVEREF(__pyx_tuple__62); + __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_CigarOperation, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(2, 1, __pyx_L1_error) + __pyx_tuple__64 = PyTuple_Pack(5, __pyx_n_s_pyx_type, __pyx_n_s_pyx_checksum, __pyx_n_s_pyx_state, __pyx_n_s_pyx_PickleError, __pyx_n_s_pyx_result); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(2, 1, __pyx_L1_error) + __Pyx_GOTREF(__pyx_tuple__64); + __Pyx_GIVEREF(__pyx_tuple__64); + __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(3, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_SAM_Alignment, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -46846,7 +45748,7 @@ return -1; } -static int __Pyx_InitGlobals(void) { +static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error); __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -46868,13 +45770,13 @@ return -1; } -static int __Pyx_modinit_global_init_code(void); /*proto*/ -static int __Pyx_modinit_variable_export_code(void); /*proto*/ -static int __Pyx_modinit_function_export_code(void); /*proto*/ -static int __Pyx_modinit_type_init_code(void); /*proto*/ -static int __Pyx_modinit_type_import_code(void); /*proto*/ -static int __Pyx_modinit_variable_import_code(void); /*proto*/ -static int __Pyx_modinit_function_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/ +static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/ static int __Pyx_modinit_global_init_code(void) { __Pyx_RefNannyDeclarations @@ -46931,7 +45833,7 @@ } #endif if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_GenomicInterval.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_GenomicInterval) < 0) __PYX_ERR(0, 29, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "GenomicInterval", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicInterval) < 0) __PYX_ERR(0, 29, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GenomicInterval, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicInterval) < 0) __PYX_ERR(0, 29, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_GenomicInterval = &__pyx_type_5HTSeq_6_HTSeq_GenomicInterval; __pyx_vtabptr_5HTSeq_6_HTSeq_GenomicPosition = &__pyx_vtable_5HTSeq_6_HTSeq_GenomicPosition; __pyx_vtable_5HTSeq_6_HTSeq_GenomicPosition.__pyx_base = *__pyx_vtabptr_5HTSeq_6_HTSeq_GenomicInterval; @@ -46942,10 +45844,10 @@ __pyx_type_5HTSeq_6_HTSeq_GenomicPosition.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_GenomicPosition.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_GenomicPosition) < 0) __PYX_ERR(0, 261, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "GenomicPosition", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicPosition) < 0) __PYX_ERR(0, 261, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GenomicPosition, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicPosition) < 0) __PYX_ERR(0, 261, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_GenomicPosition = &__pyx_type_5HTSeq_6_HTSeq_GenomicPosition; __pyx_vtabptr_5HTSeq_6_HTSeq_Sequence = &__pyx_vtable_5HTSeq_6_HTSeq_Sequence; - __pyx_vtable_5HTSeq_6_HTSeq_Sequence.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement; + __pyx_vtable_5HTSeq_6_HTSeq_Sequence.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement; __pyx_vtable_5HTSeq_6_HTSeq_Sequence.add_bases_to_count_array = (PyObject *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_8Sequence_add_bases_to_count_array; __pyx_vtable_5HTSeq_6_HTSeq_Sequence.trim_left_end = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_left_end *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_8Sequence_trim_left_end; __pyx_vtable_5HTSeq_6_HTSeq_Sequence.trim_right_end = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_trim_right_end *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_8Sequence_trim_right_end; @@ -46955,25 +45857,25 @@ __pyx_type_5HTSeq_6_HTSeq_Sequence.tp_getattro = __Pyx_PyObject_GenericGetAttr; } if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_Sequence.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_Sequence) < 0) __PYX_ERR(0, 639, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "Sequence", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_Sequence) < 0) __PYX_ERR(0, 639, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Sequence, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_Sequence) < 0) __PYX_ERR(0, 639, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_Sequence = &__pyx_type_5HTSeq_6_HTSeq_Sequence; __pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities = &__pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.__pyx_base = *__pyx_vtabptr_5HTSeq_6_HTSeq_Sequence; - __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.__pyx_base.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1; + __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.__pyx_base.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_8Sequence_get_reverse_complement *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement__pyx_wrap_1; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities._fill_qual_arr = (PyObject *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities__fill_qual_arr; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.add_qual_to_count_array = (PyObject *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, PyArrayObject *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_add_qual_to_count_array; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.trim_left_end_with_quals = (struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_left_end_with_quals; __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.trim_right_end_with_quals = (struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, struct __pyx_obj_5HTSeq_6_HTSeq_Sequence *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_trim_right_end_with_quals; - __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, int __pyx_skip_dispatch))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement; + __pyx_vtable_5HTSeq_6_HTSeq_SequenceWithQualities.get_reverse_complement = (struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *(*)(struct __pyx_obj_5HTSeq_6_HTSeq_SequenceWithQualities *, int __pyx_skip_dispatch, struct __pyx_opt_args_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement *__pyx_optional_args))__pyx_f_5HTSeq_6_HTSeq_21SequenceWithQualities_get_reverse_complement; __pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_base = __pyx_ptype_5HTSeq_6_HTSeq_Sequence; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 784, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 789, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_getattro = __Pyx_PyObject_GenericGetAttr; } #if CYTHON_COMPILING_IN_CPYTHON { - PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 784, __pyx_L1_error) + PyObject *wrapper = PyObject_GetAttrString((PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 789, __pyx_L1_error) if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) { __pyx_wrapperbase_5HTSeq_6_HTSeq_21SequenceWithQualities___init__ = *((PyWrapperDescrObject *)wrapper)->d_base; __pyx_wrapperbase_5HTSeq_6_HTSeq_21SequenceWithQualities___init__.doc = __pyx_doc_5HTSeq_6_HTSeq_21SequenceWithQualities___init__; @@ -46981,65 +45883,65 @@ } } #endif - if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 784, __pyx_L1_error) - if (PyObject_SetAttrString(__pyx_m, "SequenceWithQualities", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 784, __pyx_L1_error) + if (__Pyx_SetVtable(__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities.tp_dict, __pyx_vtabptr_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 789, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SequenceWithQualities, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities) < 0) __PYX_ERR(0, 789, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_SequenceWithQualities = &__pyx_type_5HTSeq_6_HTSeq_SequenceWithQualities; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 997, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1009, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_Alignment.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_Alignment.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_Alignment.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_Alignment.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "Alignment", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 997, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 997, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Alignment, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1009, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_Alignment) < 0) __PYX_ERR(0, 1009, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_Alignment = &__pyx_type_5HTSeq_6_HTSeq_Alignment; __pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_base = __pyx_ptype_5HTSeq_6_HTSeq_Alignment; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1040, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1052, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "AlignmentWithSequenceReversal", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1040, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1040, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_AlignmentWithSequenceReversal, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1052, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal) < 0) __PYX_ERR(0, 1052, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal = &__pyx_type_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal; __pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_base = __pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1231, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1243, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_SAM_Alignment.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "SAM_Alignment", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1231, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1231, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_SAM_Alignment, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1243, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment) < 0) __PYX_ERR(0, 1243, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment = &__pyx_type_5HTSeq_6_HTSeq_SAM_Alignment; if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_ChromVector) < 0) __PYX_ERR(0, 318, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_ChromVector.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_ChromVector.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_ChromVector.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_ChromVector.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "ChromVector", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_ChromVector) < 0) __PYX_ERR(0, 318, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_ChromVector, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_ChromVector) < 0) __PYX_ERR(0, 318, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_ChromVector = &__pyx_type_5HTSeq_6_HTSeq_ChromVector; if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_GenomicArray) < 0) __PYX_ERR(0, 486, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_GenomicArray.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_GenomicArray.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_GenomicArray.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_GenomicArray.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "GenomicArray", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicArray) < 0) __PYX_ERR(0, 486, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_GenomicArray, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_GenomicArray) < 0) __PYX_ERR(0, 486, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_GenomicArray = &__pyx_type_5HTSeq_6_HTSeq_GenomicArray; __pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_base = __pyx_ptype_5HTSeq_6_HTSeq_AlignmentWithSequenceReversal; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1070, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1082, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_BowtieAlignment.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "BowtieAlignment", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1070, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1070, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_BowtieAlignment, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1082, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment) < 0) __PYX_ERR(0, 1082, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_BowtieAlignment = &__pyx_type_5HTSeq_6_HTSeq_BowtieAlignment; - if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1106, __pyx_L1_error) + if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1118, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq_CigarOperation.tp_print = 0; if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_type_5HTSeq_6_HTSeq_CigarOperation.tp_dictoffset && __pyx_type_5HTSeq_6_HTSeq_CigarOperation.tp_getattro == PyObject_GenericGetAttr)) { __pyx_type_5HTSeq_6_HTSeq_CigarOperation.tp_getattro = __Pyx_PyObject_GenericGetAttr; } - if (PyObject_SetAttrString(__pyx_m, "CigarOperation", (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1106, __pyx_L1_error) - if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1106, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_CigarOperation, (PyObject *)&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1118, __pyx_L1_error) + if (__Pyx_setup_reduce((PyObject*)&__pyx_type_5HTSeq_6_HTSeq_CigarOperation) < 0) __PYX_ERR(0, 1118, __pyx_L1_error) __pyx_ptype_5HTSeq_6_HTSeq_CigarOperation = &__pyx_type_5HTSeq_6_HTSeq_CigarOperation; if (PyType_Ready(&__pyx_type_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__) < 0) __PYX_ERR(0, 442, __pyx_L1_error) __pyx_type_5HTSeq_6_HTSeq___pyx_scope_struct____iadd__.tp_print = 0; @@ -47056,23 +45958,37 @@ static int __Pyx_modinit_type_import_code(void) { __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0); /*--- Type import code ---*/ - __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", + __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(4, 9, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type", #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000 sizeof(PyTypeObject), #else sizeof(PyHeapTypeObject), #endif - 0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) __PYX_ERR(4, 9, __pyx_L1_error) - __pyx_ptype_5numpy_dtype = __Pyx_ImportType("numpy", "dtype", sizeof(PyArray_Descr), 0); if (unlikely(!__pyx_ptype_5numpy_dtype)) __PYX_ERR(3, 164, __pyx_L1_error) - __pyx_ptype_5numpy_flatiter = __Pyx_ImportType("numpy", "flatiter", sizeof(PyArrayIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_flatiter)) __PYX_ERR(3, 186, __pyx_L1_error) - __pyx_ptype_5numpy_broadcast = __Pyx_ImportType("numpy", "broadcast", sizeof(PyArrayMultiIterObject), 0); if (unlikely(!__pyx_ptype_5numpy_broadcast)) __PYX_ERR(3, 190, __pyx_L1_error) - __pyx_ptype_5numpy_ndarray = __Pyx_ImportType("numpy", "ndarray", sizeof(PyArrayObject), 0); if (unlikely(!__pyx_ptype_5numpy_ndarray)) __PYX_ERR(3, 199, __pyx_L1_error) - __pyx_ptype_5numpy_ufunc = __Pyx_ImportType("numpy", "ufunc", sizeof(PyUFuncObject), 0); if (unlikely(!__pyx_ptype_5numpy_ufunc)) __PYX_ERR(3, 872, __pyx_L1_error) + __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(4, 9, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyImport_ImportModule("numpy"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 206, __pyx_L1_error) + __Pyx_GOTREF(__pyx_t_1); + __pyx_ptype_5numpy_dtype = __Pyx_ImportType(__pyx_t_1, "numpy", "dtype", sizeof(PyArray_Descr), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_dtype) __PYX_ERR(3, 206, __pyx_L1_error) + __pyx_ptype_5numpy_flatiter = __Pyx_ImportType(__pyx_t_1, "numpy", "flatiter", sizeof(PyArrayIterObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_flatiter) __PYX_ERR(3, 229, __pyx_L1_error) + __pyx_ptype_5numpy_broadcast = __Pyx_ImportType(__pyx_t_1, "numpy", "broadcast", sizeof(PyArrayMultiIterObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_broadcast) __PYX_ERR(3, 233, __pyx_L1_error) + __pyx_ptype_5numpy_ndarray = __Pyx_ImportType(__pyx_t_1, "numpy", "ndarray", sizeof(PyArrayObject), __Pyx_ImportType_CheckSize_Ignore); + if (!__pyx_ptype_5numpy_ndarray) __PYX_ERR(3, 242, __pyx_L1_error) + __pyx_ptype_5numpy_ufunc = __Pyx_ImportType(__pyx_t_1, "numpy", "ufunc", sizeof(PyUFuncObject), __Pyx_ImportType_CheckSize_Warn); + if (!__pyx_ptype_5numpy_ufunc) __PYX_ERR(3, 918, __pyx_L1_error) + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_RefNannyFinishContext(); return -1; } @@ -47107,15 +46023,6 @@ #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC #endif #endif -#ifndef CYTHON_SMALL_CODE -#if defined(__clang__) - #define CYTHON_SMALL_CODE -#elif defined(__GNUC__) - #define CYTHON_SMALL_CODE __attribute__((optimize("Os"))) -#else - #define CYTHON_SMALL_CODE -#endif -#endif #if PY_MAJOR_VERSION < 3 @@ -47128,11 +46035,36 @@ { return PyModuleDef_Init(&__pyx_moduledef); } -static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) { +static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) { + #if PY_VERSION_HEX >= 0x030700A1 + static PY_INT64_T main_interpreter_id = -1; + PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp); + if (main_interpreter_id == -1) { + main_interpreter_id = current_id; + return (unlikely(current_id == -1)) ? -1 : 0; + } else if (unlikely(main_interpreter_id != current_id)) + #else + static PyInterpreterState *main_interpreter = NULL; + PyInterpreterState *current_interpreter = PyThreadState_Get()->interp; + if (!main_interpreter) { + main_interpreter = current_interpreter; + } else if (unlikely(main_interpreter != current_interpreter)) + #endif + { + PyErr_SetString( + PyExc_ImportError, + "Interpreter change detected - this module can only be loaded into one interpreter per process."); + return -1; + } + return 0; +} +static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none) { PyObject *value = PyObject_GetAttrString(spec, from_name); int result = 0; if (likely(value)) { - result = PyDict_SetItemString(moddict, to_name, value); + if (allow_none || value != Py_None) { + result = PyDict_SetItemString(moddict, to_name, value); + } Py_DECREF(value); } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Clear(); @@ -47141,8 +46073,10 @@ } return result; } -static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { +static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) { PyObject *module = NULL, *moddict, *modname; + if (__Pyx_check_single_interpreter()) + return NULL; if (__pyx_m) return __Pyx_NewRef(__pyx_m); modname = PyObject_GetAttrString(spec, "name"); @@ -47152,10 +46086,10 @@ if (unlikely(!module)) goto bad; moddict = PyModule_GetDict(module); if (unlikely(!moddict)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad; - if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad; + if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad; return module; bad: Py_XDECREF(module); @@ -47163,7 +46097,7 @@ } -static int __pyx_pymod_exec__HTSeq(PyObject *__pyx_pyinit_module) +static CYTHON_SMALL_CODE int __pyx_pymod_exec__HTSeq(PyObject *__pyx_pyinit_module) #endif #endif { @@ -47178,7 +46112,11 @@ PyObject *(*__pyx_t_9)(PyObject *); __Pyx_RefNannyDeclarations #if CYTHON_PEP489_MULTI_PHASE_INIT - if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0; + if (__pyx_m) { + if (__pyx_m == __pyx_pyinit_module) return 0; + PyErr_SetString(PyExc_RuntimeError, "Module '_HTSeq' has already been imported. Re-initialisation is not supported."); + return -1; + } #elif PY_MAJOR_VERSION >= 3 if (__pyx_m) return __Pyx_NewRef(__pyx_m); #endif @@ -47193,6 +46131,9 @@ #endif __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit__HTSeq(void)", 0); if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error) + #ifdef __Pxy_PyFrame_Initialize_Offsets + __Pxy_PyFrame_Initialize_Offsets(); + #endif __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error) __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error) @@ -47247,7 +46188,7 @@ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error) #endif if (__pyx_module_is_main_HTSeq___HTSeq) { - if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) + if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error) } #if PY_MAJOR_VERSION >= 3 { @@ -47570,7 +46511,7 @@ * ncv = cls() * ncv.iv = iv */ - __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_ChromVector, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_ChromVector, __pyx_n_s_create); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); /* "HTSeq/_HTSeq.pyx":326 @@ -47594,7 +46535,7 @@ * if iv.length == 0: * raise IndexError, "Cannot subset to zero-length interval." */ - __pyx_t_5 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_ChromVector, __pyx_n_s_create_view); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_ChromVector, __pyx_n_s_create_view); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 350, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); /* "HTSeq/_HTSeq.pyx":349 @@ -47630,7 +46571,7 @@ * cdef GenomicInterval iv * if length == sys.maxsize: */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_sys); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_maxsize); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 563, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); @@ -47670,7 +46611,7 @@ * * cpdef bytes reverse_complement(bytes seq): */ - __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_make_translation_table_for_comp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_make_translation_table_for_comp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 629, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -47698,53 +46639,53 @@ if (PyDict_SetItem(__pyx_d, __pyx_n_s_base_to_column, __pyx_t_1) < 0) __PYX_ERR(0, 637, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1096 + /* "HTSeq/_HTSeq.pyx":1108 * * cigar_operation_names = { * 'M': 'matched', # <<<<<<<<<<<<<< * 'I': 'inserted', * 'D': 'deleted', */ - __pyx_t_1 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1096, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyDict_NewPresized(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1108, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_M, __pyx_n_u_matched) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_I, __pyx_n_u_inserted) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_D, __pyx_n_u_deleted) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_N, __pyx_n_u_skipped) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_S, __pyx_kp_u_soft_clipped) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_H, __pyx_kp_u_hard_clipped) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_P, __pyx_n_u_padded) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u__38, __pyx_kp_u_sequence_matched) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_X, __pyx_kp_u_sequence_mismatched) < 0) __PYX_ERR(0, 1096, __pyx_L1_error) - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_names, __pyx_t_1) < 0) __PYX_ERR(0, 1095, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_M, __pyx_n_u_matched) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_I, __pyx_n_u_inserted) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_D, __pyx_n_u_deleted) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_N, __pyx_n_u_skipped) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_S, __pyx_kp_u_soft_clipped) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_H, __pyx_kp_u_hard_clipped) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_P, __pyx_n_u_padded) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_kp_u__33, __pyx_kp_u_sequence_matched) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_t_1, __pyx_n_u_X, __pyx_kp_u_sequence_mismatched) < 0) __PYX_ERR(0, 1108, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_names, __pyx_t_1) < 0) __PYX_ERR(0, 1107, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1148 + /* "HTSeq/_HTSeq.pyx":1160 * return True * * _re_cigar_codes = re.compile('([MIDNSHP=X])') # <<<<<<<<<<<<<< * * cpdef list parse_cigar(str cigar_string, int ref_left=0, str chrom="", str strand="."): */ - __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) + __Pyx_GetModuleGlobalName(__pyx_t_1, __pyx_n_s_re); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_compile); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__66, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1148, __pyx_L1_error) + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_re_cigar_codes, __pyx_t_1) < 0) __PYX_ERR(0, 1148, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_re_cigar_codes, __pyx_t_1) < 0) __PYX_ERR(0, 1160, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1227 + /* "HTSeq/_HTSeq.pyx":1239 * raise ValueError, "SAM optional field with illegal type letter '%s'" % field[2] * * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] # <<<<<<<<<<<<<< * cigar_operation_code_dict = dict( * [(x, i) for i, x in enumerate(cigar_operation_codes)]) */ - __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1227, __pyx_L1_error) + __pyx_t_1 = PyList_New(9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1239, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_n_u_M); __Pyx_GIVEREF(__pyx_n_u_M); @@ -47767,16 +46708,16 @@ __Pyx_INCREF(__pyx_n_u_P); __Pyx_GIVEREF(__pyx_n_u_P); PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_u_P); - __Pyx_INCREF(__pyx_kp_u__38); - __Pyx_GIVEREF(__pyx_kp_u__38); - PyList_SET_ITEM(__pyx_t_1, 7, __pyx_kp_u__38); + __Pyx_INCREF(__pyx_kp_u__33); + __Pyx_GIVEREF(__pyx_kp_u__33); + PyList_SET_ITEM(__pyx_t_1, 7, __pyx_kp_u__33); __Pyx_INCREF(__pyx_n_u_X); __Pyx_GIVEREF(__pyx_n_u_X); PyList_SET_ITEM(__pyx_t_1, 8, __pyx_n_u_X); - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_codes, __pyx_t_1) < 0) __PYX_ERR(0, 1227, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_codes, __pyx_t_1) < 0) __PYX_ERR(0, 1239, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "HTSeq/_HTSeq.pyx":1228 + /* "HTSeq/_HTSeq.pyx":1240 * * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] * cigar_operation_code_dict = dict( # <<<<<<<<<<<<<< @@ -47785,26 +46726,26 @@ */ { /* enter inner scope */ - /* "HTSeq/_HTSeq.pyx":1229 + /* "HTSeq/_HTSeq.pyx":1241 * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] * cigar_operation_code_dict = dict( * [(x, i) for i, x in enumerate(cigar_operation_codes)]) # <<<<<<<<<<<<<< * * cdef class SAM_Alignment(AlignmentWithSequenceReversal): */ - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1241, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_int_0); __pyx_t_5 = __pyx_int_0; - __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1229, __pyx_L10_error) + __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_n_s_cigar_operation_codes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_6); if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) { __pyx_t_7 = __pyx_t_6; __Pyx_INCREF(__pyx_t_7); __pyx_t_8 = 0; __pyx_t_9 = NULL; } else { - __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_8 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1241, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_7); - __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_9 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1241, __pyx_L10_error) } __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; for (;;) { @@ -47812,17 +46753,17 @@ if (likely(PyList_CheckExact(__pyx_t_7))) { if (__pyx_t_8 >= 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_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_6 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1241, __pyx_L10_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_6); #endif } else { if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_7)) break; #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS - __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 1241, __pyx_L10_error) #else - __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_6 = PySequence_ITEM(__pyx_t_7, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_6); #endif } @@ -47832,7 +46773,7 @@ PyObject* exc_type = PyErr_Occurred(); if (exc_type) { if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); - else __PYX_ERR(0, 1229, __pyx_L10_error) + else __PYX_ERR(0, 1241, __pyx_L10_error) } break; } @@ -47846,12 +46787,12 @@ __Pyx_XGOTREF(__pyx_8genexpr1__pyx_v_5HTSeq_6_HTSeq_i); __Pyx_DECREF_SET(__pyx_8genexpr1__pyx_v_5HTSeq_6_HTSeq_i, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); - __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = __pyx_t_6; __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1229, __pyx_L10_error) + __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1241, __pyx_L10_error) __Pyx_GOTREF(__pyx_t_6); __Pyx_INCREF(__pyx_8genexpr1__pyx_v_5HTSeq_6_HTSeq_x); __Pyx_GIVEREF(__pyx_8genexpr1__pyx_v_5HTSeq_6_HTSeq_x); @@ -47859,7 +46800,7 @@ __Pyx_INCREF(__pyx_8genexpr1__pyx_v_5HTSeq_6_HTSeq_i); __Pyx_GIVEREF(__pyx_8genexpr1__pyx_v_5HTSeq_6_HTSeq_i); PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_8genexpr1__pyx_v_5HTSeq_6_HTSeq_i); - if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1229, __pyx_L10_error) + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) __PYX_ERR(0, 1241, __pyx_L10_error) __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; } __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; @@ -47878,102 +46819,102 @@ __pyx_L13_exit_scope:; } /* exit inner scope */ - /* "HTSeq/_HTSeq.pyx":1228 + /* "HTSeq/_HTSeq.pyx":1240 * * cigar_operation_codes = ['M', 'I', 'D', 'N', 'S', 'H', 'P', '=', 'X'] * cigar_operation_code_dict = dict( # <<<<<<<<<<<<<< * [(x, i) for i, x in enumerate(cigar_operation_codes)]) * */ - __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1228, __pyx_L1_error) + __pyx_t_5 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_code_dict, __pyx_t_5) < 0) __PYX_ERR(0, 1228, __pyx_L1_error) + if (PyDict_SetItem(__pyx_d, __pyx_n_s_cigar_operation_code_dict, __pyx_t_5) < 0) __PYX_ERR(0, 1240, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - /* "HTSeq/_HTSeq.pyx":1306 + /* "HTSeq/_HTSeq.pyx":1318 * * @classmethod * def from_pysam_AlignedRead(cls, read, samfile): # <<<<<<<<<<<<<< * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: */ - __pyx_t_5 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_pysam_AlignedRead); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_pysam_AlignedRead); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1305 + /* "HTSeq/_HTSeq.pyx":1317 * return a * * @classmethod # <<<<<<<<<<<<<< * def from_pysam_AlignedRead(cls, read, samfile): * strand = "-" if read.is_reverse else "+" */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1305, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1317, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_pysam_AlignedRead, __pyx_t_1) < 0) __PYX_ERR(0, 1306, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_pysam_AlignedRead, __pyx_t_1) < 0) __PYX_ERR(0, 1318, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment); - /* "HTSeq/_HTSeq.pyx":1351 + /* "HTSeq/_HTSeq.pyx":1363 * * @classmethod * def from_pysam_AlignedSegment(cls, read, samfile): # <<<<<<<<<<<<<< * strand = "-" if read.is_reverse else "+" * if not read.is_unmapped: */ - __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_pysam_AlignedSegment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1351, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_1, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_pysam_AlignedSegment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); - /* "HTSeq/_HTSeq.pyx":1350 + /* "HTSeq/_HTSeq.pyx":1362 * return a * * @classmethod # <<<<<<<<<<<<<< * def from_pysam_AlignedSegment(cls, read, samfile): * strand = "-" if read.is_reverse else "+" */ - __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1350, __pyx_L1_error) + __pyx_t_5 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_pysam_AlignedSegment, __pyx_t_5) < 0) __PYX_ERR(0, 1351, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_pysam_AlignedSegment, __pyx_t_5) < 0) __PYX_ERR(0, 1363, __pyx_L1_error) __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; PyType_Modified(__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment); - /* "HTSeq/_HTSeq.pyx":1395 + /* "HTSeq/_HTSeq.pyx":1407 * * @classmethod * def from_SAM_line(cls, line): # <<<<<<<<<<<<<< * cdef str qname, flag, rname, pos, mapq, cigar, * cdef str mrnm, mpos, isize, seq, qual */ - __pyx_t_5 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_SAM_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1395, __pyx_L1_error) + __Pyx_GetNameInClass(__pyx_t_5, (PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment, __pyx_n_s_from_SAM_line); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_5); - /* "HTSeq/_HTSeq.pyx":1394 + /* "HTSeq/_HTSeq.pyx":1406 * return a * * @classmethod # <<<<<<<<<<<<<< * def from_SAM_line(cls, line): * cdef str qname, flag, rname, pos, mapq, cigar, */ - __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1394, __pyx_L1_error) + __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_SAM_line, __pyx_t_1) < 0) __PYX_ERR(0, 1395, __pyx_L1_error) + if (PyDict_SetItem((PyObject *)__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment->tp_dict, __pyx_n_s_from_SAM_line, __pyx_t_1) < 0) __PYX_ERR(0, 1407, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_5HTSeq_6_HTSeq_SAM_Alignment); /* "(tree fragment)":1 * def __pyx_unpickle_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x77bfdf2: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5HTSeq_6_HTSeq_17__pyx_unpickle_Alignment, NULL, __pyx_n_s_HTSeq__HTSeq); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Alignment, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_Alignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_Alignment__set_state(Alignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -47987,15 +46928,15 @@ /* "(tree fragment)":1 * def __pyx_unpickle_BowtieAlignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0x482c176: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5HTSeq_6_HTSeq_21__pyx_unpickle_BowtieAlignment, NULL, __pyx_n_s_HTSeq__HTSeq); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_BowtieAlignment, __pyx_t_1) < 0) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "(tree fragment)":9 + /* "(tree fragment)":11 * __pyx_unpickle_BowtieAlignment__set_state( __pyx_result, __pyx_state) * return __pyx_result * cdef __pyx_unpickle_BowtieAlignment__set_state(BowtieAlignment __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<< @@ -48009,8 +46950,8 @@ /* "(tree fragment)":1 * def __pyx_unpickle_SAM_Alignment(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<< - * if __pyx_checksum != 0xf6933f3: - * from pickle import PickleError as __pyx_PickleError + * cdef object __pyx_PickleError + * cdef object __pyx_result */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5HTSeq_6_HTSeq_25__pyx_unpickle_SAM_Alignment, NULL, __pyx_n_s_HTSeq__HTSeq); if (unlikely(!__pyx_t_1)) __PYX_ERR(2, 1, __pyx_L1_error) __Pyx_GOTREF(__pyx_t_1); @@ -48027,7 +46968,7 @@ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error) __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "../../../../../../usr/lib/python3.6/site-packages/Cython/Includes/numpy/__init__.pxd":1008 + /* "../../../../../usr/lib/python3.7/site-packages/Cython/Includes/numpy/__init__.pxd":1046 * raise ImportError("numpy.core.umath failed to import") * * cdef inline int import_ufunc() except -1: # <<<<<<<<<<<<<< @@ -48045,9 +46986,9 @@ __Pyx_XDECREF(__pyx_t_7); if (__pyx_m) { if (__pyx_d) { - __Pyx_AddTraceback("init HTSeq._HTSeq", 0, __pyx_lineno, __pyx_filename); + __Pyx_AddTraceback("init HTSeq._HTSeq", __pyx_clineno, __pyx_lineno, __pyx_filename); } - Py_DECREF(__pyx_m); __pyx_m = 0; + Py_CLEAR(__pyx_m); } else if (!PyErr_Occurred()) { PyErr_SetString(PyExc_ImportError, "init HTSeq._HTSeq"); } @@ -48068,9 +47009,9 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { PyObject *m = NULL, *p = NULL; void *r = NULL; - m = PyImport_ImportModule((char *)modname); + m = PyImport_ImportModule(modname); if (!m) goto end; - p = PyObject_GetAttrString(m, (char *)"RefNannyAPI"); + p = PyObject_GetAttrString(m, "RefNannyAPI"); if (!p) goto end; r = PyLong_AsVoidPtr(p); end: @@ -48483,32 +47424,8 @@ } #endif -/* PyCFunctionFastCall */ -#if CYTHON_FAST_PYCCALL -static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { - PyCFunctionObject *func = (PyCFunctionObject*)func_obj; - PyCFunction meth = PyCFunction_GET_FUNCTION(func); - PyObject *self = PyCFunction_GET_SELF(func); - int flags = PyCFunction_GET_FLAGS(func); - assert(PyCFunction_Check(func)); - assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS))); - assert(nargs >= 0); - assert(nargs == 0 || args != NULL); - /* _PyCFunction_FastCallDict() must not be called with an exception set, - because it may clear it (directly or indirectly) and so the - caller loses its exception */ - assert(!PyErr_Occurred()); - if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { - return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL); - } else { - return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs); - } -} -#endif - /* PyFunctionFastCall */ #if CYTHON_FAST_PYCALL -#include "frameobject.h" static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na, PyObject *globals) { PyFrameObject *f; @@ -48526,7 +47443,7 @@ if (f == NULL) { return NULL; } - fastlocals = f->f_localsplus; + fastlocals = __Pyx_PyFrame_GetLocalsplus(f); for (i = 0; i < na; i++) { Py_INCREF(*args); fastlocals[i] = *args++; @@ -48666,6 +47583,51 @@ } #endif +/* PyObjectCallNoArg */ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { +#if CYTHON_FAST_PYCALL + if (PyFunction_Check(func)) { + return __Pyx_PyFunction_FastCall(func, NULL, 0); + } +#endif +#ifdef __Pyx_CyFunction_USED + if (likely(PyCFunction_Check(func) || __Pyx_CyFunction_Check(func))) +#else + if (likely(PyCFunction_Check(func))) +#endif + { + if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { + return __Pyx_PyObject_CallMethO(func, NULL); + } + } + return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); +} +#endif + +/* PyCFunctionFastCall */ +#if CYTHON_FAST_PYCCALL +static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) { + PyCFunctionObject *func = (PyCFunctionObject*)func_obj; + PyCFunction meth = PyCFunction_GET_FUNCTION(func); + PyObject *self = PyCFunction_GET_SELF(func); + int flags = PyCFunction_GET_FLAGS(func); + assert(PyCFunction_Check(func)); + assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS | METH_STACKLESS))); + assert(nargs >= 0); + assert(nargs == 0 || args != NULL); + /* _PyCFunction_FastCallDict() must not be called with an exception set, + because it may clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!PyErr_Occurred()); + if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) { + return (*((__Pyx_PyCFunctionFastWithKeywords)(void*)meth)) (self, args, nargs, NULL); + } else { + return (*((__Pyx_PyCFunctionFast)(void*)meth)) (self, args, nargs); + } +} +#endif + /* PyObjectCallOneArg */ #if CYTHON_COMPILING_IN_CPYTHON static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) { @@ -48706,42 +47668,21 @@ } #endif -/* PyObjectCallNoArg */ -#if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) { -#if CYTHON_FAST_PYCALL - if (PyFunction_Check(func)) { - return __Pyx_PyFunction_FastCall(func, NULL, 0); - } -#endif -#ifdef __Pyx_CyFunction_USED - if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) { -#else - if (likely(PyCFunction_Check(func))) { -#endif - if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) { - return __Pyx_PyObject_CallMethO(func, NULL); - } - } - return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL); -} -#endif - /* RaiseTooManyValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { +static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected); } /* RaiseNeedMoreValuesToUnpack */ - static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { +static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } /* IterFinish */ - static CYTHON_INLINE int __Pyx_IterFinish(void) { +static CYTHON_INLINE int __Pyx_IterFinish(void) { #if CYTHON_FAST_THREAD_STATE PyThreadState *tstate = __Pyx_PyThreadState_Current; PyObject* exc_type = tstate->curexc_type; @@ -48776,7 +47717,7 @@ } /* UnpackItemEndCheck */ - static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { +static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) { if (unlikely(retval)) { Py_DECREF(retval); __Pyx_RaiseTooManyValuesError(expected); @@ -48788,7 +47729,7 @@ } /* PyObjectFormatAndDecref */ - static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { +static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) { if (unlikely(!s)) return NULL; if (likely(PyUnicode_CheckExact(s))) return s; #if PY_MAJOR_VERSION < 3 @@ -48807,14 +47748,14 @@ } /* PyUnicode_Unicode */ - static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) { if (unlikely(obj == Py_None)) obj = __pyx_kp_u_None; return __Pyx_NewRef(obj); } /* CIntToDigits */ - static const char DIGIT_PAIRS_10[2*10*10+1] = { +static const char DIGIT_PAIRS_10[2*10*10+1] = { "00010203040506070809" "10111213141516171819" "20212223242526272829" @@ -48842,7 +47783,7 @@ }; /* BuildPyUnicode */ - static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, +static PyObject* __Pyx_PyUnicode_BuildFromAscii(Py_ssize_t ulength, char* chars, int clength, int prepend_sign, char padding_char) { PyObject *uval; Py_ssize_t uoffset = ulength - clength; @@ -48916,7 +47857,7 @@ } /* CIntToPyUnicode */ - #ifdef _MSC_VER +#ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned short uint16_t; @@ -48934,7 +47875,7 @@ Py_ssize_t length, ulength; int prepend_sign, last_one_off; long remaining; - const long neg_one = (long) -1, const_zero = (long) 0; + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; @@ -48995,34 +47936,42 @@ } /* GetModuleGlobalName */ - static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { +#if CYTHON_USE_DICT_VERSIONS +static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value) +#else +static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name) +#endif +{ PyObject *result; #if !CYTHON_AVOID_BORROWED_REFS #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { - Py_INCREF(result); + return __Pyx_NewRef(result); } else if (unlikely(PyErr_Occurred())) { - result = NULL; - } else { + return NULL; + } #else result = PyDict_GetItem(__pyx_d, name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) if (likely(result)) { - Py_INCREF(result); - } else { + return __Pyx_NewRef(result); + } #endif #else result = PyObject_GetItem(__pyx_d, name); - if (!result) { - PyErr_Clear(); -#endif - result = __Pyx_GetBuiltinName(name); + __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version) + if (likely(result)) { + return __Pyx_NewRef(result); } - return result; + PyErr_Clear(); +#endif + return __Pyx_GetBuiltinName(name); } /* JoinPyUnicode */ - static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, +static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength, CYTHON_UNUSED Py_UCS4 max_char) { #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS PyObject *result_uval; @@ -49083,8 +48032,37 @@ #endif } +/* PyObjectCall2Args */ +static CYTHON_UNUSED PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) { + PyObject *args, *result = NULL; + #if CYTHON_FAST_PYCALL + if (PyFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyFunction_FastCall(function, args, 2); + } + #endif + #if CYTHON_FAST_PYCCALL + if (__Pyx_PyFastCFunction_Check(function)) { + PyObject *args[2] = {arg1, arg2}; + return __Pyx_PyCFunction_FastCall(function, args, 2); + } + #endif + args = PyTuple_New(2); + if (unlikely(!args)) goto done; + Py_INCREF(arg1); + PyTuple_SET_ITEM(args, 0, arg1); + Py_INCREF(arg2); + PyTuple_SET_ITEM(args, 1, arg2); + Py_INCREF(function); + result = __Pyx_PyObject_Call(function, args, NULL); + Py_DECREF(args); + Py_DECREF(function); +done: + return result; +} + /* BytesEquals */ - static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -49131,7 +48109,7 @@ } /* UnicodeEquals */ - static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { +static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) { #if CYTHON_COMPILING_IN_PYPY return PyObject_RichCompareBool(s1, s2, equals); #else @@ -49210,6 +48188,9 @@ } else { int result; PyObject* py_result = PyObject_RichCompare(s1, s2, equals); + #if PY_MAJOR_VERSION < 3 + Py_XDECREF(owned_ref); + #endif if (!py_result) return -1; result = __Pyx_PyObject_IsTrue(py_result); @@ -49230,7 +48211,7 @@ } /* PyObjectFormat */ - #if CYTHON_USE_UNICODE_WRITER +#if CYTHON_USE_UNICODE_WRITER static PyObject* __Pyx_PyObject_Format(PyObject* obj, PyObject* format_spec) { int ret; _PyUnicodeWriter writer; @@ -49266,7 +48247,7 @@ #endif /* SliceObject */ - static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, +static CYTHON_INLINE int __Pyx_PyObject_SetSlice(PyObject* obj, PyObject* value, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { @@ -49363,9 +48344,8 @@ return -1; } -/* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY -static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { +/* 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; } @@ -49373,89 +48353,66 @@ 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; - } + if (a == b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } #endif #if CYTHON_USE_PYLONG_INTERNALS if (likely(PyLong_CheckExact(op1))) { - const long b = intval; - long a; + int unequal; + unsigned long uintval; + Py_ssize_t size = Py_SIZE(op1); const digit* digits = ((PyLongObject*)op1)->ob_digit; - const Py_ssize_t size = Py_SIZE(op1); - if (likely(__Pyx_sst_abs(size) <= 1)) { - a = likely(size) ? digits[0] : 0; - if (size == -1) a = -a; + 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 { - switch (size) { - case -2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 2: - if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) { - a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case -3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 3: - if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) { - a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case -4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - case 4: - if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) { - a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])); - break; - } - CYTHON_FALLTHROUGH; - #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15 - default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ); - #else - default: Py_RETURN_FALSE; - #endif - } - } - if (a == b) { - Py_RETURN_TRUE; - } 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; - } + if ((double)a == (double)b) Py_RETURN_TRUE; else Py_RETURN_FALSE; } - return PyObject_RichCompare(op1, op2, Py_EQ); + return ( + PyObject_RichCompare(op1, op2, Py_EQ)); } -#endif /* GetItemInt */ - static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { +static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { PyObject *r; if (!j) return NULL; r = PyObject_GetItem(o, j); @@ -49470,7 +48427,7 @@ if (wraparound & unlikely(i < 0)) { wrapped_i += PyList_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) { PyObject *r = PyList_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -49488,7 +48445,7 @@ if (wraparound & unlikely(i < 0)) { wrapped_i += PyTuple_GET_SIZE(o); } - if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, wrapped_i); Py_INCREF(r); return r; @@ -49504,7 +48461,7 @@ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS if (is_list || PyList_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { + if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) { PyObject *r = PyList_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -49512,7 +48469,7 @@ } else if (PyTuple_CheckExact(o)) { Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) { PyObject *r = PyTuple_GET_ITEM(o, n); Py_INCREF(r); return r; @@ -49542,7 +48499,7 @@ } /* ExtTypeTest */ - static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { +static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; @@ -49555,17 +48512,17 @@ } /* None */ - static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { +static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) { PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname); } /* None */ - static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname); } /* SliceObject */ - static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { @@ -49662,7 +48619,7 @@ } /* FetchCommonType */ - static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { PyObject* fake_module; PyTypeObject* cached_type = NULL; fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); @@ -49701,7 +48658,7 @@ } /* CythonFunction */ - #include +#include static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { @@ -49723,7 +48680,7 @@ return op->func_doc; } static int -__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp = op->func_doc; if (value == NULL) { @@ -49735,7 +48692,7 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 @@ -49750,14 +48707,15 @@ return op->func_name; } static int -__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); return -1; @@ -49769,20 +48727,21 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_qualname); return op->func_qualname; } static int -__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (unlikely(value == NULL || !PyUnicode_Check(value))) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) #else - if (unlikely(value == NULL || !PyString_Check(value))) { + if (unlikely(value == NULL || !PyString_Check(value))) #endif + { PyErr_SetString(PyExc_TypeError, "__qualname__ must be set to a string object"); return -1; @@ -49804,7 +48763,7 @@ return self; } static PyObject * -__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); @@ -49815,7 +48774,7 @@ return op->func_dict; } static int -__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) +__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, CYTHON_UNUSED void *context) { PyObject *tmp; if (unlikely(value == NULL)) { @@ -49835,19 +48794,19 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(op->func_globals); return op->func_globals; } static PyObject * -__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { Py_INCREF(Py_None); return Py_None; } static PyObject * -__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = (op->func_code) ? op->func_code : Py_None; Py_INCREF(result); @@ -49876,7 +48835,7 @@ return result; } static int -__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -49892,7 +48851,7 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_tuple; if (unlikely(!result)) { if (op->defaults_getter) { @@ -49906,7 +48865,7 @@ return result; } static int -__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value) { value = Py_None; @@ -49922,7 +48881,7 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->defaults_kwdict; if (unlikely(!result)) { if (op->defaults_getter) { @@ -49936,7 +48895,7 @@ return result; } static int -__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, CYTHON_UNUSED void *context) { PyObject* tmp; if (!value || value == Py_None) { value = NULL; @@ -49952,7 +48911,7 @@ return 0; } static PyObject * -__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *context) { PyObject* result = op->func_annotations; if (unlikely(!result)) { result = PyDict_New(); @@ -50132,7 +49091,7 @@ return (*meth)(self, arg); break; case METH_VARARGS | METH_KEYWORDS: - return (*(PyCFunctionWithKeywords)meth)(self, arg, kw); + return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw); case METH_NOARGS: if (likely(kw == NULL || PyDict_Size(kw) == 0)) { size = PyTuple_GET_SIZE(arg); @@ -50295,7 +49254,7 @@ } /* ObjectGetItem */ - #if CYTHON_USE_TYPE_SLOTS +#if CYTHON_USE_TYPE_SLOTS static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject* index) { PyObject *runerr; Py_ssize_t key_value; @@ -50324,16 +49283,21 @@ #endif /* DictGetItem */ - #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY +#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) { PyObject *value; value = PyDict_GetItemWithError(d, key); if (unlikely(!value)) { if (!PyErr_Occurred()) { - PyObject* args = PyTuple_Pack(1, key); - if (likely(args)) - PyErr_SetObject(PyExc_KeyError, args); - Py_XDECREF(args); + if (unlikely(PyTuple_Check(key))) { + PyObject* args = PyTuple_Pack(1, key); + if (likely(args)) { + PyErr_SetObject(PyExc_KeyError, args); + Py_DECREF(args); + } + } else { + PyErr_SetObject(PyExc_KeyError, key); + } } return NULL; } @@ -50343,7 +49307,7 @@ #endif /* GetAttr */ - static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { +static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) { #if CYTHON_USE_TYPE_SLOTS #if PY_MAJOR_VERSION >= 3 if (likely(PyUnicode_Check(n))) @@ -50356,7 +49320,7 @@ } /* HasAttr */ - static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { +static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) { PyObject *r; if (unlikely(!__Pyx_PyBaseString_Check(n))) { PyErr_SetString(PyExc_TypeError, @@ -50373,22 +49337,112 @@ } } -/* PyObjectCallMethod0 */ - static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { - PyObject *method, *result = NULL; - method = __Pyx_PyObject_GetAttrStr(obj, method_name); - if (unlikely(!method)) goto bad; -#if CYTHON_UNPACK_METHODS - if (likely(PyMethod_Check(method))) { - PyObject *self = PyMethod_GET_SELF(method); - if (likely(self)) { - PyObject *function = PyMethod_GET_FUNCTION(method); - result = __Pyx_PyObject_CallOneArg(function, self); - Py_DECREF(method); - return result; +/* PyObjectGetMethod */ +static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) { + PyObject *attr; +#if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP + PyTypeObject *tp = Py_TYPE(obj); + PyObject *descr; + descrgetfunc f = NULL; + PyObject **dictptr, *dict; + int meth_found = 0; + assert (*method == NULL); + if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) { + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; + } + if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) { + return 0; + } + descr = _PyType_Lookup(tp, name); + if (likely(descr != NULL)) { + Py_INCREF(descr); +#if PY_MAJOR_VERSION >= 3 + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr) || (Py_TYPE(descr) == &PyMethodDescr_Type))) + #endif +#else + #ifdef __Pyx_CyFunction_USED + if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr))) + #else + if (likely(PyFunction_Check(descr))) + #endif +#endif + { + meth_found = 1; + } else { + f = Py_TYPE(descr)->tp_descr_get; + if (f != NULL && PyDescr_IsData(descr)) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } } } + dictptr = _PyObject_GetDictPtr(obj); + if (dictptr != NULL && (dict = *dictptr) != NULL) { + Py_INCREF(dict); + attr = __Pyx_PyDict_GetItemStr(dict, name); + if (attr != NULL) { + Py_INCREF(attr); + Py_DECREF(dict); + Py_XDECREF(descr); + goto try_unpack; + } + Py_DECREF(dict); + } + if (meth_found) { + *method = descr; + return 1; + } + if (f != NULL) { + attr = f(descr, obj, (PyObject *)Py_TYPE(obj)); + Py_DECREF(descr); + goto try_unpack; + } + if (descr != NULL) { + *method = descr; + return 0; + } + PyErr_Format(PyExc_AttributeError, +#if PY_MAJOR_VERSION >= 3 + "'%.50s' object has no attribute '%U'", + tp->tp_name, name); +#else + "'%.50s' object has no attribute '%.400s'", + tp->tp_name, PyString_AS_STRING(name)); #endif + return 0; +#else + attr = __Pyx_PyObject_GetAttrStr(obj, name); + goto try_unpack; +#endif +try_unpack: +#if CYTHON_UNPACK_METHODS + if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) { + PyObject *function = PyMethod_GET_FUNCTION(attr); + Py_INCREF(function); + Py_DECREF(attr); + *method = function; + return 1; + } +#endif + *method = attr; + return 0; +} + +/* PyObjectCallMethod0 */ +static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) { + PyObject *method = NULL, *result = NULL; + int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method); + if (likely(is_method)) { + result = __Pyx_PyObject_CallOneArg(method, obj); + Py_DECREF(method); + return result; + } + if (unlikely(!method)) goto bad; result = __Pyx_PyObject_CallNoArg(method); Py_DECREF(method); bad: @@ -50396,12 +49450,12 @@ } /* RaiseNoneIterError */ - static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { +static CYTHON_INLINE void __Pyx_RaiseNoneNotIterableError(void) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); } /* UnpackTupleError */ - static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { +static void __Pyx_UnpackTupleError(PyObject *t, Py_ssize_t index) { if (t == Py_None) { __Pyx_RaiseNoneNotIterableError(); } else if (PyTuple_GET_SIZE(t) < index) { @@ -50412,7 +49466,7 @@ } /* UnpackTuple2 */ - static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( +static CYTHON_INLINE int __Pyx_unpack_tuple2_exact( PyObject* tuple, PyObject** pvalue1, PyObject** pvalue2, int decref_tuple) { PyObject *value1 = NULL, *value2 = NULL; #if CYTHON_COMPILING_IN_PYPY @@ -50464,7 +49518,7 @@ } /* dict_iter */ - static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, +static CYTHON_INLINE PyObject* __Pyx_dict_iterator(PyObject* iterable, int is_dict, PyObject* method_name, Py_ssize_t* p_orig_length, int* p_source_is_dict) { is_dict = is_dict || likely(PyDict_CheckExact(iterable)); *p_source_is_dict = is_dict; @@ -50577,7 +49631,7 @@ } /* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_SubtractObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { @@ -50699,7 +49753,7 @@ #endif /* decode_c_bytes */ - static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( +static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes( const char* cstring, Py_ssize_t length, Py_ssize_t start, Py_ssize_t stop, const char* encoding, const char* errors, PyObject* (*decode_func)(const char *s, Py_ssize_t size, const char *errors)) { @@ -50726,7 +49780,7 @@ } /* CIntToPyUnicode */ - #ifdef _MSC_VER +#ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned short uint16_t; @@ -50744,7 +49798,7 @@ Py_ssize_t length, ulength; int prepend_sign, last_one_off; Py_ssize_t remaining; - const Py_ssize_t neg_one = (Py_ssize_t) -1, const_zero = (Py_ssize_t) 0; + const Py_ssize_t neg_one = (Py_ssize_t) ((Py_ssize_t) 0 - (Py_ssize_t) 1), const_zero = (Py_ssize_t) 0; const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; @@ -50805,7 +49859,7 @@ } /* unicode_tailmatch */ - static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings, +static int __Pyx_PyUnicode_TailmatchTuple(PyObject* s, PyObject* substrings, Py_ssize_t start, Py_ssize_t end, int direction) { Py_ssize_t i, count = PyTuple_GET_SIZE(substrings); for (i = 0; i < count; i++) { @@ -50834,7 +49888,7 @@ } /* PyIntBinop */ - #if !CYTHON_COMPILING_IN_PYPY +#if !CYTHON_COMPILING_IN_PYPY static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) { #if PY_MAJOR_VERSION < 3 if (likely(PyInt_CheckExact(op1))) { @@ -50956,7 +50010,7 @@ #endif /* IsLittleEndian */ - static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) +static CYTHON_INLINE int __Pyx_Is_Little_Endian(void) { union { uint32_t u32; @@ -50967,7 +50021,7 @@ } /* BufferFormatCheck */ - static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, +static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx, __Pyx_BufFmt_StackElem* stack, __Pyx_TypeInfo* type) { stack[0].field = &ctx->root; @@ -51469,7 +50523,7 @@ } /* BufferGetAndValidate */ - static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { + static CYTHON_INLINE void __Pyx_SafeReleaseBuffer(Py_buffer* info) { if (unlikely(info->buf == NULL)) return; if (info->suboffsets == __Pyx_minusones) info->suboffsets = NULL; __Pyx_ReleaseBuffer(info); @@ -51516,19 +50570,19 @@ } /* BufferIndexError */ - static void __Pyx_RaiseBufferIndexError(int axis) { + static void __Pyx_RaiseBufferIndexError(int axis) { PyErr_Format(PyExc_IndexError, "Out of bounds on buffer access (axis %d)", axis); } /* BufferFallbackError */ - static void __Pyx_RaiseBufferFallbackError(void) { + static void __Pyx_RaiseBufferFallbackError(void) { PyErr_SetString(PyExc_ValueError, "Buffer acquisition failed on assignment; and then reacquiring the old buffer failed too!"); } /* PyErrExceptionMatches */ - #if CYTHON_FAST_THREAD_STATE + #if CYTHON_FAST_THREAD_STATE static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { Py_ssize_t i, n; n = PyTuple_GET_SIZE(tuple); @@ -51553,7 +50607,7 @@ #endif /* GetAttr3 */ - static PyObject *__Pyx_GetAttr3Default(PyObject *d) { + static PyObject *__Pyx_GetAttr3Default(PyObject *d) { __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) @@ -51568,7 +50622,7 @@ } /* CIntToPyUnicode */ - #ifdef _MSC_VER + #ifdef _MSC_VER #ifndef _MSC_STDINT_H_ #if _MSC_VER < 1300 typedef unsigned short uint16_t; @@ -51586,7 +50640,7 @@ Py_ssize_t length, ulength; int prepend_sign, last_one_off; int remaining; - const int neg_one = (int) -1, const_zero = (int) 0; + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (format_char == 'X') { hex_digits += 16; @@ -51647,27 +50701,43 @@ } /* None */ - static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { + static CYTHON_INLINE Py_ssize_t __Pyx_mod_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t r = a % b; r += ((r != 0) & ((r ^ b) < 0)) * b; return r; } /* None */ - static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { + static CYTHON_INLINE Py_ssize_t __Pyx_div_Py_ssize_t(Py_ssize_t a, Py_ssize_t b) { Py_ssize_t q = a / b; Py_ssize_t r = a - q*b; q -= ((r != 0) & ((r ^ b) < 0)); return q; } +/* GetTopmostException */ + #if CYTHON_USE_EXC_INFO_STACK +static _PyErr_StackItem * +__Pyx_PyErr_GetTopmostException(PyThreadState *tstate) +{ + _PyErr_StackItem *exc_info = tstate->exc_info; + while ((exc_info->exc_type == NULL || exc_info->exc_type == Py_None) && + exc_info->previous_item != NULL) + { + exc_info = exc_info->previous_item; + } + return exc_info; +} +#endif + /* SaveResetException */ - #if CYTHON_FAST_THREAD_STATE + #if CYTHON_FAST_THREAD_STATE static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { - #if PY_VERSION_HEX >= 0x030700A2 - *type = tstate->exc_state.exc_type; - *value = tstate->exc_state.exc_value; - *tb = tstate->exc_state.exc_traceback; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate); + *type = exc_info->exc_type; + *value = exc_info->exc_value; + *tb = exc_info->exc_traceback; #else *type = tstate->exc_type; *value = tstate->exc_value; @@ -51679,13 +50749,14 @@ } static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) { PyObject *tmp_type, *tmp_value, *tmp_tb; - #if PY_VERSION_HEX >= 0x030700A2 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = type; - tstate->exc_state.exc_value = value; - tstate->exc_state.exc_traceback = tb; + #if CYTHON_USE_EXC_INFO_STACK + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = type; + exc_info->exc_value = value; + exc_info->exc_traceback = tb; #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -51701,11 +50772,12 @@ #endif /* GetException */ - #if CYTHON_FAST_THREAD_STATE -static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) { + #if CYTHON_FAST_THREAD_STATE +static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) #else -static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) { +static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) #endif +{ PyObject *local_type, *local_value, *local_tb; #if CYTHON_FAST_THREAD_STATE PyObject *tmp_type, *tmp_value, *tmp_tb; @@ -51738,13 +50810,16 @@ *value = local_value; *tb = local_tb; #if CYTHON_FAST_THREAD_STATE - #if PY_VERSION_HEX >= 0x030700A2 - tmp_type = tstate->exc_state.exc_type; - tmp_value = tstate->exc_state.exc_value; - tmp_tb = tstate->exc_state.exc_traceback; - tstate->exc_state.exc_type = local_type; - tstate->exc_state.exc_value = local_value; - tstate->exc_state.exc_traceback = local_tb; + #if CYTHON_USE_EXC_INFO_STACK + { + _PyErr_StackItem *exc_info = tstate->exc_info; + tmp_type = exc_info->exc_type; + tmp_value = exc_info->exc_value; + tmp_tb = exc_info->exc_traceback; + exc_info->exc_type = local_type; + exc_info->exc_value = local_value; + exc_info->exc_traceback = local_tb; + } #else tmp_type = tstate->exc_type; tmp_value = tstate->exc_value; @@ -51771,14 +50846,14 @@ } /* GetItemIntUnicode */ - static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i, + static CYTHON_INLINE Py_UCS4 __Pyx_GetItemInt_Unicode_Fast(PyObject* ustring, Py_ssize_t i, int wraparound, int boundscheck) { Py_ssize_t length; if (unlikely(__Pyx_PyUnicode_READY(ustring) < 0)) return (Py_UCS4)-1; if (wraparound | boundscheck) { length = __Pyx_PyUnicode_GET_LENGTH(ustring); if (wraparound & unlikely(i < 0)) i += length; - if ((!boundscheck) || likely((0 <= i) & (i < length))) { + if ((!boundscheck) || likely(__Pyx_is_valid_index(i, length))) { return __Pyx_PyUnicode_READ_CHAR(ustring, i); } else { PyErr_SetString(PyExc_IndexError, "string index out of range"); @@ -51790,7 +50865,7 @@ } /* PyUnicode_Substring */ - static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( + static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Substring( PyObject* text, Py_ssize_t start, Py_ssize_t stop) { Py_ssize_t length; if (unlikely(__Pyx_PyUnicode_READY(text) == -1)) return NULL; @@ -51816,7 +50891,7 @@ } /* Import */ - static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { PyObject *empty_list = 0; PyObject *module = 0; PyObject *global_dict = 0; @@ -51863,7 +50938,7 @@ if (!py_level) goto bad; module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); + name, global_dict, empty_dict, list, py_level, (PyObject *)NULL); Py_DECREF(py_level); #else module = PyImport_ImportModuleLevelObject( @@ -51880,22 +50955,89 @@ return module; } +/* PyIntCompare */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_NeObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED long inplace) { + if (op1 == op2) { + Py_RETURN_FALSE; + } + #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_TRUE; + intval = -intval; + size = -size; + } else { + if (size <= 0) + Py_RETURN_TRUE; + } + 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_NE)); +} + /* bytes_index */ - static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { + static CYTHON_INLINE char __Pyx_PyBytes_GetItemInt(PyObject* bytes, Py_ssize_t index, int check_bounds) { + if (index < 0) + index += PyBytes_GET_SIZE(bytes); if (check_bounds) { Py_ssize_t size = PyBytes_GET_SIZE(bytes); - if (unlikely(index >= size) | ((index < 0) & unlikely(index < -size))) { + if (unlikely(!__Pyx_is_valid_index(index, size))) { PyErr_SetString(PyExc_IndexError, "string index out of range"); return (char) -1; } } - if (index < 0) - index += PyBytes_GET_SIZE(bytes); return PyBytes_AS_STRING(bytes)[index]; } /* ImportFrom */ - static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_Format(PyExc_ImportError, @@ -51909,7 +51051,7 @@ } /* CallNextTpTraverse */ - static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { + static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_traverse != current_tp_traverse) type = type->tp_base; @@ -51921,7 +51063,7 @@ } /* CallNextTpClear */ - static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { + static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { PyTypeObject* type = Py_TYPE(obj); while (type && type->tp_clear != current_tp_clear) type = type->tp_base; @@ -51932,7 +51074,7 @@ } /* PyObject_GenericGetAttrNoDict */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 + #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) { PyErr_Format(PyExc_AttributeError, #if PY_MAJOR_VERSION >= 3 @@ -51972,7 +51114,7 @@ #endif /* PyObject_GenericGetAttr */ - #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 + #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) { if (unlikely(Py_TYPE(obj)->tp_dictoffset)) { return PyObject_GenericGetAttr(obj, attr_name); @@ -51982,7 +51124,7 @@ #endif /* SetVTable */ - static int __Pyx_SetVtable(PyObject *dict, void *vtable) { + static int __Pyx_SetVtable(PyObject *dict, void *vtable) { #if PY_VERSION_HEX >= 0x02070000 PyObject *ob = PyCapsule_New(vtable, 0, 0); #else @@ -52000,7 +51142,7 @@ } /* SetupReduce */ - static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { + static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) { int ret; PyObject *name_attr; name_attr = __Pyx_PyObject_GetAttrStr(meth, __pyx_n_s_name); @@ -52075,15 +51217,76 @@ return ret; } +/* TypeImport */ + #ifndef __PYX_HAVE_RT_ImportType +#define __PYX_HAVE_RT_ImportType +static PyTypeObject *__Pyx_ImportType(PyObject *module, const char *module_name, const char *class_name, + size_t size, enum __Pyx_ImportType_CheckSize check_size) +{ + PyObject *result = 0; + char warning[200]; + Py_ssize_t basicsize; +#ifdef Py_LIMITED_API + PyObject *py_basicsize; +#endif + result = PyObject_GetAttrString(module, class_name); + if (!result) + goto bad; + if (!PyType_Check(result)) { + PyErr_Format(PyExc_TypeError, + "%.200s.%.200s is not a type object", + module_name, class_name); + goto bad; + } +#ifndef Py_LIMITED_API + basicsize = ((PyTypeObject *)result)->tp_basicsize; +#else + py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); + if (!py_basicsize) + goto bad; + basicsize = PyLong_AsSsize_t(py_basicsize); + Py_DECREF(py_basicsize); + py_basicsize = 0; + if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) + goto bad; +#endif + if ((size_t)basicsize < size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + if (check_size == __Pyx_ImportType_CheckSize_Error && (size_t)basicsize != size) { + PyErr_Format(PyExc_ValueError, + "%.200s.%.200s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + goto bad; + } + else if (check_size == __Pyx_ImportType_CheckSize_Warn && (size_t)basicsize > size) { + PyOS_snprintf(warning, sizeof(warning), + "%s.%s size changed, may indicate binary incompatibility. " + "Expected %zd from C header, got %zd from PyObject", + module_name, class_name, size, basicsize); + if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; + } + return (PyTypeObject *)result; +bad: + Py_XDECREF(result); + return NULL; +} +#endif + /* ClassMethod */ - static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { + static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { #if CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM <= 0x05080000 if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { return PyClassMethod_New(method); } #else #if CYTHON_COMPILING_IN_PYSTON || CYTHON_COMPILING_IN_PYPY - if (PyMethodDescr_Check(method)) { + if (PyMethodDescr_Check(method)) #else static PyTypeObject *methoddescr_type = NULL; if (methoddescr_type == NULL) { @@ -52092,8 +51295,9 @@ methoddescr_type = Py_TYPE(meth); Py_DECREF(meth); } - if (__Pyx_TypeCheck(method, methoddescr_type)) { + if (__Pyx_TypeCheck(method, methoddescr_type)) #endif + { PyMethodDescrObject *descr = (PyMethodDescrObject *)method; #if PY_VERSION_HEX < 0x03020000 PyTypeObject *d_type = descr->d_type; @@ -52110,7 +51314,7 @@ return PyClassMethod_New(method); } #ifdef __Pyx_CyFunction_USED - else if (__Pyx_TypeCheck(method, __pyx_CyFunctionType)) { + else if (__Pyx_CyFunction_Check(method)) { return PyClassMethod_New(method); } #endif @@ -52121,15 +51325,17 @@ } /* GetNameInClass */ - static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { + static PyObject *__Pyx_GetGlobalNameAfterAttributeLookup(PyObject *name) { + PyObject *result; __Pyx_PyThreadState_declare __Pyx_PyThreadState_assign if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError))) return NULL; __Pyx_PyErr_Clear(); - return __Pyx_GetModuleGlobalName(name); + __Pyx_GetModuleGlobalNameUncached(result, name); + return result; } -static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { +static PyObject *__Pyx__GetNameInClass(PyObject *nmspace, PyObject *name) { PyObject *result; result = __Pyx_PyObject_GetAttrStr(nmspace, name); if (!result) { @@ -52139,18 +51345,23 @@ } /* CLineInTraceback */ - #ifndef CYTHON_CLINE_IN_TRACEBACK -static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) { + #ifndef CYTHON_CLINE_IN_TRACEBACK +static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) { PyObject *use_cline; PyObject *ptype, *pvalue, *ptraceback; #if CYTHON_COMPILING_IN_CPYTHON PyObject **cython_runtime_dict; #endif + if (unlikely(!__pyx_cython_runtime)) { + return c_line; + } __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback); #if CYTHON_COMPILING_IN_CPYTHON cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime); if (likely(cython_runtime_dict)) { - use_cline = __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback); + __PYX_PY_DICT_LOOKUP_IF_MODIFIED( + use_cline, *cython_runtime_dict, + __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback)) } else #endif { @@ -52167,7 +51378,7 @@ c_line = 0; PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False); } - else if (PyObject_Not(use_cline) != 0) { + else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) { c_line = 0; } __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback); @@ -52176,7 +51387,7 @@ #endif /* CodeObjectCache */ - static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { + static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { return count; @@ -52256,7 +51467,7 @@ } /* AddTraceback */ - #include "compile.h" + #include "compile.h" #include "frameobject.h" #include "traceback.h" static PyCodeObject* __Pyx_CreateCodeObjectForTraceback( @@ -52341,8 +51552,8 @@ } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { - const int neg_one = (int) -1, const_zero = (int) 0; + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(int) < sizeof(long)) { @@ -52372,7 +51583,7 @@ } /* CIntFromPyVerify */ - #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ + #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0) #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1) @@ -52415,9 +51626,9 @@ #endif - /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { - const long neg_one = (long) -1, const_zero = (long) 0; + /* CIntToPy */ + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(long) < sizeof(long)) { @@ -52447,7 +51658,7 @@ } /* None */ - static CYTHON_INLINE long __Pyx_pow_long(long b, long e) { + static CYTHON_INLINE long __Pyx_pow_long(long b, long e) { long t = b; switch (e) { case 3: @@ -52474,8 +51685,8 @@ } /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) { - const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = (Py_intptr_t) 0; + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_Py_intptr_t(Py_intptr_t value) { + const Py_intptr_t neg_one = (Py_intptr_t) ((Py_intptr_t) 0 - (Py_intptr_t) 1), const_zero = (Py_intptr_t) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(Py_intptr_t) < sizeof(long)) { @@ -52505,7 +51716,7 @@ } /* Declarations */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_float_complex __pyx_t_float_complex_from_parts(float x, float y) { return ::std::complex< float >(x, y); @@ -52525,7 +51736,7 @@ #endif /* Arithmetic */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_float(__pyx_t_float_complex a, __pyx_t_float_complex b) { return (a.real == b.real) && (a.imag == b.imag); @@ -52660,7 +51871,7 @@ #endif /* Declarations */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #ifdef __cplusplus static CYTHON_INLINE __pyx_t_double_complex __pyx_t_double_complex_from_parts(double x, double y) { return ::std::complex< double >(x, y); @@ -52680,7 +51891,7 @@ #endif /* Arithmetic */ - #if CYTHON_CCOMPLEX + #if CYTHON_CCOMPLEX #else static CYTHON_INLINE int __Pyx_c_eq_double(__pyx_t_double_complex a, __pyx_t_double_complex b) { return (a.real == b.real) && (a.imag == b.imag); @@ -52815,8 +52026,8 @@ #endif /* CIntToPy */ - static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { - const enum NPY_TYPES neg_one = (enum NPY_TYPES) -1, const_zero = (enum NPY_TYPES) 0; + static CYTHON_INLINE PyObject* __Pyx_PyInt_From_enum__NPY_TYPES(enum NPY_TYPES value) { + const enum NPY_TYPES neg_one = (enum NPY_TYPES) ((enum NPY_TYPES) 0 - (enum NPY_TYPES) 1), const_zero = (enum NPY_TYPES) 0; const int is_unsigned = neg_one > const_zero; if (is_unsigned) { if (sizeof(enum NPY_TYPES) < sizeof(long)) { @@ -52846,8 +52057,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { - const int neg_one = (int) -1, const_zero = (int) 0; + static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) ((int) 0 - (int) 1), const_zero = (int) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -53035,8 +52246,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { - const long neg_one = (long) -1, const_zero = (long) 0; + static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) ((long) 0 - (long) 1), const_zero = (long) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -53224,8 +52435,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE Py_intptr_t __Pyx_PyInt_As_Py_intptr_t(PyObject *x) { - const Py_intptr_t neg_one = (Py_intptr_t) -1, const_zero = (Py_intptr_t) 0; + static CYTHON_INLINE Py_intptr_t __Pyx_PyInt_As_Py_intptr_t(PyObject *x) { + const Py_intptr_t neg_one = (Py_intptr_t) ((Py_intptr_t) 0 - (Py_intptr_t) 1), const_zero = (Py_intptr_t) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -53413,8 +52624,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *x) { - const npy_uint8 neg_one = (npy_uint8) -1, const_zero = (npy_uint8) 0; + static CYTHON_INLINE npy_uint8 __Pyx_PyInt_As_npy_uint8(PyObject *x) { + const npy_uint8 neg_one = (npy_uint8) ((npy_uint8) 0 - (npy_uint8) 1), const_zero = (npy_uint8) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -53602,8 +52813,8 @@ } /* CIntFromPy */ - static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { - const char neg_one = (char) -1, const_zero = (char) 0; + static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) { + const char neg_one = (char) ((char) 0 - (char) 1), const_zero = (char) 0; const int is_unsigned = neg_one > const_zero; #if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { @@ -53791,7 +53002,7 @@ } /* FastTypeChecks */ - #if CYTHON_COMPILING_IN_CPYTHON + #if CYTHON_COMPILING_IN_CPYTHON static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) { while (a) { a = a->tp_base; @@ -53846,14 +53057,42 @@ return res; } #endif +static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) { + Py_ssize_t i, n; + assert(PyExceptionClass_Check(exc_type)); + n = PyTuple_GET_SIZE(tuple); +#if PY_MAJOR_VERSION >= 3 + for (i=0; itp_basicsize; -#else - py_basicsize = PyObject_GetAttrString(result, "__basicsize__"); - if (!py_basicsize) - goto bad; - basicsize = PyLong_AsSsize_t(py_basicsize); - Py_DECREF(py_basicsize); - py_basicsize = 0; - if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred()) - goto bad; -#endif - if (!strict && (size_t)basicsize > size) { - PyOS_snprintf(warning, sizeof(warning), - "%s.%s size changed, may indicate binary incompatibility. Expected %zd, got %zd", - module_name, class_name, basicsize, size); - if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad; - } - else if ((size_t)basicsize != size) { - PyErr_Format(PyExc_ValueError, - "%.200s.%.200s has the wrong size, try recompiling. Expected %zd, got %zd", - module_name, class_name, basicsize, size); - goto bad; - } - return (PyTypeObject *)result; -bad: - Py_XDECREF(py_module); - Py_XDECREF(result); - return NULL; -} -#endif - /* InitStrings */ - static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { + static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { while (t->p) { #if PY_MAJOR_VERSION < 3 if (t->is_unicode) { @@ -54071,6 +53227,13 @@ if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } +static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) { + int retval; + if (unlikely(!x)) return -1; + retval = __Pyx_PyObject_IsTrue(x); + Py_DECREF(x); + return retval; +} static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) { #if PY_MAJOR_VERSION >= 3 if (PyLong_Check(result)) { @@ -54148,7 +53311,7 @@ if (sizeof(Py_ssize_t) >= sizeof(long)) return PyInt_AS_LONG(b); else - return PyInt_AsSsize_t(x); + return PyInt_AsSsize_t(b); } #endif if (likely(PyLong_CheckExact(b))) { @@ -54202,6 +53365,9 @@ Py_DECREF(x); return ival; } +static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) { + return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False); +} static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { return PyInt_FromSize_t(ival); } diff -Nru htseq-0.10.0/README.rst htseq-0.11.2/README.rst --- htseq-0.10.0/README.rst 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/README.rst 2019-01-08 02:36:23.000000000 +0000 @@ -29,13 +29,15 @@ environment (architechture, shared libraries). If you are not sure, chances are you need them. -Both ``Linux`` and ``OSX`` are supported and binaries are provided for virtually -all ``Linux`` versions and for some ``OSX`` versions (the latter only for ``Python 2.7`` -and ``Python 3.6``). A source package which should not require ``Cython`` nor ``SWIG`` -is provided for all other cases. ``Windows`` is not officially supported as we don't -have access to a Continuous Integration ``Windows`` machine that supports ``pysam``. -However, if you have built ``HTSeq`` for ``Windows``, please open an issue and we'll -try and include it in the release. +Both **Linux** and **OSX** are supported and binaries are provided for virtually +all Linux versions and for some OSX versions (the latter only for Python 2.7 +and 3.6). A source package which should not require ``Cython`` nor ``SWIG`` +is provided for all other cases. + +**Windows is not officially supported** as we don't have access to a Continuous +Integration Windows machine that supports ``pysam``. However, if you have built +``HTSeq`` for Windows, please open an issue and we'll try and include it in the +release. Installation ~~~~~~~~~~~~ @@ -55,6 +57,20 @@ .. raw:: html + + +To install a specific version (e.g. version 0.11.0): + +.. raw:: html + +
+ +:: + + pip install 'HTSeq==0.11.0' + +.. raw:: html +
If this fails, please install all dependencies first: diff -Nru htseq-0.10.0/VERSION htseq-0.11.2/VERSION --- htseq-0.10.0/VERSION 2018-05-11 04:53:20.000000000 +0000 +++ htseq-0.11.2/VERSION 2019-01-08 02:36:23.000000000 +0000 @@ -1 +1 @@ -0.10.0 +0.11.2