[med-svn] [Git][med-team/htseq][upstream] New upstream version 0.11.3

Diane Trout gitlab at salsa.debian.org
Wed Mar 4 06:56:04 GMT 2020



Diane Trout pushed to branch upstream at Debian Med / htseq


Commits:
c1d63d39 by Diane Trout at 2020-03-03T21:27:49-08:00
New upstream version 0.11.3
- - - - -


12 changed files:

- PKG-INFO
- README.rst
- VERSION
- python2/HTSeq/_version.py
- python2/HTSeq/scripts/count.py
- python2/src/StepVector.py
- python3/HTSeq/__init__.py
- python3/HTSeq/_version.py
- python3/HTSeq/scripts/count.py
- python3/src/HTSeq/_HTSeq.pyx
- python3/src/StepVector.i
- setup.py


Changes:

=====================================
PKG-INFO
=====================================
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: HTSeq
-Version: 0.11.2
+Version: 0.11.3
 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


=====================================
README.rst
=====================================
@@ -11,7 +11,7 @@ Requirements
 
 To use ``HTSeq`` you will need:
 
--  ``Python 2.7``\ or ``Python >= 3.4`` (tested up to 3.6)
+-  ``Python 2.7``\ or ``Python >= 3.5`` (tested up to 3.8)
 -  ``numpy``
 -  ``pysam >= 0.9.0``
 
@@ -21,7 +21,7 @@ To run the ``htseq-qa`` script, you will also need:
 
 To **build** the package from source, you will **also** need:
 
--  ``Cython``
+-  ``Cython >=0.29.5``
 -  ``SWIG >=3.0.8``
 
 The latter packages are not required if you have already built ``HTSeq``
@@ -125,3 +125,8 @@ http://htseq.readthedocs.io
    :target: https://travis-ci.org/simon-anders/htseq
 .. |Documentation Status| image:: https://camo.githubusercontent.com/d3d354c898588bb4b62f559a3a30fa6b6364dfc3/68747470733a2f2f72656164746865646f63732e6f72672f70726f6a656374732f68747365712f62616467652f3f76657273696f6e3d6d6173746572
    :target: http://htseq.readthedocs.io
