Skip to content
Commits on Source (9)
comment: off
codecov:
require_ci_to_pass: no
coverage:
precision: 1
round: down
range: "90...100"
status:
project: yes
patch: no
changes: no
comment: off
[*.{py,pyx,rst}]
charset=utf-8
end_of_line=lf
insert_final_newline=true
indent_style=space
indent_size=4
<!--
When reporting an issue, please include this information:
- Cutadapt and Python version
- How you installed the tool (conda or pip, for example)
- Which command-line parameters you used
If you report unexpected trimming behavior, this would also be helpful:
- An example input read (or read pair)
- The output that cutadapt produces
- The output that you would have expected
Feel free to delete this text before submitting your issue.
-->
# Editor-specific ignore patterns such as "*~" should be added to
# ~/.config/git/ignore, not here.
*.pyc
__pycache__/
/MANIFEST
/build/
/dist/
/.coverage
/.tox
/.cache
/.pytest_cache
/src/cutadapt/*.c
/src/cutadapt/*.so
/doc/_build
/src/cutadapt.egg-info/
src/cutadapt/_version.py
language: python
dist: xenial
cache:
directories:
- $HOME/.cache/pip
python:
- "3.5"
- "3.6"
- "3.7"
- "3.8-dev"
- "nightly"
install:
- pip install 'Cython>=0.28' tox-travis
script:
- tox
after_success:
- pip install codecov
- codecov
env:
global:
#- TWINE_REPOSITORY_URL=https://test.pypi.org/legacy/
- TWINE_USERNAME=marcelm
# TWINE_PASSWORD is set in Travis settings
jobs:
include:
- stage: deploy
services:
- docker
python: "3.6"
install: python3 -m pip install Cython twine
if: tag IS present
script:
- |
python3 setup.py sdist
./buildwheels.sh
ls -l dist/
python3 -m twine upload dist/*
- name: flake8
python: "3.6"
install: python3 -m pip install flake8
script: flake8 src/ tests/
allow_failures:
- python: "nightly"
......@@ -2,6 +2,19 @@
Changes
=======
v2.6 (2019-10-26)
-----------------
* :issue:`395`: Do not show animated progress when ``--quiet`` is used.
* :issue:`399`: When two adapters align to a read equally well (in terms
of the number of matches), prefer the alignment that has fewer errors.
* :issue:`401` Give priority to adapters given earlier on the command
line. Previously, the priority was: All 3' adapters, all 5' adapters,
all anywhere adapters. In rare cases this could lead to different results.
* :issue:`404`: Fix an issue preventing Cutadapt from being used on Windows.
* This release no longer supports Python 3.4 (which has reached end of life).
v2.5 (2019-09-04)
-----------------
......
Contributing
------------
Contributions to Cutadapt in the form of source code or documentation
improvements or helping out with responding to issues are welcome!
To contribute to Cutadapt development, it is easiest to send in a pull request
(PR) on GitHub.
Here are some guidelines for how to do this. They are not strict rules. When in
doubt, send in a PR and we will sort it out.
* Limit a PR to a single topic. Submit multiple PRs if necessary. This way, it
is easier to discuss the changes individually, and in case we find that one
of them should not go in, the others can still be accepted.
* For larger changes, consider opening an issue first to plan what you want to
do.
* Include appropriate unit or integration tests. Sometimes, tests are hard to
write or don’t make sense. If you think this is the case, just leave the tests
out initially and we can discuss whether to add any.
* Add documentation and a changelog entry if appropriate.
Code style
~~~~~~~~~~
* Cutadapt tries to follow PEP8, except that the allowed line length is 100
characters, not 80. But try to wrap comments after 80 characters.
* There are inconsistencies in the current code base since it’s a few years old
already. New code should follow the current rules, however.
* At the moment, no automatic code formatting is done, but one idea might be to
switch to the `black <https://black.readthedocs.io/>`_ code formatter at some
point. If you’re familiar with its style, you can use that already now for
new code to make the diff smaller.
* Prefer double quotation marks in new code. This will also make the diff smaller
if we eventually switch to black.
* Using an IDE is beneficial (PyCharm, for example). It helps to catch lots of
style issues early (unused imports, spacing etc.).
* Avoid unnecessary abbreviations for variable names. Code is more often read
than written.
* When writing a help text for a new command-line option, look at the output of
``cutadapt --help`` and try to make it look nice and short.
* In comments and documentation, capitalize FASTQ, BWA, CPU etc.
include CHANGES.rst
include CITATION
include LICENSE
include README.rst
include pyproject.toml
include doc/*.rst
include doc/conf.py
include doc/Makefile
include src/cutadapt/*.c
include src/cutadapt/*.pyx
include tests/*.py
graft tests/data
graft tests/cut
Metadata-Version: 2.1
Name: cutadapt
Version: 2.5
Summary: trim adapters from high-throughput sequencing reads
Home-page: https://cutadapt.readthedocs.io/
Author: Marcel Martin
Author-email: marcel.martin@scilifelab.se
License: MIT
Description: .. image:: https://travis-ci.org/marcelm/cutadapt.svg?branch=master
:target: https://travis-ci.org/marcelm/cutadapt
:alt:
.. image:: https://img.shields.io/pypi/v/cutadapt.svg?branch=master
:target: https://pypi.python.org/pypi/cutadapt
:alt:
.. image:: https://codecov.io/gh/marcelm/cutadapt/branch/master/graph/badge.svg
:target: https://codecov.io/gh/marcelm/cutadapt
:alt:
========
Cutadapt
========
Cutadapt finds and removes adapter sequences, primers, poly-A tails and other
types of unwanted sequence from your high-throughput sequencing reads.
Cleaning your data in this way is often required: Reads from small-RNA
sequencing contain the 3’ sequencing adapter because the read is longer than
the molecule that is sequenced. Amplicon reads start with a primer sequence.
Poly-A tails are useful for pulling out RNA from your sample, but often you
don’t want them to be in your reads.
Cutadapt helps with these trimming tasks by finding the adapter or primer
sequences in an error-tolerant way. It can also modify and filter reads in
various ways. Adapter sequences can contain IUPAC wildcard characters. Also,
paired-end reads and even colorspace data is supported. If you want, you can
also just demultiplex your input data, without removing adapter sequences at all.
Cutadapt comes with an extensive suite of automated tests and is available under
the terms of the MIT license.
If you use Cutadapt, please cite
`DOI:10.14806/ej.17.1.200 <http://dx.doi.org/10.14806/ej.17.1.200>`_ .
Links
-----
* `Documentation <https://cutadapt.readthedocs.io/>`_
* `Source code <https://github.com/marcelm/cutadapt/>`_
* `Report an issue <https://github.com/marcelm/cutadapt/issues>`_
* `Project page on PyPI (Python package index) <https://pypi.python.org/pypi/cutadapt/>`_
* `Follow @marcelm_ on Twitter <https://twitter.com/marcelm_>`_
* `Wrapper for the Galaxy platform <https://bitbucket.org/lance_parsons/cutadapt_galaxy_wrapper>`_
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Console
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.4
Provides-Extra: dev
......@@ -10,6 +10,11 @@
:target: https://codecov.io/gh/marcelm/cutadapt
:alt:
.. image:: https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg?style=flat
:target: http://bioconda.github.io/recipes/cutadapt/README.html
:alt: install with bioconda
========
Cutadapt
========
......@@ -24,13 +29,16 @@ Poly-A tails are useful for pulling out RNA from your sample, but often you
don’t want them to be in your reads.
Cutadapt helps with these trimming tasks by finding the adapter or primer
sequences in an error-tolerant way. It can also modify and filter reads in
various ways. Adapter sequences can contain IUPAC wildcard characters. Also,
paired-end reads and even colorspace data is supported. If you want, you can
also just demultiplex your input data, without removing adapter sequences at all.
sequences in an error-tolerant way. It can also modify and filter single-end
and paired-end reads in various ways. Adapter sequences can contain IUPAC
wildcard characters. Cutadapt can also demultiplex your reads.
Cutadapt is available under the terms of the MIT license.
Cutadapt comes with an extensive suite of automated tests and is available under
the terms of the MIT license.
Cutadapt development was started at `TU Dortmund University <https://www.tu-dortmund.de>`_
in the group of `Prof. Dr. Sven Rahmann <https://www.rahmannlab.de/>`_.
It is currently being developed within
`NBIS (National Bioinformatics Infrastructure Sweden) <https://nbis.se/>`_.
If you use Cutadapt, please cite
`DOI:10.14806/ej.17.1.200 <http://dx.doi.org/10.14806/ej.17.1.200>`_ .
......@@ -44,4 +52,4 @@ Links
* `Report an issue <https://github.com/marcelm/cutadapt/issues>`_
* `Project page on PyPI (Python package index) <https://pypi.python.org/pypi/cutadapt/>`_
* `Follow @marcelm_ on Twitter <https://twitter.com/marcelm_>`_
* `Wrapper for the Galaxy platform <https://bitbucket.org/lance_parsons/cutadapt_galaxy_wrapper>`_
* `Wrapper for the Galaxy platform <https://github.com/galaxyproject/tools-iuc/tree/master/tools/cutadapt>`_
#!/bin/bash
#
# Build manylinux1 wheels for cutadapt. Based on the example at
# <https://github.com/pypa/python-manylinux-demo>
#
# It is best to run this in a fresh clone of the repository!
#
# Run this within the repository root:
# docker run --rm -v $(pwd):/io quay.io/pypa/manylinux1_x86_64 /io/buildwheels.sh
#
# The wheels will be put into the wheelhouse/ subdirectory.
#
# For interactive tests:
# docker run -it -v $(pwd):/io quay.io/pypa/manylinux1_x86_64 /bin/bash
set -xeuo pipefail
MANYLINUX=quay.io/pypa/manylinux2010_x86_64
# For convenience, if this script is called from outside of a docker container,
# it starts a container and runs itself inside of it.
if ! grep -q docker /proc/1/cgroup; then
# We are not inside a container
docker pull ${MANYLINUX}
exec docker run --rm -v $(pwd):/io ${MANYLINUX} /io/$0
fi
# Strip binaries (copied from multibuild)
STRIP_FLAGS=${STRIP_FLAGS:-"-Wl,-strip-all"}
export CFLAGS="${CFLAGS:-$STRIP_FLAGS}"
export CXXFLAGS="${CXXFLAGS:-$STRIP_FLAGS}"
# We require Python 3.5+
rm /opt/python/cp27* /opt/python/cp34*
PYBINS="/opt/python/*/bin"
HAS_CYTHON=0
for PYBIN in ${PYBINS}; do
# ${PYBIN}/pip install -r /io/requirements.txt
${PYBIN}/pip wheel /io/ -w wheelhouse/
done
# Bundle external shared libraries into the wheels
for whl in wheelhouse/cutadapt-*.whl; do
auditwheel repair "$whl" --plat manylinux1_x86_64 -w repaired/
done
# Created files are owned by root, so fix permissions.
chown -R --reference=/io/setup.py repaired/
mv repaired/*.whl /io/dist/
# TODO Install packages and test them
#for PYBIN in ${PYBINS}; do
# ${PYBIN}/pip install cutadapt --no-index -f /io/wheelhouse
# (cd $HOME; ${PYBIN}/nosetests ...)
#done
python-cutadapt (2.6-1) unstable; urgency=medium
* Team upload
* New upstream version
* Now fetching sources from github
-- Steffen Moeller <moeller@debian.org> Wed, 30 Oct 2019 10:17:14 +0100
python-cutadapt (2.5-1) unstable; urgency=medium
* Team upload.
......
......@@ -14,7 +14,7 @@ Build-Depends: debhelper-compat (= 12),
python3-setuptools-scm,
python3-pytest-timeout,
python3-xopen (>= 0.5.0),
python3-dnaio,
python3-dnaio (>= 0.4),
cython3
Standards-Version: 4.4.1
Vcs-Browser: https://salsa.debian.org/med-team/python-cutadapt
......
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: python-cutadapt
Source: http://pypi.python.org/pypi/cutadapt
Source: https://github.com/marcelm/cutadapt
Files: *
Copyright: 2010-2015 Marcel Martin <marcel.martin@scilifelab.se>
......
......@@ -4,9 +4,11 @@ Description: Since built-time tests are running before installation,
executables are not available yet.
--- a/tests/test_commandline.py
+++ b/tests/test_commandline.py
@@ -541,6 +541,7 @@
Index: python-cutadapt/tests/test_commandline.py
===================================================================
--- python-cutadapt.orig/tests/test_commandline.py
+++ python-cutadapt/tests/test_commandline.py
@@ -561,6 +561,7 @@ def test_negative_length(run):
run('--length -5', 'shortened-negative.fastq', 'small.fastq')
......
......@@ -34,3 +34,6 @@ endif
override_dh_auto_clean:
dh_auto_clean
rm -rf src/cutadapt.egg-info/ .pytest_cache
rm -f src/cutadapt/_version.py
# cython-generated files
rm -f src/cutadapt/_align.c src/cutadapt/qualtrim.c
version=4
opts=uversionmangle=s/(rc|a|b|c)/~$1/ \
https://pypi.debian.net/cutadapt/cutadapt-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))
\ No newline at end of file
opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%cutadapt-$1.tar.gz%" \
https://github.com/marcelm/cutadapt/tags \
(?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate
#uversionmangle=s/(rc|a|b|c)/~$1/
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
version="1.0"
width="500.50909"
height="365.63535"
id="svg5571">
<defs
id="defs5573" />
<metadata
id="metadata5576">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
transform="translate(-4.4323702,147.9297)"
id="layer1">
<rect
width="35.933102"
height="7.0866098"
x="111.386"
y="-52.720001"
id="rect6974"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="106.299"
height="7.0866098"
x="5.0866399"
y="-52.720001"
id="rect3625"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="141.73199"
height="7.0866098"
x="5.5865898"
y="-52.720001"
id="rect5585"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866096"
height="7.0866199"
x="83.385101"
y="-123.586"
id="rect6102"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#84b818;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="71.020401"
height="7.0866299"
x="111.732"
y="-66.893303"
id="rect6104"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#84b818;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866096"
height="7.0866098"
x="268.57001"
y="136.66589"
id="rect6130"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866096"
height="7.0866098"
x="268.57001"
y="172.099"
id="rect6972"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#84b818;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866096"
height="7.0866199"
x="268.57001"
y="207.532"
id="rect7032"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<text
x="353.60956"
y="214.61865"
id="text6978"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Lato;-inkscape-font-specification:Lato"><tspan
x="353.60956"
y="214.61865"
id="tspan6980">Removed sequence</tspan></text>
<text
x="353.60956"
y="179.18559"
id="text6982"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Lato;-inkscape-font-specification:Lato"><tspan
x="353.60956"
y="179.18559"
id="tspan6984">Adapter</tspan></text>
<text
x="353.60956"
y="143.75253"
id="text6986"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Lato;-inkscape-font-specification:Lato"><tspan
x="353.60956"
y="143.75253"
id="tspan6988">Read </tspan></text>
<rect
width="70.866096"
height="7.0866098"
x="4.9323802"
y="193.35901"
id="rect5587"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#84b818;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866096"
height="7.0866098"
x="4.9324002"
y="207.532"
id="rect7030"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="141.73199"
height="7.0866098"
x="4.9324002"
y="207.532"
id="rect6976"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="99.712601"
height="7.0866199"
x="82.885101"
y="-109.413"
id="rect7028"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="77.952797"
height="7.0866199"
x="4.9324002"
y="-109.413"
id="rect3627"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="177.16499"
height="7.0866098"
x="5.4323401"
y="-109.413"
id="rect7199"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866096"
height="7.0865698"
x="4.9323702"
y="24.8864"
id="rect6128"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#84b818;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866096"
height="7.0865698"
x="4.9323902"
y="81.5793"
id="rect6114"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#84b818;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866203"
height="7.0866299"
x="4.9323702"
y="39.059551"
id="rect7058"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.366096"
height="7.0866299"
x="-146.16499"
y="39.059551"
transform="scale(-1,1)"
id="rect3629"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="141.73199"
height="7.0866098"
x="4.9323702"
y="39.059551"
id="rect6132"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="35.433102"
height="7.0866199"
x="40.365501"
y="95.752502"
id="rect7056"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#b3b3b3;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="70.866203"
height="7.0866199"
x="75.2985"
y="95.752502"
id="rect3631"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<rect
width="106.299"
height="7.0866098"
x="40.365501"
y="95.752502"
id="rect6134"
style="font-size:12px;font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;text-align:start;line-height:125%;writing-mode:lr-tb;text-anchor:start;fill:none;stroke:#000000;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Times New Roman;-inkscape-font-specification:'Times New Roman, Bold'" />
<text
x="4.9323802"
y="10.713129"
id="text3333"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Lato;-inkscape-font-specification:Lato"><tspan
x="4.9323802"
y="10.713129"
id="tspan3335">5' Adapter</tspan></text>
<text
x="4.9323802"
y="-130.6727"
id="text3337"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Lato;-inkscape-font-specification:Lato"><tspan
x="4.9323802"
y="-130.6727"
id="tspan3339">3' Adapter</tspan></text>
<text
x="4.9323802"
y="179.18558"
id="text3341"
xml:space="preserve"
style="font-size:18px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Lato;-inkscape-font-specification:Lato"><tspan
x="4.9323802"
y="179.18558"
id="tspan3343">Anchored 5' adapter</tspan></text>
<text
x="40.865387"
y="-81.066414"
id="text3349"
xml:space="preserve"
style="font-size:13.63599968px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Lato;-inkscape-font-specification:Lato"><tspan
x="40.865387"
y="-81.066414"
id="tspan3351">or</tspan></text>
<text
x="40.365467"
y="67.405998"
id="text3353"
xml:space="preserve"
style="font-size:13.63599968px;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-align:start;line-height:125%;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#000000;fill-opacity:1;stroke:none;font-family:Lato;-inkscape-font-specification:Lato"><tspan
x="40.365467"
y="67.405998"
id="tspan3355">or</tspan></text>
</g>
</svg>
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="56.122009"
height="51.8545"
id="svg3076"
version="1.1"
inkscape:version="0.48.5 r10040"
sodipodi:docname="Cutadapt logo">
<defs
id="defs3078" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.6502665"
inkscape:cx="41.639266"
inkscape:cy="34.486602"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="2"
fit-margin-left="2"
fit-margin-right="2"
fit-margin-bottom="2"
inkscape:window-width="1305"
inkscape:window-height="763"
inkscape:window-x="-4"
inkscape:window-y="56"
inkscape:window-maximized="0" />
<metadata
id="metadata3081">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-346.939,-506.43493)">
<g
transform="translate(44.935994,179.79303)"
style="display:inline"
id="g4093"
inkscape:export-filename="cutadapt.png"
inkscape:export-xdpi="276"
inkscape:export-ydpi="276">
<path
inkscape:connector-curvature="0"
id="path4068"
transform="translate(0,308.2677)"
d="m 349.625,34.1875 -7.78125,3.625 c 0.91994,1.970873 1.4375,4.181472 1.4375,6.5 0,2.318528 -0.51756,4.497877 -1.4375,6.46875 l 7.78125,3.625 c 2.98923,-6.41042 2.98923,-13.808331 0,-20.21875 z"
style="fill:#aad400;fill-opacity:1;display:inline" />
<path
inkscape:connector-curvature="0"
id="path4066"
transform="translate(0,308.2677)"
d="m 328.15625,20.375 c -6.89497,-0.05633 -13.78424,2.867991 -18.5625,8.5625 -8.49469,10.123572 -7.15482,25.192814 2.96875,33.6875 10.12357,8.494686 25.19281,7.186072 33.6875,-2.9375 l -6.40625,-5.375 c -2.85492,3.3998 -7.11936,5.5625 -11.90625,5.5625 -8.59538,0 -15.5625,-6.96712 -15.5625,-15.5625 0,-8.59538 6.96712,-15.5625 15.5625,-15.5625 4.78689,0 9.05133,2.1627 11.90625,5.5625 l 6.40625,-5.375 c -0.8954,-1.067094 -1.87041,-2.073352 -2.9375,-2.96875 -4.42906,-3.716425 -9.7935,-5.54994 -15.15625,-5.59375 z"
style="fill:#217821;fill-opacity:1;display:inline" />
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="path4072"
transform="translate(0,308.2677)"
d="m 353.4375,25.09375 -15.28125,11.5 0.0497,1.108915 1.04406,0.578585 16.875,-8.96875 c -0.78525,-1.47685 -1.68088,-2.882924 -2.6875,-4.21875 z"
style="fill:#217821;fill-opacity:1;display:inline" />
<path
sodipodi:nodetypes="cccccc"
inkscape:connector-curvature="0"
id="path4074"
transform="translate(0,308.2677)"
d="m 339.25,50.3125 -1.04688,0.4375 -0.0469,1.25 15.28125,11.53125 c 1.00662,-1.335826 1.90224,-2.77315 2.6875,-4.25 z"
style="fill:#217821;fill-opacity:1;display:inline" />
</g>
</g>
</svg>
......@@ -20,9 +20,8 @@ Compressed in- and output files are also supported::
Cutadapt searches for the adapter in all reads and removes it when it finds it.
Unless you use a filtering option, all reads that were present in the input file
will also be present in the output file, some of them trimmed, some of them not.
Even reads that were trimmed entirely (because the adapter was found in the very
beginning) are output. All of this can be changed with command-line options,
explained further down.
Even reads that were trimmed to a length of zero are output. All of this can be
changed with command-line options, explained further down.
:ref:`Trimming of paired-end data <paired-end>` is also supported.
......@@ -30,30 +29,18 @@ explained further down.
Input and output file formats
-----------------------------
Input and output files need to be in FASTA or FASTQ format. Reading and writing
compressed file formats ``.gz``, ``.bz2`` or ``.xz`` is also supported. Cutadapt
uses ``pigz`` internally if possible to speed up writing and reading of
gzipped files.
The supported input and output file formats are FASTA and FASTQ, with
optional compression.
The input file format is recognized from the file name extension. If the
extension was not recognized or when Cutadapt reads from standard input,
the contents are inspected instead.
The output file format is also recognized from the file name extension. If the
extensions was not recognized or when Cutadapt writes to standard input, the
extensions was not recognized or when Cutadapt writes to standard output, the
same format as the input is used for the output.
You can use this to convert from FASTQ to FASTA (without doing any adapter
trimming)::
cutadapt -o output.fasta.gz input.fastq.gz
When you want to do the same (read FASTQ, write FASTA), but want to write to
standard output, you need to use ``--fasta`` instead because there is no
output file name::
cutadapt --fasta input.fastq.gz > out.fasta
See also :ref:`file format conversion <file-format-conversion>`.
.. _compressed-files:
......@@ -76,13 +63,15 @@ The default compression level for gzip output is 6. Use option ``-Z`` to
change this to level 1. The files need more space, but it is faster and
therefore a good choice for short-lived intermediate files.
If available, Cutadapt uses `pigz <https://zlib.net/pigz/>`_ to speed up
writing and reading of gzipped files.
Standard input and output
-------------------------
If no output file is specified via the ``-o`` option, then the output is sent to
the standard output stream. Instead of the example command line from above, you
can therefore also write::
the standard output stream. Example::
cutadapt -a AACCGGTT input.fastq > output.fastq
......@@ -142,17 +131,15 @@ the output will be done in a single thread and therefore be a bottleneck.
There are some limitations at the moment:
* Multi-core Cutadapt can only write to output files given by ``-o`` and ``-p``.
This implies that the following command-line arguments are not compatible with
* The following command-line arguments are not compatible with
multi-core:
- ``--info-file``
- ``--rest-file``
- ``--wildcard-file``
- ``--format``
* Multi-core is also not compatible with ``--format``
* Multi-core is also not available when you use Cutadapt for demultiplexing.
* Multi-core is not available when you use Cutadapt for demultiplexing.
If you try to use multiple cores with an incompatible commandline option, you
will get an error message.
......@@ -171,7 +158,7 @@ Some of these limitations will be lifted in the future, as time allows.
Speed-up tricks
---------------
There are several tricks for limiting wall-clock time while using cutadapt.
There are several tricks for limiting wall-clock time while using Cutadapt.
``-Z`` (alternatively ``--compression-level=1``) can be used to limit the
amount of CPU time which is spent on the compression of output files.
......@@ -1567,7 +1554,7 @@ to use ``{name1}}`` and ``{name2}`` in both output file name templates. For exam
-e 0.15 --no-indels \
-g file:barcodes_fwd.fasta \
-G file:barcodes_rev.fasta \
-o trimmed-{name1}-{name2}.1.fastq.gz -p trimmed-{name1}-{name2}.2.fastq.gz \
-o {name1}-{name2}.1.fastq.gz -p {name1}-{name2}.2.fastq.gz \
input.1.fastq.gz input.2.fastq.gz
The ``{name1}`` will be replaced with the name of the best-matching R1 adapter and ``{name2}}`` will
......@@ -1583,6 +1570,26 @@ Read the :ref:`demultiplexing <demultiplexing>` section for how to choose the er
Also, the tips below about how to speed up demultiplexing apply even with combinatorial
demultiplexing.
When doing the above, you will end up with lots of files named ``first-second.x.fastq.gz``, where
*first* is the name of the first indexed adapter and *second* is the name of the second indexed
adapter, and *x* is 1 or 2. Each indexed adapter combination may correspond to a sample name and
you may want to name your files according to the sample name, not the name of the adapters.
Cutadapt does not have built-in functionality to achieve this, but you can use an external
tool such as ``mmv`` (“multiple move”). First, create a list of patterns in ``patterns.txt``::
fwdindex1-revindex1.[12].fastq.gz sampleA.#1.fastq.gz
fwdindex1-revindex2.[12].fastq.gz sampleB.#1.fastq.gz
fwdindex1-revindex3.[12].fastq.gz sampleC.#1.fastq.gz
fwdindex2-revindex1.[12].fastq.gz sampleD.#1.fastq.gz
fwdindex2-revindex2.[12].fastq.gz sampleE.#1.fastq.gz
...
Here, *fwdindex1*/*revindex1* etc. are the names of indexes, and *sampleA* etc.
are your sample names. Then rename all files at once with ::
mmv < patterns.txt
.. versionadded:: 2.4
......