diff --git a/.gitignore b/.gitignore
deleted file mode 100644
index a36f288..0000000
--- a/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.remote-sync.json
-__pycache__/
-NanoFilt.egg-info/
-dist/
-README.rst
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index c913540..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,24 +0,0 @@
-language: python
-
-python:
-  - "3.5"
-  - "3.5-dev"
-  - "3.6"
-  - "3.6-dev"
-
-before_install:
-  - cp README.md README.rst
-  - pip install flake8
-
-install:
-  - pip install -e .
-
-script:
-  - bash scripts/test.sh
-  - flake8 nanofilt/NanoFilt.py
-
-notifications:
-  email: false
-  webhooks:
-    urls:
-        - https://webhooks.gitter.im/e/4b1c45cea6826ce475c2
diff --git a/NanoFilt.egg-info/PKG-INFO b/NanoFilt.egg-info/PKG-INFO
new file mode 100644
index 0000000..0233779
--- /dev/null
+++ b/NanoFilt.egg-info/PKG-INFO
@@ -0,0 +1,100 @@
+Metadata-Version: 2.1
+Name: NanoFilt
+Version: 2.8.0
+Summary: Filtering and trimming of Oxford Nanopore Sequencing data
+Home-page: https://github.com/wdecoster/nanofilt
+Author: Wouter De Coster
+Author-email: decosterwouter@gmail.com
+License: GPLv3
+Keywords: nanopore sequencing processing trimming filtering
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Science/Research
+Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Requires-Python: >=3
+Description-Content-Type: text/markdown
+License-File: LICENSE
+
+# Nanofilt
+Filtering and trimming of long read sequencing data.
+
+[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster)](https://twitter.com/wouter_decoster)
+[![conda badge](https://anaconda.org/bioconda/nanofilt/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanofilt)
+[![Build Status](https://travis-ci.org/wdecoster/nanofilt.svg?branch=master)](https://travis-ci.org/wdecoster/nanofilt)
+
+
+
+Filtering on quality and/or read length, and optional trimming after passing filters.  
+Reads from stdin, writes to stdout.  Optionally reads directly from an uncompressed file specified on the command line.
+
+Intended to be used:  
+- directly after fastq extraction  
+- prior to mapping  
+- in a stream between extraction and mapping  
+
+See also [my post about NanoFilt on my blog Gigabase or gigabyte](https://gigabaseorgigabyte.wordpress.com/2017/06/05/trimming-and-filtering-oxford-nanopore-sequencing-reads/).  
+Due to [a discrepancy](https://gigabaseorgigabyte.wordpress.com/2017/07/14/calculated-average-quality-vs-albacore-summary/) between calculated read quality and the quality as summarized by albacore this script takes since v1.1.0 optionally also a `--summary` argument. Using this argument with the sequencing_summary.txt file from albacore will do the filtering using the quality scores from the summary. It's also faster.
+
+### INSTALLATION AND UPGRADING:
+
+`pip install nanofilt`  
+`pip install nanofilt --upgrade`
+
+or
+
+`conda install -c bioconda nanofilt`
+
+NanoFilt is written for Python 3.
+
+### USAGE:
+```
+NanoFilt [-h] [-v] [--logfile LOGFILE] [-l LENGTH]
+                [--maxlength MAXLENGTH] [-q QUALITY] [--minGC MINGC]
+                [--maxGC MAXGC] [--headcrop HEADCROP] [--tailcrop TAILCROP]
+                [-s SUMMARY] [--readtype {1D,2D,1D2}]
+                [input]
+
+Perform quality and/or length and/or GC filtering of (long read) fastq data. Reads on stdin.
+
+General options:
+  -h, --help            show the help and exit
+  -v, --version         Print version and exit.
+  --logfile LOGFILE     Specify the path and filename for the log file.
+  input                 input, uncompressed fastq file (optional)
+
+Options for filtering reads on.:
+  -l, --length LENGTH   Filter on a minimum read length
+  --maxlength MAXLENGTH Filter on a maximum read length
+  -q, --quality QUALITY Filter on a minimum average read quality score
+  --minGC MINGC         Sequences must have GC content >= to this. Float between 0.0 and 1.0. Ignored if
+                        using summary file.
+  --maxGC MAXGC         Sequences must have GC content <= to this. Float between 0.0 and 1.0. Ignored if
+                        using summary file.
+
+Options for trimming reads.:
+  --headcrop HEADCROP   Trim n nucleotides from start of read
+  --tailcrop TAILCROP   Trim n nucleotides from end of read
+
+Input options.:
+  -s, --summary SUMMARY Use albacore or guppy summary file for quality scores
+  --readtype            Which read type to extract information about from summary. Options are 1D, 2D or 1D2
+ ```
+
+### EXAMPLES
+```bash
+gunzip -c reads.fastq.gz | NanoFilt -q 10 -l 500 --headcrop 50 | minimap2 genome.fa - | samtools sort -O BAM -@24 -o alignment.bam -
+gunzip -c reads.fastq.gz | NanoFilt -q 12 --headcrop 75 | gzip > trimmed-reads.fastq.gz
+gunzip -c reads.fastq.gz | NanoFilt -q 10 | gzip > highQuality-reads.fastq.gz
+```
+
+I welcome all suggestions, bug reports, feature requests and contributions. Please leave an [issue](https://github.com/wdecoster/nanofilt/issues) or open a pull request. I will usually respond within a day, or rarely within a few days.
+
+## CITATION
+If you use this tool, please consider citing our [publication](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939).
+
+
diff --git a/NanoFilt.egg-info/SOURCES.txt b/NanoFilt.egg-info/SOURCES.txt
new file mode 100644
index 0000000..9d8421f
--- /dev/null
+++ b/NanoFilt.egg-info/SOURCES.txt
@@ -0,0 +1,19 @@
+LICENSE
+MANIFEST.in
+README.md
+README.rst
+setup.cfg
+setup.py
+NanoFilt.egg-info/PKG-INFO
+NanoFilt.egg-info/SOURCES.txt
+NanoFilt.egg-info/dependency_links.txt
+NanoFilt.egg-info/entry_points.txt
+NanoFilt.egg-info/requires.txt
+NanoFilt.egg-info/top_level.txt
+nanofilt/NanoFilt.py
+nanofilt/__init__.py
+nanofilt/utils.py
+nanofilt/version.py
+scripts/get_read_ends.py
+scripts/test.sh
+scripts/timefilt.py
\ No newline at end of file
diff --git a/NanoFilt.egg-info/dependency_links.txt b/NanoFilt.egg-info/dependency_links.txt
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/NanoFilt.egg-info/dependency_links.txt
@@ -0,0 +1 @@
+
diff --git a/NanoFilt.egg-info/entry_points.txt b/NanoFilt.egg-info/entry_points.txt
new file mode 100644
index 0000000..633dc04
--- /dev/null
+++ b/NanoFilt.egg-info/entry_points.txt
@@ -0,0 +1,3 @@
+[console_scripts]
+NanoFilt = nanofilt.NanoFilt:main
+
diff --git a/NanoFilt.egg-info/requires.txt b/NanoFilt.egg-info/requires.txt
new file mode 100644
index 0000000..6dd9769
--- /dev/null
+++ b/NanoFilt.egg-info/requires.txt
@@ -0,0 +1,2 @@
+biopython
+pandas>=0.22.0
diff --git a/NanoFilt.egg-info/top_level.txt b/NanoFilt.egg-info/top_level.txt
new file mode 100644
index 0000000..30d0a6a
--- /dev/null
+++ b/NanoFilt.egg-info/top_level.txt
@@ -0,0 +1,2 @@
+nanofilt
+scripts
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..0233779
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,100 @@
+Metadata-Version: 2.1
+Name: NanoFilt
+Version: 2.8.0
+Summary: Filtering and trimming of Oxford Nanopore Sequencing data
+Home-page: https://github.com/wdecoster/nanofilt
+Author: Wouter De Coster
+Author-email: decosterwouter@gmail.com
+License: GPLv3
+Keywords: nanopore sequencing processing trimming filtering
+Platform: UNKNOWN
+Classifier: Development Status :: 4 - Beta
+Classifier: Intended Audience :: Science/Research
+Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
+Classifier: License :: OSI Approved :: MIT License
+Classifier: Programming Language :: Python :: 3
+Classifier: Programming Language :: Python :: 3.3
+Classifier: Programming Language :: Python :: 3.4
+Classifier: Programming Language :: Python :: 3.5
+Requires-Python: >=3
+Description-Content-Type: text/markdown
+License-File: LICENSE
+
+# Nanofilt
+Filtering and trimming of long read sequencing data.
+
+[![Twitter URL](https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster)](https://twitter.com/wouter_decoster)
+[![conda badge](https://anaconda.org/bioconda/nanofilt/badges/installer/conda.svg)](https://anaconda.org/bioconda/nanofilt)
+[![Build Status](https://travis-ci.org/wdecoster/nanofilt.svg?branch=master)](https://travis-ci.org/wdecoster/nanofilt)
+
+
+
+Filtering on quality and/or read length, and optional trimming after passing filters.  
+Reads from stdin, writes to stdout.  Optionally reads directly from an uncompressed file specified on the command line.
+
+Intended to be used:  
+- directly after fastq extraction  
+- prior to mapping  
+- in a stream between extraction and mapping  
+
+See also [my post about NanoFilt on my blog Gigabase or gigabyte](https://gigabaseorgigabyte.wordpress.com/2017/06/05/trimming-and-filtering-oxford-nanopore-sequencing-reads/).  
+Due to [a discrepancy](https://gigabaseorgigabyte.wordpress.com/2017/07/14/calculated-average-quality-vs-albacore-summary/) between calculated read quality and the quality as summarized by albacore this script takes since v1.1.0 optionally also a `--summary` argument. Using this argument with the sequencing_summary.txt file from albacore will do the filtering using the quality scores from the summary. It's also faster.
+
+### INSTALLATION AND UPGRADING:
+
+`pip install nanofilt`  
+`pip install nanofilt --upgrade`
+
+or
+
+`conda install -c bioconda nanofilt`
+
+NanoFilt is written for Python 3.
+
+### USAGE:
+```
+NanoFilt [-h] [-v] [--logfile LOGFILE] [-l LENGTH]
+                [--maxlength MAXLENGTH] [-q QUALITY] [--minGC MINGC]
+                [--maxGC MAXGC] [--headcrop HEADCROP] [--tailcrop TAILCROP]
+                [-s SUMMARY] [--readtype {1D,2D,1D2}]
+                [input]
+
+Perform quality and/or length and/or GC filtering of (long read) fastq data. Reads on stdin.
+
+General options:
+  -h, --help            show the help and exit
+  -v, --version         Print version and exit.
+  --logfile LOGFILE     Specify the path and filename for the log file.
+  input                 input, uncompressed fastq file (optional)
+
+Options for filtering reads on.:
+  -l, --length LENGTH   Filter on a minimum read length
+  --maxlength MAXLENGTH Filter on a maximum read length
+  -q, --quality QUALITY Filter on a minimum average read quality score
+  --minGC MINGC         Sequences must have GC content >= to this. Float between 0.0 and 1.0. Ignored if
+                        using summary file.
+  --maxGC MAXGC         Sequences must have GC content <= to this. Float between 0.0 and 1.0. Ignored if
+                        using summary file.
+
+Options for trimming reads.:
+  --headcrop HEADCROP   Trim n nucleotides from start of read
+  --tailcrop TAILCROP   Trim n nucleotides from end of read
+
+Input options.:
+  -s, --summary SUMMARY Use albacore or guppy summary file for quality scores
+  --readtype            Which read type to extract information about from summary. Options are 1D, 2D or 1D2
+ ```
+
+### EXAMPLES
+```bash
+gunzip -c reads.fastq.gz | NanoFilt -q 10 -l 500 --headcrop 50 | minimap2 genome.fa - | samtools sort -O BAM -@24 -o alignment.bam -
+gunzip -c reads.fastq.gz | NanoFilt -q 12 --headcrop 75 | gzip > trimmed-reads.fastq.gz
+gunzip -c reads.fastq.gz | NanoFilt -q 10 | gzip > highQuality-reads.fastq.gz
+```
+
+I welcome all suggestions, bug reports, feature requests and contributions. Please leave an [issue](https://github.com/wdecoster/nanofilt/issues) or open a pull request. I will usually respond within a day, or rarely within a few days.
+
+## CITATION
+If you use this tool, please consider citing our [publication](https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939).
+
+
diff --git a/README.rst b/README.rst
index de63961..e1e50e5 100644
--- a/README.rst
+++ b/README.rst
@@ -3,11 +3,12 @@ Nanofilt
 
 Filtering and trimming of long read sequencing data.
 
-|Twitter URL| |conda badge| |Build Status| |Code Health|
+|Twitter URL| |conda badge| |Build Status|
 
 | Filtering on quality and/or read length, and optional trimming after
   passing filters.
-| Reads from stdin, writes to stdout.
+| Reads from stdin, writes to stdout. Optionally reads directly from an
+  uncompressed file specified on the command line.
 
 | Intended to be used:
 | - directly after fastq extraction
@@ -21,8 +22,8 @@ Filtering and trimming of long read sequencing data.
   between calculated read quality and the quality as summarized by
   albacore this script takes since v1.1.0 optionally also a
   ``--summary`` argument. Using this argument with the
-  sequencing\_summary.txt file from albacore will do the filtering using
-  the quality scores from the summary. It's also faster.
+  sequencing_summary.txt file from albacore will do the filtering using
+  the quality scores from the summary. It’s also faster.
 
 INSTALLATION AND UPGRADING:
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -41,28 +42,45 @@ USAGE:
 
 ::
 
-    NanoFilt [-h] [-q QUALITY] [-l LENGTH] [--headcrop HEADCROP] [--tailcrop TAILCROP]
-
-    optional arguments:  
-      -h, --help            show this help message and exit  
-      -s --summary SUMMARYFILE optional, the sequencing_summary file from albacore for extracting quality scores
-      -q, --quality QUALITY  Filter on a minimum average read quality score  
-      -l, --length LENGTH Filter on a minimum read length  
-      --headcrop HEADCROP   Trim n nucleotides from start of read  
-      --tailcrop TAILCROP   Trim n nucleotides from end of read
-      --minGC MINGC         Sequences must have GC content >= to this. Float
-                            between 0.0 and 1.0. Ignored if using summary file.
-      --maxGC MAXGC         Sequences must have GC content <= to this. Float
-                            between 0.0 and 1.0. Ignored if using summary file.
+   NanoFilt [-h] [-v] [--logfile LOGFILE] [-l LENGTH]
+                   [--maxlength MAXLENGTH] [-q QUALITY] [--minGC MINGC]
+                   [--maxGC MAXGC] [--headcrop HEADCROP] [--tailcrop TAILCROP]
+                   [-s SUMMARY] [--readtype {1D,2D,1D2}]
+                   [input]
+
+   Perform quality and/or length and/or GC filtering of (long read) fastq data. Reads on stdin.
+
+   General options:
+     -h, --help            show the help and exit
+     -v, --version         Print version and exit.
+     --logfile LOGFILE     Specify the path and filename for the log file.
+     input                 input, uncompressed fastq file (optional)
+
+   Options for filtering reads on.:
+     -l, --length LENGTH   Filter on a minimum read length
+     --maxlength MAXLENGTH Filter on a maximum read length
+     -q, --quality QUALITY Filter on a minimum average read quality score
+     --minGC MINGC         Sequences must have GC content >= to this. Float between 0.0 and 1.0. Ignored if
+                           using summary file.
+     --maxGC MAXGC         Sequences must have GC content <= to this. Float between 0.0 and 1.0. Ignored if
+                           using summary file.
+
+   Options for trimming reads.:
+     --headcrop HEADCROP   Trim n nucleotides from start of read
+     --tailcrop TAILCROP   Trim n nucleotides from end of read
+
+   Input options.:
+     -s, --summary SUMMARY Use albacore or guppy summary file for quality scores
+     --readtype            Which read type to extract information about from summary. Options are 1D, 2D or 1D2
 
 EXAMPLES
 ~~~~~~~~
 
 .. code:: bash
 
-    gunzip -c reads.fastq.gz | NanoFilt -q 10 -l 500 --headcrop 50 | minimap2 genome.fa - | samtools sort -O BAM -@24 -o alignment.bam -
-    gunzip -c reads.fastq.gz | NanoFilt -q 12 --headcrop 75 | gzip > trimmed-reads.fastq.gz
-    gunzip -c reads.fastq.gz | NanoFilt -q 10 | gzip > highQuality-reads.fastq.gz
+   gunzip -c reads.fastq.gz | NanoFilt -q 10 -l 500 --headcrop 50 | minimap2 genome.fa - | samtools sort -O BAM -@24 -o alignment.bam -
+   gunzip -c reads.fastq.gz | NanoFilt -q 12 --headcrop 75 | gzip > trimmed-reads.fastq.gz
+   gunzip -c reads.fastq.gz | NanoFilt -q 10 | gzip > highQuality-reads.fastq.gz
 
 I welcome all suggestions, bug reports, feature requests and
 contributions. Please leave an
@@ -70,11 +88,15 @@ contributions. Please leave an
 request. I will usually respond within a day, or rarely within a few
 days.
 
+CITATION
+--------
+
+If you use this tool, please consider citing our
+`publication <https://academic.oup.com/bioinformatics/advance-article/doi/10.1093/bioinformatics/bty149/4934939>`__.
+
 .. |Twitter URL| image:: https://img.shields.io/twitter/url/https/twitter.com/wouter_decoster.svg?style=social&label=Follow%20%40wouter_decoster
    :target: https://twitter.com/wouter_decoster
 .. |conda badge| image:: https://anaconda.org/bioconda/nanofilt/badges/installer/conda.svg
    :target: https://anaconda.org/bioconda/nanofilt
 .. |Build Status| image:: https://travis-ci.org/wdecoster/nanofilt.svg?branch=master
    :target: https://travis-ci.org/wdecoster/nanofilt
-.. |Code Health| image:: https://landscape.io/github/wdecoster/nanofilt/master/landscape.svg?style=flat
-   :target: https://landscape.io/github/wdecoster/nanofilt/master
diff --git a/debian/changelog b/debian/changelog
index be142d9..9c1eeaa 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+nanofilt (2.6.0+git20210224.1.76147c1-1) UNRELEASED; urgency=low
+
+  * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Fri, 15 Apr 2022 16:42:27 -0000
+
 nanofilt (2.6.0-4) unstable; urgency=medium
 
   * Team upload.
diff --git a/nanofilt/NanoFilt.py b/nanofilt/NanoFilt.py
index 209b364..997a2a9 100644
--- a/nanofilt/NanoFilt.py
+++ b/nanofilt/NanoFilt.py
@@ -36,6 +36,8 @@ def main():
     try:
         if args.tailcrop:
             args.tailcrop = -args.tailcrop
+        if args.tailcrop == 0:
+            args.tailcrop = None
         if args.summary:
             filter_using_summary(args.input, args)
         else:
@@ -94,15 +96,17 @@ def filter_using_summary(fq, args):
     ).rename(mapper={"mean_qscore_template": "quals", "mean_qscore_2d": "quals"}, axis="columns") \
         .set_index("read_id") \
         .to_dict()["quals"]
-    try:
-        for rec in SeqIO.parse(fq, "fastq"):
+    for rec in SeqIO.parse(fq, "fastq"):
+        try:
             if data[rec.id] >= args.quality and args.length <= len(rec) <= args.maxlength:
                 print(rec[args.headcrop:args.tailcrop].format("fastq"), end="")
-    except KeyError:
-        logging.error("mismatch between summary and fastq: \
-                       {} was not found in the summary file.".format(rec.id))
-        sys.exit('\nERROR: mismatch between sequencing_summary and fastq file: \
-                 {} was not found in the summary file.\nQuitting.'.format(rec.id))
+        except KeyError:
+            logging.warning("mismatch between summary and fastq: \
+                   {} was not found in the summary file. \
+                   Falling back to calculating.".format(rec.id))
+            if ave_qual(rec.letter_annotations["phred_quality"]) >= args.quality \
+                    and args.length <= len(rec) <= args.maxlength:
+                print(rec[args.headcrop:args.tailcrop].format("fastq"), end="")
 
 
 def errs_tab(n):
diff --git a/nanofilt/version.py b/nanofilt/version.py
index e5e59e3..892994a 100644
--- a/nanofilt/version.py
+++ b/nanofilt/version.py
@@ -1 +1 @@
-__version__ = "2.6.0"
+__version__ = "2.8.0"
diff --git a/setup.cfg b/setup.cfg
index 0e2e870..8b278d5 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,7 @@
 [flake8]
-max-line-length=100
+max-line-length = 100
+
+[egg_info]
+tag_build = 
+tag_date = 0
+
diff --git a/setup.py b/setup.py
index 97ec651..dd14a8a 100644
--- a/setup.py
+++ b/setup.py
@@ -17,7 +17,7 @@ setup(
     url='https://github.com/wdecoster/nanofilt',
     author='Wouter De Coster',
     author_email='decosterwouter@gmail.com',
-    license='MIT',
+    license='GPLv3',
     classifiers=[
         'Development Status :: 4 - Beta',
         'Intended Audience :: Science/Research',