+
+Authors
+~~~~~~~~~~~~~
+
+Simon Anders and Wolfgang Huber are the original authors. Since 2016, ``HTSeq`` is maintained by Fabio Zanini (http://fabilab.org).


=====================================
VERSION
=====================================
@@ -1 +1 @@
-0.11.2
+0.11.3


=====================================
python2/HTSeq/_version.py
=====================================
@@ -1 +1 @@
-__version__ = "0.11.2"
\ No newline at end of file
+__version__ = "0.11.3"
\ No newline at end of file


=====================================
python2/HTSeq/scripts/count.py
=====================================
@@ -44,10 +44,19 @@ def count_reads_in_features(sam_filenames, gff_filename,
                 read.optional_fields.append(('XF', assignment))
                 samoutfile.write(read.get_sam_line() + "\n")
 
+    if samtype == "sam":
+        SAM_or_BAM_Reader = HTSeq.SAM_Reader
+        samname = 'SAM'
+    elif samtype == "bam":
+        SAM_or_BAM_Reader = HTSeq.BAM_Reader
+        samname = 'BAM'
+    else:
+        raise ValueError("Unknown input format %s specified." % samtype)
+
     if samouts != []:
         if len(samouts) != len(sam_filenames):
             raise ValueError(
-                    'Select the same number of SAM input and output files')
+                    'Select the same number of {:} input and output files'.format(samname))
         # Try to open samout files early in case any of them has issues
         for samout in samouts:
             with open(samout, 'w'):
@@ -105,13 +114,6 @@ def count_reads_in_features(sam_filenames, gff_filename,
         sys.stderr.write(
             "Warning: No features of type '%s' found.\n" % feature_type)
 
-    if samtype == "sam":
-        SAM_or_BAM_Reader = HTSeq.SAM_Reader
-    elif samtype == "bam":
-        SAM_or_BAM_Reader = HTSeq.BAM_Reader
-    else:
-        raise ValueError("Unknown input format %s specified." % samtype)
-
     counts_all = []
     empty_all = []
     ambiguous_all = []
@@ -143,7 +145,8 @@ def count_reads_in_features(sam_filenames, gff_filename,
                 read_seq = []
         except:
             sys.stderr.write(
-                "Error occured when reading beginning of SAM/BAM file.\n")
+                "Error occured when reading beginning of {:} file.\n".format(
+                    samname))
             raise
 
         try:
@@ -197,8 +200,8 @@ def count_reads_in_features(sam_filenames, gff_filename,
                         write_to_samout(r, "__too_low_aQual", samoutfile)
                         continue
                     if stranded != "reverse":
-                        iv_seq = (co.ref_iv for co in r.cigar if co.type ==
-                                  "M" and co.size > 0)
+                        iv_seq = (co.ref_iv for co in r.cigar if co.type in com
+                                  and co.size > 0)
                     else:
                         iv_seq = (invert_strand(co.ref_iv)
                                   for co in r.cigar if (co.type in com and
@@ -305,14 +308,14 @@ def count_reads_in_features(sam_filenames, gff_filename,
 
         except:
             sys.stderr.write(
-                "Error occured when processing SAM input (%s):\n" %
-                read_seq_file.get_line_number_string())
+                "Error occured when processing %s input (%s):\n" %
+                (samname, read_seq_file.get_line_number_string()))
             raise
 
         if not quiet:
             sys.stderr.write(
-                "%d SAM %s processed.\n" %
-                (i, "alignments " if not pe_mode else "alignment pairs"))
+                "%d %s %s processed.\n" %
+                (i, samname, "alignments " if not pe_mode else "alignment pairs"))
             sys.stderr.flush()
 
         if samoutfile is not None:
@@ -351,7 +354,8 @@ def main():
         "the number of reads mapping to it. See " +
         "http://htseq.readthedocs.io/en/master/count.html for details.",
         epilog="Written by Simon Anders (sanders at fs.tum.de), " +
-        "European Molecular Biology Laboratory (EMBL). (c) 2010. " +
+        "European Molecular Biology Laboratory (EMBL) and Fabio Zanini " +
+        "(fabio.zanini at stanford.edu), Stanford University. (c) 2010-2019. " +
         "Released under the terms of the GNU General Public License v3. " +
         "Part of the 'HTSeq' framework, version %s." % HTSeq.__version__)
 
@@ -362,12 +366,12 @@ def main():
 
     pa.add_argument(
             "featuresfilename", type=str,
-            help="Path to the file containing the features")
+            help="Path to the GTF file containing the features")
 
     pa.add_argument(
             "-f", "--format", dest="samtype",
             choices=("sam", "bam"), default="sam",
-            help="type of <alignment_file> data, either 'sam' or 'bam' (default: sam)")
+            help="Type of <alignment_file> data, either 'sam' or 'bam' (default: sam)")
 
     pa.add_argument(
             "-r", "--order", dest="order",
@@ -387,38 +391,43 @@ def main():
     pa.add_argument(
             "-s", "--stranded", dest="stranded",
             choices=("yes", "no", "reverse"), default="yes",
-            help="whether the data is from a strand-specific assay. Specify 'yes', " +
+            help="Whether the data is from a strand-specific assay. Specify 'yes', " +
             "'no', or 'reverse' (default: yes). " +
             "'reverse' means 'yes' with reversed strand interpretation")
 
     pa.add_argument(
             "-a", "--minaqual", type=int, dest="minaqual",
             default=10,
-            help="skip all reads with alignment quality lower than the given " +
-            "minimum value (default: 10)")
+            help="Skip all reads with MAPQ alignment quality lower than the given " +
+            "minimum value (default: 10). MAPQ is the 5th column of a SAM/BAM " +
+            "file and its usage depends on the software used to map the reads.")
 
     pa.add_argument(
             "-t", "--type", type=str, dest="featuretype",
-            default="exon", help="feature type (3rd column in GFF file) to be used, " +
+            default="exon",
+            help="Feature type (3rd column in GTF file) to be used, " +
             "all features of other type are ignored (default, suitable for Ensembl " +
             "GTF files: exon)")
 
     pa.add_argument(
             "-i", "--idattr", type=str, dest="idattr",
-            default="gene_id", help="GFF attribute to be used as feature ID (default, " +
+            default="gene_id",
+            help="GTF attribute to be used as feature ID (default, " +
             "suitable for Ensembl GTF files: gene_id)")
 
     pa.add_argument(
             "--additional-attr", type=str,
             action='append',
-            default=[], help="Additional feature attributes (default: none, " +
+            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",
             choices=("union", "intersection-strict", "intersection-nonempty"),
-            default="union", help="mode to handle reads overlapping more than one feature " +
+            default="union",
+            help="Mode to handle reads overlapping more than one feature " +
             "(choices: union, intersection-strict, intersection-nonempty; default: union)")
 
     pa.add_argument(
@@ -440,16 +449,25 @@ def main():
     pa.add_argument(
             "-o", "--samout", type=str, dest="samouts",
             action='append',
-            default=[], help="write out all SAM alignment records into " +
+            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",
-            help="suppress progress report")  # and warnings" )
+            help="Suppress progress report")  # and warnings" )
+
+    pa.add_argument(
+            "--version", action="store_true",
+            help='Show software version and exit')
 
     args = pa.parse_args()
 
+    if args.version:
+        print(HTSeq.__version__)
+        sys.exit()
+
     warnings.showwarning = my_showwarning
     try:
         count_reads_in_features(


=====================================
python2/src/StepVector.py
=====================================
@@ -1,139 +1,85 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 3.0.12
+# Version 4.0.1
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
 
 from sys import version_info as _swig_python_version_info
-if _swig_python_version_info >= (2, 7, 0):
-    def swig_import_helper():
-        import importlib
-        pkg = __name__.rpartition('.')[0]
-        mname = '.'.join((pkg, '_StepVector')).lstrip('.')
-        try:
-            return importlib.import_module(mname)
-        except ImportError:
-            return importlib.import_module('_StepVector')
-    _StepVector = swig_import_helper()
-    del swig_import_helper
-elif _swig_python_version_info >= (2, 6, 0):
-    def swig_import_helper():
-        from os.path import dirname
-        import imp
-        fp = None
-        try:
-            fp, pathname, description = imp.find_module('_StepVector', [dirname(__file__)])
-        except ImportError:
-            import _StepVector
-            return _StepVector
-        try:
-            _mod = imp.load_module('_StepVector', fp, pathname, description)
-        finally:
-            if fp is not None:
-                fp.close()
-        return _mod
-    _StepVector = swig_import_helper()
-    del swig_import_helper
+if _swig_python_version_info < (2, 7, 0):
+    raise RuntimeError("Python 2.7 or later required")
+
+# Import the low-level C/C++ module
+if __package__ or "." in __name__:
+    from . import _StepVector
 else:
     import _StepVector
-del _swig_python_version_info
-
-try:
-    _swig_property = property
-except NameError:
-    pass  # Python < 2.2 doesn't have 'property'.
 
 try:
     import builtins as __builtin__
 except ImportError:
     import __builtin__
 
-def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
-    if (name == "thisown"):
-        return self.this.own(value)
-    if (name == "this"):
-        if type(value).__name__ == 'SwigPyObject':
-            self.__dict__[name] = value
-            return
-    method = class_type.__swig_setmethods__.get(name, None)
-    if method:
-        return method(self, value)
-    if (not static):
-        if _newclass:
-            object.__setattr__(self, name, value)
+def _swig_repr(self):
+    try:
+        strthis = "proxy of " + self.this.__repr__()
+    except __builtin__.Exception:
+        strthis = ""
+    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+
+
+def _swig_setattr_nondynamic_instance_variable(set):
+    def set_instance_attr(self, name, value):
+        if name == "thisown":
+            self.this.own(value)
+        elif name == "this":
+            set(self, name, value)
+        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
+            set(self, name, value)
         else:
-            self.__dict__[name] = value
-    else:
-        raise AttributeError("You cannot add attributes to %s" % self)
+            raise AttributeError("You cannot add instance attributes to %s" % self)
+    return set_instance_attr
 
 
-def _swig_setattr(self, class_type, name, value):
-    return _swig_setattr_nondynamic(self, class_type, name, value, 0)
+def _swig_setattr_nondynamic_class_variable(set):
+    def set_class_attr(cls, name, value):
+        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
+            set(cls, name, value)
+        else:
+            raise AttributeError("You cannot add class attributes to %s" % cls)
+    return set_class_attr
 
 
-def _swig_getattr(self, class_type, name):
-    if (name == "thisown"):
-        return self.this.own()
-    method = class_type.__swig_getmethods__.get(name, None)
-    if method:
-        return method(self)
-    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
+def _swig_add_metaclass(metaclass):
+    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
+    def wrapper(cls):
+        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
+    return wrapper
 
 
-def _swig_repr(self):
-    try:
-        strthis = "proxy of " + self.this.__repr__()
-    except __builtin__.Exception:
-        strthis = ""
-    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
+class _SwigNonDynamicMeta(type):
+    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
+    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)
 
-try:
-    _object = object
-    _newclass = 1
-except __builtin__.Exception:
-    class _object:
-        pass
-    _newclass = 0
-
-class _Pair_int_float(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _Pair_int_float, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _Pair_int_float, name)
+
+class _Pair_int_float(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
-    __swig_setmethods__["first"] = _StepVector._Pair_int_float_first_set
-    __swig_getmethods__["first"] = _StepVector._Pair_int_float_first_get
-    if _newclass:
-        first = _swig_property(_StepVector._Pair_int_float_first_get, _StepVector._Pair_int_float_first_set)
-    __swig_setmethods__["second"] = _StepVector._Pair_int_float_second_set
-    __swig_getmethods__["second"] = _StepVector._Pair_int_float_second_get
-    if _newclass:
-        second = _swig_property(_StepVector._Pair_int_float_second_get, _StepVector._Pair_int_float_second_set)
+    first = property(_StepVector._Pair_int_float_first_get, _StepVector._Pair_int_float_first_set)
+    second = property(_StepVector._Pair_int_float_second_get, _StepVector._Pair_int_float_second_set)
 
     def __init__(self, first_, second_):
-        this = _StepVector.new__Pair_int_float(first_, second_)
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._Pair_int_float_swiginit(self, _StepVector.new__Pair_int_float(first_, second_))
     __swig_destroy__ = _StepVector.delete__Pair_int_float
-    __del__ = lambda self: None
-_Pair_int_float_swigregister = _StepVector._Pair_int_float_swigregister
-_Pair_int_float_swigregister(_Pair_int_float)
-
-class _StepVector_Iterator_float(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _StepVector_Iterator_float, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _StepVector_Iterator_float, name)
+
+# Register _Pair_int_float in _StepVector:
+_StepVector._Pair_int_float_swigregister(_Pair_int_float)
+
+class _StepVector_Iterator_float(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self, first, last_):
-        this = _StepVector.new__StepVector_Iterator_float(first, last_)
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._StepVector_Iterator_float_swiginit(self, _StepVector.new__StepVector_Iterator_float(first, last_))
 
     def next(self):
         return _StepVector._StepVector_Iterator_float_next(self)
@@ -141,85 +87,58 @@ class _StepVector_Iterator_float(_object):
     def __iter__(self):
         return _StepVector._StepVector_Iterator_float___iter__(self)
     __swig_destroy__ = _StepVector.delete__StepVector_Iterator_float
-    __del__ = lambda self: None
-_StepVector_Iterator_float_swigregister = _StepVector._StepVector_Iterator_float_swigregister
-_StepVector_Iterator_float_swigregister(_StepVector_Iterator_float)
-
-class _StepVector_float(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _StepVector_float, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _StepVector_float, name)
+
+# Register _StepVector_Iterator_float in _StepVector:
+_StepVector._StepVector_Iterator_float_swigregister(_StepVector_Iterator_float)
+
+class _StepVector_float(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self):
-        this = _StepVector.new__StepVector_float()
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._StepVector_float_swiginit(self, _StepVector.new__StepVector_float())
 
-    def set_value(self, arg2, to, value):
-        return _StepVector._StepVector_float_set_value(self, arg2, to, value)
+    def set_value(self, _from, to, value):
+        return _StepVector._StepVector_float_set_value(self, _from, to, value)
 
-    def add_value(self, arg2, to, value):
-        return _StepVector._StepVector_float_add_value(self, arg2, to, value)
+    def add_value(self, _from, to, value):
+        return _StepVector._StepVector_float_add_value(self, _from, to, value)
 
     def get_all_values_pystyle(self):
         return _StepVector._StepVector_float_get_all_values_pystyle(self)
 
-    def get_values_pystyle(self, arg2):
-        return _StepVector._StepVector_float_get_values_pystyle(self, arg2)
+    def get_values_pystyle(self, _from):
+        return _StepVector._StepVector_float_get_values_pystyle(self, _from)
 
     def num_values(self):
         return _StepVector._StepVector_float_num_values(self)
     __swig_destroy__ = _StepVector.delete__StepVector_float
-    __del__ = lambda self: None
-_StepVector_float_swigregister = _StepVector._StepVector_float_swigregister
-_StepVector_float_swigregister(_StepVector_float)
+
+# Register _StepVector_float in _StepVector:
+_StepVector._StepVector_float_swigregister(_StepVector_float)
 cvar = _StepVector.cvar
 _StepVector_float.min_index = _StepVector.cvar._StepVector_float_min_index
 _StepVector_float.max_index = _StepVector.cvar._StepVector_float_max_index
 
-class _Pair_int_int(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _Pair_int_int, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _Pair_int_int, name)
+class _Pair_int_int(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
-    __swig_setmethods__["first"] = _StepVector._Pair_int_int_first_set
-    __swig_getmethods__["first"] = _StepVector._Pair_int_int_first_get
-    if _newclass:
-        first = _swig_property(_StepVector._Pair_int_int_first_get, _StepVector._Pair_int_int_first_set)
-    __swig_setmethods__["second"] = _StepVector._Pair_int_int_second_set
-    __swig_getmethods__["second"] = _StepVector._Pair_int_int_second_get
-    if _newclass:
-        second = _swig_property(_StepVector._Pair_int_int_second_get, _StepVector._Pair_int_int_second_set)
+    first = property(_StepVector._Pair_int_int_first_get, _StepVector._Pair_int_int_first_set)
+    second = property(_StepVector._Pair_int_int_second_get, _StepVector._Pair_int_int_second_set)
 
     def __init__(self, first_, second_):
-        this = _StepVector.new__Pair_int_int(first_, second_)
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._Pair_int_int_swiginit(self, _StepVector.new__Pair_int_int(first_, second_))
     __swig_destroy__ = _StepVector.delete__Pair_int_int
-    __del__ = lambda self: None
-_Pair_int_int_swigregister = _StepVector._Pair_int_int_swigregister
-_Pair_int_int_swigregister(_Pair_int_int)
-
-class _StepVector_Iterator_int(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _StepVector_Iterator_int, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _StepVector_Iterator_int, name)
+
+# Register _Pair_int_int in _StepVector:
+_StepVector._Pair_int_int_swigregister(_Pair_int_int)
+
+class _StepVector_Iterator_int(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self, first, last_):
-        this = _StepVector.new__StepVector_Iterator_int(first, last_)
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._StepVector_Iterator_int_swiginit(self, _StepVector.new__StepVector_Iterator_int(first, last_))
 
     def next(self):
         return _StepVector._StepVector_Iterator_int_next(self)
@@ -227,84 +146,57 @@ class _StepVector_Iterator_int(_object):
     def __iter__(self):
         return _StepVector._StepVector_Iterator_int___iter__(self)
     __swig_destroy__ = _StepVector.delete__StepVector_Iterator_int
-    __del__ = lambda self: None
-_StepVector_Iterator_int_swigregister = _StepVector._StepVector_Iterator_int_swigregister
-_StepVector_Iterator_int_swigregister(_StepVector_Iterator_int)
-
-class _StepVector_int(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _StepVector_int, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _StepVector_int, name)
+
+# Register _StepVector_Iterator_int in _StepVector:
+_StepVector._StepVector_Iterator_int_swigregister(_StepVector_Iterator_int)
+
+class _StepVector_int(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self):
-        this = _StepVector.new__StepVector_int()
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._StepVector_int_swiginit(self, _StepVector.new__StepVector_int())
 
-    def set_value(self, arg2, to, value):
-        return _StepVector._StepVector_int_set_value(self, arg2, to, value)
+    def set_value(self, _from, to, value):
+        return _StepVector._StepVector_int_set_value(self, _from, to, value)
 
-    def add_value(self, arg2, to, value):
-        return _StepVector._StepVector_int_add_value(self, arg2, to, value)
+    def add_value(self, _from, to, value):
+        return _StepVector._StepVector_int_add_value(self, _from, to, value)
 
     def get_all_values_pystyle(self):
         return _StepVector._StepVector_int_get_all_values_pystyle(self)
 
-    def get_values_pystyle(self, arg2):
-        return _StepVector._StepVector_int_get_values_pystyle(self, arg2)
+    def get_values_pystyle(self, _from):
+        return _StepVector._StepVector_int_get_values_pystyle(self, _from)
 
     def num_values(self):
         return _StepVector._StepVector_int_num_values(self)
     __swig_destroy__ = _StepVector.delete__StepVector_int
-    __del__ = lambda self: None
-_StepVector_int_swigregister = _StepVector._StepVector_int_swigregister
-_StepVector_int_swigregister(_StepVector_int)
+
+# Register _StepVector_int in _StepVector:
+_StepVector._StepVector_int_swigregister(_StepVector_int)
 _StepVector_int.min_index = _StepVector.cvar._StepVector_int_min_index
 _StepVector_int.max_index = _StepVector.cvar._StepVector_int_max_index
 
-class _Pair_int_bool(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _Pair_int_bool, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _Pair_int_bool, name)
+class _Pair_int_bool(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
-    __swig_setmethods__["first"] = _StepVector._Pair_int_bool_first_set
-    __swig_getmethods__["first"] = _StepVector._Pair_int_bool_first_get
-    if _newclass:
-        first = _swig_property(_StepVector._Pair_int_bool_first_get, _StepVector._Pair_int_bool_first_set)
-    __swig_setmethods__["second"] = _StepVector._Pair_int_bool_second_set
-    __swig_getmethods__["second"] = _StepVector._Pair_int_bool_second_get
-    if _newclass:
-        second = _swig_property(_StepVector._Pair_int_bool_second_get, _StepVector._Pair_int_bool_second_set)
+    first = property(_StepVector._Pair_int_bool_first_get, _StepVector._Pair_int_bool_first_set)
+    second = property(_StepVector._Pair_int_bool_second_get, _StepVector._Pair_int_bool_second_set)
 
     def __init__(self, first_, second_):
-        this = _StepVector.new__Pair_int_bool(first_, second_)
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._Pair_int_bool_swiginit(self, _StepVector.new__Pair_int_bool(first_, second_))
     __swig_destroy__ = _StepVector.delete__Pair_int_bool
-    __del__ = lambda self: None
-_Pair_int_bool_swigregister = _StepVector._Pair_int_bool_swigregister
-_Pair_int_bool_swigregister(_Pair_int_bool)
-
-class _StepVector_Iterator_bool(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _StepVector_Iterator_bool, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _StepVector_Iterator_bool, name)
+
+# Register _Pair_int_bool in _StepVector:
+_StepVector._Pair_int_bool_swigregister(_Pair_int_bool)
+
+class _StepVector_Iterator_bool(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self, first, last_):
-        this = _StepVector.new__StepVector_Iterator_bool(first, last_)
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._StepVector_Iterator_bool_swiginit(self, _StepVector.new__StepVector_Iterator_bool(first, last_))
 
     def next(self):
         return _StepVector._StepVector_Iterator_bool_next(self)
@@ -312,84 +204,57 @@ class _StepVector_Iterator_bool(_object):
     def __iter__(self):
         return _StepVector._StepVector_Iterator_bool___iter__(self)
     __swig_destroy__ = _StepVector.delete__StepVector_Iterator_bool
-    __del__ = lambda self: None
-_StepVector_Iterator_bool_swigregister = _StepVector._StepVector_Iterator_bool_swigregister
-_StepVector_Iterator_bool_swigregister(_StepVector_Iterator_bool)
-
-class _StepVector_bool(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _StepVector_bool, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _StepVector_bool, name)
+
+# Register _StepVector_Iterator_bool in _StepVector:
+_StepVector._StepVector_Iterator_bool_swigregister(_StepVector_Iterator_bool)
+
+class _StepVector_bool(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self):
-        this = _StepVector.new__StepVector_bool()
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._StepVector_bool_swiginit(self, _StepVector.new__StepVector_bool())
 
-    def set_value(self, arg2, to, value):
-        return _StepVector._StepVector_bool_set_value(self, arg2, to, value)
+    def set_value(self, _from, to, value):
+        return _StepVector._StepVector_bool_set_value(self, _from, to, value)
 
-    def add_value(self, arg2, to, value):
-        return _StepVector._StepVector_bool_add_value(self, arg2, to, value)
+    def add_value(self, _from, to, value):
+        return _StepVector._StepVector_bool_add_value(self, _from, to, value)
 
     def get_all_values_pystyle(self):
         return _StepVector._StepVector_bool_get_all_values_pystyle(self)
 
-    def get_values_pystyle(self, arg2):
-        return _StepVector._StepVector_bool_get_values_pystyle(self, arg2)
+    def get_values_pystyle(self, _from):
+        return _StepVector._StepVector_bool_get_values_pystyle(self, _from)
 
     def num_values(self):
         return _StepVector._StepVector_bool_num_values(self)
     __swig_destroy__ = _StepVector.delete__StepVector_bool
-    __del__ = lambda self: None
-_StepVector_bool_swigregister = _StepVector._StepVector_bool_swigregister
-_StepVector_bool_swigregister(_StepVector_bool)
+
+# Register _StepVector_bool in _StepVector:
+_StepVector._StepVector_bool_swigregister(_StepVector_bool)
 _StepVector_bool.min_index = _StepVector.cvar._StepVector_bool_min_index
 _StepVector_bool.max_index = _StepVector.cvar._StepVector_bool_max_index
 
-class _Pair_int_obj(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _Pair_int_obj, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _Pair_int_obj, name)
+class _Pair_int_obj(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
-    __swig_setmethods__["first"] = _StepVector._Pair_int_obj_first_set
-    __swig_getmethods__["first"] = _StepVector._Pair_int_obj_first_get
-    if _newclass:
-        first = _swig_property(_StepVector._Pair_int_obj_first_get, _StepVector._Pair_int_obj_first_set)
-    __swig_setmethods__["second"] = _StepVector._Pair_int_obj_second_set
-    __swig_getmethods__["second"] = _StepVector._Pair_int_obj_second_get
-    if _newclass:
-        second = _swig_property(_StepVector._Pair_int_obj_second_get, _StepVector._Pair_int_obj_second_set)
+    first = property(_StepVector._Pair_int_obj_first_get, _StepVector._Pair_int_obj_first_set)
+    second = property(_StepVector._Pair_int_obj_second_get, _StepVector._Pair_int_obj_second_set)
 
     def __init__(self, first_, second_):
-        this = _StepVector.new__Pair_int_obj(first_, second_)
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._Pair_int_obj_swiginit(self, _StepVector.new__Pair_int_obj(first_, second_))
     __swig_destroy__ = _StepVector.delete__Pair_int_obj
-    __del__ = lambda self: None
-_Pair_int_obj_swigregister = _StepVector._Pair_int_obj_swigregister
-_Pair_int_obj_swigregister(_Pair_int_obj)
-
-class _StepVector_Iterator_obj(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _StepVector_Iterator_obj, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _StepVector_Iterator_obj, name)
+
+# Register _Pair_int_obj in _StepVector:
+_StepVector._Pair_int_obj_swigregister(_Pair_int_obj)
+
+class _StepVector_Iterator_obj(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self, first, last_):
-        this = _StepVector.new__StepVector_Iterator_obj(first, last_)
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._StepVector_Iterator_obj_swiginit(self, _StepVector.new__StepVector_Iterator_obj(first, last_))
 
     def next(self):
         return _StepVector._StepVector_Iterator_obj_next(self)
@@ -397,42 +262,35 @@ class _StepVector_Iterator_obj(_object):
     def __iter__(self):
         return _StepVector._StepVector_Iterator_obj___iter__(self)
     __swig_destroy__ = _StepVector.delete__StepVector_Iterator_obj
-    __del__ = lambda self: None
-_StepVector_Iterator_obj_swigregister = _StepVector._StepVector_Iterator_obj_swigregister
-_StepVector_Iterator_obj_swigregister(_StepVector_Iterator_obj)
-
-class _StepVector_obj(_object):
-    __swig_setmethods__ = {}
-    __setattr__ = lambda self, name, value: _swig_setattr(self, _StepVector_obj, name, value)
-    __swig_getmethods__ = {}
-    __getattr__ = lambda self, name: _swig_getattr(self, _StepVector_obj, name)
+
+# Register _StepVector_Iterator_obj in _StepVector:
+_StepVector._StepVector_Iterator_obj_swigregister(_StepVector_Iterator_obj)
+
+class _StepVector_obj(object):
+    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
     __repr__ = _swig_repr
 
     def __init__(self):
-        this = _StepVector.new__StepVector_obj()
-        try:
-            self.this.append(this)
-        except __builtin__.Exception:
-            self.this = this
+        _StepVector._StepVector_obj_swiginit(self, _StepVector.new__StepVector_obj())
 
-    def set_value(self, arg2, to, value):
-        return _StepVector._StepVector_obj_set_value(self, arg2, to, value)
+    def set_value(self, _from, to, value):
+        return _StepVector._StepVector_obj_set_value(self, _from, to, value)
 
-    def add_value(self, arg2, to, value):
-        return _StepVector._StepVector_obj_add_value(self, arg2, to, value)
+    def add_value(self, _from, to, value):
+        return _StepVector._StepVector_obj_add_value(self, _from, to, value)
 
     def get_all_values_pystyle(self):
         return _StepVector._StepVector_obj_get_all_values_pystyle(self)
 
-    def get_values_pystyle(self, arg2):
-        return _StepVector._StepVector_obj_get_values_pystyle(self, arg2)
+    def get_values_pystyle(self, _from):
+        return _StepVector._StepVector_obj_get_values_pystyle(self, _from)
 
     def num_values(self):
         return _StepVector._StepVector_obj_num_values(self)
     __swig_destroy__ = _StepVector.delete__StepVector_obj
-    __del__ = lambda self: None
-_StepVector_obj_swigregister = _StepVector._StepVector_obj_swigregister
-_StepVector_obj_swigregister(_StepVector_obj)
+
+# Register _StepVector_obj in _StepVector:
+_StepVector._StepVector_obj_swigregister(_StepVector_obj)
 _StepVector_obj.min_index = _StepVector.cvar._StepVector_obj_min_index
 _StepVector_obj.max_index = _StepVector.cvar._StepVector_obj_max_index
 
@@ -692,6 +550,5 @@ def _StepVector_unpickle( length, typecode, start ):
    return StepVector.create( length, typecode, start )
 
 
-# This file is compatible with both classic and new-style classes.
 
 


=====================================
python3/HTSeq/__init__.py
=====================================
@@ -402,11 +402,28 @@ class FastqReader(FileOrSequence):
 
     def __iter__(self):
         fin = FileOrSequence.__iter__(self)
-        while True:
-            id1 = next(fin)
-            seq = next(fin)
-            id2 = next(fin)
-            qual = next(fin)
+        il = 0
+        id1 = None
+        id2 = None
+        seq = None
+        qual = None
+        for line in fin:
+            if il == 0:
+                id1 = line
+                il += 1
+                continue
+            elif il == 1:
+                seq = line
+                il += 1
+                continue
+            elif il == 2:
+                id2 = line
+                il += 1
+                continue
+
+            qual = line
+            il = 0
+
             if qual == "":
                 if id1 != "":
                     warnings.warn(


=====================================
python3/HTSeq/_version.py
=====================================
@@ -1 +1 @@
-__version__ = "0.11.2"
\ No newline at end of file
+__version__ = "0.11.3"
\ No newline at end of file


=====================================
python3/HTSeq/scripts/count.py
=====================================
@@ -44,9 +44,19 @@ def count_reads_in_features(sam_filenames, gff_filename,
                 read.optional_fields.append(('XF', assignment))
                 samoutfile.write(read.get_sam_line() + "\n")
 
+    if samtype == "sam":
+        SAM_or_BAM_Reader = HTSeq.SAM_Reader
+        samname = 'SAM'
+    elif samtype == "bam":
+        SAM_or_BAM_Reader = HTSeq.BAM_Reader
+        samname = 'BAM'
+    else:
+        raise ValueError("Unknown input format %s specified." % samtype)
+
     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 {:} input and output files'.format(samname))
         # Try to open samout files early in case any of them has issues
         for samout in samouts:
             with open(samout, 'w'):
@@ -73,12 +83,14 @@ def count_reads_in_features(sam_filenames, gff_filename,
                 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]] = [
@@ -102,13 +114,6 @@ def count_reads_in_features(sam_filenames, gff_filename,
         sys.stderr.write(
             "Warning: No features of type '%s' found.\n" % feature_type)
 
-    if samtype == "sam":
-        SAM_or_BAM_Reader = HTSeq.SAM_Reader
-    elif samtype == "bam":
-        SAM_or_BAM_Reader = HTSeq.BAM_Reader
-    else:
-        raise ValueError("Unknown input format %s specified." % samtype)
-
     counts_all = []
     empty_all = []
     ambiguous_all = []
@@ -140,7 +145,8 @@ def count_reads_in_features(sam_filenames, gff_filename,
                 read_seq = []
         except:
             sys.stderr.write(
-                "Error occured when reading beginning of SAM/BAM file.\n")
+                "Error occured when reading beginning of {:} file.\n".format(
+                    samname))
             raise
 
         try:
@@ -170,8 +176,8 @@ def count_reads_in_features(sam_filenames, gff_filename,
             for r in read_seq:
                 if i > 0 and i % 100000 == 0 and not quiet:
                     sys.stderr.write(
-                        "%d SAM alignment record%s processed.\n" %
-                        (i, "s" if not pe_mode else " pairs"))
+                        "%d %s alignment record%s processed.\n" %
+                        (i, samname, "s" if not pe_mode else " pairs"))
                     sys.stderr.flush()
 
                 i += 1
@@ -189,7 +195,10 @@ def count_reads_in_features(sam_filenames, gff_filename,
                     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:
@@ -307,14 +316,14 @@ def count_reads_in_features(sam_filenames, gff_filename,
 
         except:
             sys.stderr.write(
-                "Error occured when processing SAM input (%s):\n" %
-                read_seq_file.get_line_number_string())
+                "Error occured when processing %s input (%s):\n" %
+                (samname, read_seq_file.get_line_number_string()))
             raise
 
         if not quiet:
             sys.stderr.write(
-                "%d SAM %s processed.\n" %
-                (i, "alignments " if not pe_mode else "alignment pairs"))
+                "%d %s %s processed.\n" %
+                (i, samname, "alignments " if not pe_mode else "alignment pairs"))
             sys.stderr.flush()
 
         if samoutfile is not None:
@@ -339,7 +348,8 @@ def count_reads_in_features(sam_filenames, gff_filename,
     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)
 
 
@@ -352,7 +362,8 @@ def main():
         "the number of reads mapping to it. See " +
         "http://htseq.readthedocs.io/en/master/count.html for details.",
         epilog="Written by Simon Anders (sanders at fs.tum.de), " +
-        "European Molecular Biology Laboratory (EMBL). (c) 2010. " +
+        "European Molecular Biology Laboratory (EMBL) and Fabio Zanini " +
+        "(fabio.zanini at stanford.edu), Stanford University. (c) 2010-2019. " +
         "Released under the terms of the GNU General Public License v3. " +
         "Part of the 'HTSeq' framework, version %s." % HTSeq.__version__)
 
@@ -363,12 +374,12 @@ def main():
 
     pa.add_argument(
             "featuresfilename", type=str,
-            help="Path to the file containing the features")
+            help="Path to the GTF file containing the features")
 
     pa.add_argument(
             "-f", "--format", dest="samtype",
             choices=("sam", "bam"), default="sam",
-            help="type of <alignment_file> data, either 'sam' or 'bam' (default: sam)")
+            help="Type of <alignment_file> data, either 'sam' or 'bam' (default: sam)")
 
     pa.add_argument(
             "-r", "--order", dest="order",
@@ -388,38 +399,43 @@ def main():
     pa.add_argument(
             "-s", "--stranded", dest="stranded",
             choices=("yes", "no", "reverse"), default="yes",
-            help="whether the data is from a strand-specific assay. Specify 'yes', " +
+            help="Whether the data is from a strand-specific assay. Specify 'yes', " +
             "'no', or 'reverse' (default: yes). " +
             "'reverse' means 'yes' with reversed strand interpretation")
 
     pa.add_argument(
             "-a", "--minaqual", type=int, dest="minaqual",
             default=10,
-            help="skip all reads with alignment quality lower than the given " +
-            "minimum value (default: 10)")
+            help="Skip all reads with MAPQ alignment quality lower than the given " +
+            "minimum value (default: 10). MAPQ is the 5th column of a SAM/BAM " +
+            "file and its usage depends on the software used to map the reads.")
 
     pa.add_argument(
             "-t", "--type", type=str, dest="featuretype",
-            default="exon", help="feature type (3rd column in GFF file) to be used, " +
+            default="exon",
+            help="Feature type (3rd column in GTF file) to be used, " +
             "all features of other type are ignored (default, suitable for Ensembl " +
             "GTF files: exon)")
 
     pa.add_argument(
             "-i", "--idattr", type=str, dest="idattr",
-            default="gene_id", help="GFF attribute to be used as feature ID (default, " +
+            default="gene_id",
+            help="GTF attribute to be used as feature ID (default, " +
             "suitable for Ensembl GTF files: gene_id)")
 
     pa.add_argument(
             "--additional-attr", type=str,
             action='append',
-            default=[], help="Additional feature attributes (default: none, " +
+            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",
             choices=("union", "intersection-strict", "intersection-nonempty"),
-            default="union", help="mode to handle reads overlapping more than one feature " +
+            default="union",
+            help="Mode to handle reads overlapping more than one feature " +
             "(choices: union, intersection-strict, intersection-nonempty; default: union)")
 
     pa.add_argument(
@@ -441,16 +457,25 @@ def main():
     pa.add_argument(
             "-o", "--samout", type=str, dest="samouts",
             action='append',
-            default=[], help="write out all SAM alignment records into " +
+            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",
-            help="suppress progress report")  # and warnings" )
+            help="Suppress progress report")  # and warnings" )
+
+    pa.add_argument(
+            "--version", action="store_true",
+            help='Show software version and exit')
 
     args = pa.parse_args()
 
+    if args.version:
+        print(HTSeq.__version__)
+        sys.exit()
+
     warnings.showwarning = my_showwarning
     try:
         count_reads_in_features(


=====================================
python3/src/HTSeq/_HTSeq.pyx
=====================================
@@ -1326,8 +1326,9 @@ cdef class SAM_Alignment(AlignmentWithSequenceReversal):
             seq = SequenceWithQualities(
                 read.query_sequence.encode(), read.qname, read.qual.encode())
         else:
-            seq = SequenceWithQualities(read.query_sequence.encode(
-            ), read.qname, read.qual.encode(), "noquals")
+            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 []
@@ -1368,10 +1369,15 @@ cdef class SAM_Alignment(AlignmentWithSequenceReversal):
                                  read.reference_end, strand)
         else:
             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)
+        if read.qual != b"*":
+            #sys.stderr.write(
+            #        'query_sequence type: '+str(type(read.query_sequence))+', quality type: '+str(type(read.qual)))
+            seq = SequenceWithQualities(
+                read.query_sequence.encode(), read.qname, read.qual.encode())
+        else:
+            seq = SequenceWithQualities(
+                read.query_sequence.encode(), read.query_name, read.qual.encode(),
+                'noquals')
         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 []


=====================================
python3/src/StepVector.i
=====================================
@@ -285,7 +285,7 @@ class StepVector( object ):
       If you use a slice, i.e., 'sv[i:j]', you get a view on the StepVector,
       i.e., the same data, but changed boundaries.
       """
-      if isinstance( index, slice ):
+      if isinstance(index, slice):
          if index.step is not None and index.step != 1:
              raise ValueError, "Striding slices (i.e., step != 1) are not supported"
          if index.start is None:
@@ -307,48 +307,48 @@ class StepVector( object ):
          res.stop = stop
          return res
       else:
-         return self._swigobj.get_values_pystyle( index ).next().second
+         return self._swigobj.get_values_pystyle(index).next().second
       
-   def __iter__( self ):
+   def __iter__(self):
       """When asked to provide an iterator, a StepVector will yield all its
       value, repeating each value according to the length of the step.
       Hence, calling, e.g., 'list( sv )' will transform the StepVector 'sv'
       into an ordinary list.
       """
       for start, stop, value in self.get_steps():
-         for i in xrange( start, stop ):
+         for i in range(start, stop):
             yield value
        
-   def __repr__( self ):
+   def __repr__(self):
       if self.start == -sys.maxint - 1:
          start_s = "-inf"
       else:
-         start_s = str( self.start )
+         start_s = str(self.start)
       if self.stop == sys.maxint:
          stop_s = "inf"
       else:
-         stop_s = str( self.stop )
+         stop_s = str(self.stop)
       return "<%s object, type '%s', index range %s:%s, %d step(s)>" % (
          self.__class__.__name__, self.typecode(), start_s,
-         stop_s, self.num_steps() )
+         stop_s, self.num_steps())
        
-   def typecode( self ):
+   def typecode(self):
       "Returns the typecode."
       return self._typecode
       
-   def __len__( self ):
+   def __len__(self):
       """The length of a StepVector is defined by its index range, not by
       the number of steps.
       """
       return self.stop - self.start
       
-   def num_steps( self ):
+   def num_steps(self):
       """Returns the number of steps, i.e., the number of triples that get_steps
       returns.
       """
       return self._swigobj.num_values()
       
-   def __eq__( self, other ):
+   def __eq__(self, other):
       """StepVectors can be compared for equality. This is conceptually done
       element for element, but, for performance, taking steps in one go.
       """
@@ -374,29 +374,29 @@ class StepVector( object ):
             othrstart, othrstop, othrval = othrsteps.next()
       return True
       
-   def __neq__( self, other ):
-      return not ( self == other )
+   def __neq__(self, other):
+      return not (self == other)
       
-   def __reduce__( self ):
+   def __reduce__(self):
       if self.__class__ is not StepVector:
          raise NotImplemented, "Attempting to pickle a subclass of StepVector without redefined __reduce__."
       return ( 
          _StepVector_unpickle, 
-         ( self.stop - self.start, self._typecode, self.start ),
+         (self.stop - self.start, self._typecode, self.start),
          None,
          None,
-         ( ( slice( start, stop ), val ) for start, stop, val in self.get_steps() ) )
+         ((slice(start, stop), val) for start, stop, val in self.get_steps()))
     
-   def __iadd__( self, value ):
-      self._swigobj.add_value( self.start, self.stop-1, value )
+   def __iadd__(self, value):
+      self._swigobj.add_value(self.start, self.stop-1, value)
       return self
     
-   def apply( self, func, start = None, stop = None ):
+   def apply(self, func, start=None, stop=None):
       # TODO: check!
-      for stepstart, stepstop, value in self.get_steps( start, stop ):
-         self[ stepstart : stepstop ] = func( value )
+      for stepstart, stepstop, value in self.get_steps(start, stop):
+         self[stepstart:stepstop] = func(value)
       
-def _StepVector_unpickle( length, typecode, start ):
-   return StepVector.create( length, typecode, start )
+def _StepVector_unpickle(length, typecode, start):
+   return StepVector.create(length, typecode, start)
     
 %}


=====================================
setup.py
=====================================
@@ -5,9 +5,9 @@ import os
 from distutils.log import INFO as logINFO
 
 if ((sys.version_info[0] == 2 and sys.version_info[1] < 7) or
-   (sys.version_info[0] == 3 and sys.version_info[1] < 4)):
+   (sys.version_info[0] == 3 and sys.version_info[1] < 5)):
     sys.stderr.write("Error in setup script for HTSeq:\n")
-    sys.stderr.write("HTSeq support Python 2.7 or 3.4+.")
+    sys.stderr.write("HTSeq support Python 2.7 or 3.5+.")
     sys.exit(1)
 
 # Manage python2/3 compatibility with symlinks



View it on GitLab: https://salsa.debian.org/med-team/htseq/-/commit/c1d63d3906aec70f2b59f7ae457c9885348447e5

-- 
View it on GitLab: https://salsa.debian.org/med-team/htseq/-/commit/c1d63d3906aec70f2b59f7ae457c9885348447e5
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20200304/caedaf05/attachment-0001.html>


More information about the debian-med-commit mailing list