### Example of a read starting with an adapter Source: https://cutadapt.readthedocs.io/en/stable/guide.html Demonstrates that a read consisting entirely of an adapter and subsequent sequence is trimmed to an empty read. ```text ADAPTERsomething ``` -------------------------------- ### Set Up Virtual Environment and Install Dependencies Source: https://cutadapt.readthedocs.io/en/stable/_sources/develop.rst.txt Create a virtual environment, activate it, and install necessary development tools like Cython, pytest, tox, and pre-commit. Finally, install Cutadapt in editable mode. ```bash cd cutadapt virtualenv .venv source .venv/bin/activate pip install Cython pytest tox pre-commit pre-commit install pip install -e . ``` -------------------------------- ### Install Cutadapt on FreeBSD Source: https://cutadapt.readthedocs.io/en/stable/_sources/installation.rst.txt Install the binary package for Cutadapt on FreeBSD. ```bash pkg install py39-cutadapt ``` -------------------------------- ### Install Cutadapt on Windows Source: https://cutadapt.readthedocs.io/en/stable/installation.html Install Cutadapt on Windows using pip after installing Python and C++ build tools. ```bash py -m pip install cutadapt ``` ```bash py -m cutadapt --version ``` -------------------------------- ### Install Cutadapt via pip in Virtual Environment Source: https://cutadapt.readthedocs.io/en/stable/installation.html Set up a virtual environment and install Cutadapt using pip. ```bash sudo apt install python3-virtualenv ``` ```bash virtualenv cutadapt-venv cutadapt-venv/bin/pip --upgrade pip cutadapt-venv/bin/pip install cutadapt ``` ```bash cutadapt-venv/bin/cutadapt --version ``` ```bash source cutadapt-venv/bin/activate cutadapt --version ``` -------------------------------- ### Install development environment Source: https://cutadapt.readthedocs.io/en/stable/develop.html Commands to clone the repository, set up a virtual environment, and install necessary development tools. ```bash git clone https://github.com/marcelm/cutadapt.git # or clone your own fork cd cutadapt virtualenv .venv source .venv/bin/activate pip install Cython pytest tox pre-commit pre-commit install pip install -e . ``` -------------------------------- ### Install Cutadapt via pkgin Source: https://cutadapt.readthedocs.io/en/stable/_sources/installation.rst.txt Use the pkgin package manager to install Cutadapt on supported systems. ```bash pkgin install py311-cutadapt ``` -------------------------------- ### Install Cutadapt Development Version Source: https://cutadapt.readthedocs.io/en/stable/installation.html Commands to set up a virtual environment and install the latest Cutadapt source code from GitHub. ```bash python3 -m venv ~/cutadapt-venv ~/cutadapt-venv/bin/python3 -m pip install --upgrade pip ~/cutadapt-venv/bin/pip install git+https://github.com/marcelm/cutadapt.git ``` -------------------------------- ### Install Cutadapt via FreeBSD and pkgsrc Source: https://cutadapt.readthedocs.io/en/stable/installation.html Install binary packages for Cutadapt on FreeBSD or systems using pkgsrc. ```bash pkg install py39-cutadapt ``` ```bash pkgin install py311-cutadapt ``` -------------------------------- ### Example Trimming Output Source: https://cutadapt.readthedocs.io/en/stable/guide.html The resulting trimmed reads after applying the linked adapter command to the example input. ```text mysequence mysequence myseque anotherreadSECOND ``` -------------------------------- ### Example of Linked Adapter Trimming Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Demonstrates trimming with linked adapters. The 5' adapter is required, and if missing, the read is not trimmed, as shown in the last example read. ```bash cutadapt -a ^FIRST...SECOND -o output.fastq input.fastq ``` -------------------------------- ### Install Cutadapt for Shared Cluster Use Source: https://cutadapt.readthedocs.io/en/stable/installation.html Commands to create a virtual environment and link the Cutadapt executable for a shared module installation. ```bash BASE=/software/cutadapt-3.1 virtualenv $BASE/venv $BASE/venv/bin/pip install cutadapt==3.1 mkdir $BASE/bin cd $BASE/bin ln -s ../venv/bin/cutadapt ``` -------------------------------- ### Identify incomplete adapter warnings Source: https://cutadapt.readthedocs.io/en/stable/guide.html Example of the warning output generated by Cutadapt when an adapter sequence appears to be missing a base at the start. ```text WARNING: One or more of your adapter sequences may be incomplete. Please see the detailed output above. ``` ```text Bases preceding removed adapters: A: 95.5% C: 1.0% G: 1.6% T: 1.6% none/other: 0.3% WARNING: The adapter is preceded by "A" extremely often. The provided adapter sequence may be incomplete. To fix the problem, add "A" to the beginning of the adapter sequence. ``` -------------------------------- ### Install Cutadapt via pipx Source: https://cutadapt.readthedocs.io/en/stable/installation.html Install Cutadapt using pipx on supported Linux distributions. ```bash sudo apt install pipx python3-venv pipx install cutadapt cutadapt --version ``` -------------------------------- ### Verify Cutadapt Installation Source: https://cutadapt.readthedocs.io/en/stable/installation.html Command to check the installed version of Cutadapt. ```bash ~/cutadapt-venv/bin/cutadapt --version ``` -------------------------------- ### Install Cutadapt via Conda Source: https://cutadapt.readthedocs.io/en/stable/installation.html Create a new environment and install Cutadapt, with an optional variant for Apple Silicon. ```bash conda create -n cutadapt cutadapt ``` ```bash CONDA_SUBDIR=osx-64 conda create -n cutadapt cutadapt ``` -------------------------------- ### Verify Cutadapt installation Source: https://cutadapt.readthedocs.io/en/stable/develop.html Commands to check the installed version of Cutadapt. ```bash cutadapt --version ``` ```bash venv/bin/cutadapt --version ``` -------------------------------- ### Adapter Dimer Alignment Examples Source: https://cutadapt.readthedocs.io/en/stable/algorithms.html Examples showing how the updated algorithm handles multiple adapter occurrences in reads compared to the previous version. ```text @SRR452441.2151945 AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC Previous alignment |||||||||||||||||||||||||||||||||| -GATCGGAAGAGCACACGTCTGAACTCCAGTCACGCACACGAGATCGGAAGAGCACACGTCTGAACTCCAGTCACGCACACGAATCTCGTATGCCGTCTTCT X||||||||||||||||||||||||||||||||| AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC New alignment ``` ```text @SRR452441.2157038 AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC Previous alignment |||||||||||||||||||||||||||||||||| -GATCGGAAGAGCACACGTCTGAACTCCAGTCAGATCGGAAGAGCACACGTCTGAACTCCAGTCACGCACACGAATCTCGTATGCCGTCTTCTGCTTGAAAA X||||||||||||||||||||||||||||||||X AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC New alignment ``` -------------------------------- ### Install Cutadapt via System Package Manager Source: https://cutadapt.readthedocs.io/en/stable/installation.html Install Cutadapt using native Debian/Ubuntu package managers. ```bash sudo apt install cutadapt ``` ```bash sudo apt install python3-cutadapt ``` -------------------------------- ### Configure Adapter Search Parameters Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Examples of setting search parameters for adapters using the file notation or within a FASTA file. ```bash cutadapt -a "file:adapters.fa;min_overlap=5;noindels" ``` ```text >adapter1 ^ACGT;min_overlap=3 >adapter2 AACCGGT;noindels ``` -------------------------------- ### Example of default adapter reporting Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Example output showing statistics for an adapter identified by its number. The report includes the adapter sequence, length, and trim count. ```text === Adapter 1 === Sequence: AACCGGTT; Length 8; Trimmed: 5 times. ``` -------------------------------- ### Activate and Verify Conda Installation Source: https://cutadapt.readthedocs.io/en/stable/installation.html Activate the environment and verify the installation by checking the version. ```bash conda activate cutadapt ``` ```bash cutadapt --version ``` -------------------------------- ### Example of named adapter reporting Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Example output showing statistics for a named adapter. The report includes the adapter name, sequence, length, and trim count. ```text === Adapter 'My_Adapter' === Sequence: TTAGACATATCTCCGTCG; Length 18; Trimmed: 5 times. ``` -------------------------------- ### Example Input Reads Source: https://cutadapt.readthedocs.io/en/stable/guide.html Sample input reads demonstrating sequences with and without the specified 5' and 3' adapters. ```text FIRSTmysequenceSECONDextrabases FIRSTmysequenceSEC FIRSTmyseque anotherreadSECOND ``` -------------------------------- ### Example FASTQ header structure Source: https://cutadapt.readthedocs.io/en/stable/guide.html Shows the components of a standard FASTQ header line for reference in renaming templates. ```text @read1234 value=17 ``` -------------------------------- ### Example FASTA input read Source: https://cutadapt.readthedocs.io/en/stable/guide.html A sample FASTA record used to demonstrate the renaming functionality. ```text >myread extra info ACGTAAAATTTTCCCC ``` -------------------------------- ### Anchored 5' Adapter Trimming Example Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Shows how to trim anchored 5' adapters using the -g ^ADAPTER option. This method requires the adapter to be at the very beginning of the read. ```bash cutadapt -g ^ADAPTER reads.fastq -o reads.trimmed.fastq ``` -------------------------------- ### Properly Paired FASTQ Headers Source: https://cutadapt.readthedocs.io/en/stable/reference.html Example of FASTQ headers that Cutadapt considers properly paired. ```text @my_read/1 a comment ``` ```text @my_read/2 another comment ``` -------------------------------- ### Minimal Report Output Example Source: https://cutadapt.readthedocs.io/en/stable/guide.html This example shows the tab-separated output format of the minimal report, including headers and a data row. The last three fields are omitted for single-end data. ```bash $ cutadapt --report=minimal -a ... -m 20 -q 10 -o ... -p ... in.[12].fastq.gz status in_reads in_bp too_short too_long too_many_n out_reads w/adapters qualtrim_bp out_bp w/adapters2 qualtrim2_bp out2_bp OK 1000000 202000000 24827 0 0 975173 28968 1674222 97441426 0 0 98492473 ``` -------------------------------- ### Multiple adapter occurrence trimming examples Source: https://cutadapt.readthedocs.io/en/stable/guide.html Examples showing how Cutadapt trims reads when multiple copies of the same adapter are present. ```text cccccADAPTERgggggADAPTERttttt ``` ```text ccccc ``` ```text gggggADAPTERttttt ``` -------------------------------- ### Identifying incomplete adapter sequences Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Example output indicating that adapter sequences may be incomplete based on base composition analysis. ```text WARNING: One or more of your adapter sequences may be incomplete. Please see the detailed output above. ``` ```text Bases preceding removed adapters: A: 95.5% C: 1.0% G: 1.6% T: 1.6% none/other: 0.3% WARNING: ``` -------------------------------- ### Non-Internal 5' Adapter Trimming Example Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Demonstrates trimming non-internal 5' adapters with the -g XADAPTER option. This allows the adapter to be preceded by some bases. ```bash cutadapt -g XADAPTER reads.fastq -o reads.trimmed.fastq ``` -------------------------------- ### Per-adapter statistics example Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Cutadapt provides detailed statistics for each adapter found, including its sequence, length, and the number of times it was trimmed. ```text Sequence: 'ACGTACGTACGTTAGCTAGC'; Length: 20; Trimmed: 2402 times. ``` -------------------------------- ### Resulting sequences after 3' adapter trimming Source: https://cutadapt.readthedocs.io/en/stable/guide.html Shows the output after applying the -a ADAPTER option to the example reads. ```text mysequen mysequence mysequence mysequence ``` -------------------------------- ### Clone Cutadapt Repository Source: https://cutadapt.readthedocs.io/en/stable/_sources/develop.rst.txt Clone the Cutadapt repository from GitHub to start development. This is the initial step for setting up your local development environment. ```bash git clone https://github.com/marcelm/cutadapt.git # or clone your own fork ``` -------------------------------- ### Adapter Error Tolerance Configuration Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Examples of setting error tolerance using command line options or adapter-specific parameters. ```bash -a "ADAPTER;max_error_rate=0.15" -a "ADAPTER;e=0.15" ``` ```bash -a "ADAPTER;e=1" -a "ADAPTER;max_errors=2.5" ``` -------------------------------- ### Cutadapt JSON Report Example Source: https://cutadapt.readthedocs.io/en/stable/_sources/reference.rst.txt A sample JSON output generated when using the --json flag, containing run metadata, read counts, and adapter trimming statistics. ```json { "tag": "Cutadapt report", "schema_version": [0, 3], "cutadapt_version": "4.5", "python_version": "3.8.10", "command_line_arguments": [ "--json=out.cutadapt.json", "--poly-a", "-m", "20", "-a", "AACCGGTTACGTTGCA", "-q", "20", "--discard-trimmed", "-o", "out.fastq.gz", "reads.fastq"], "cores": 1, "input": { "path1": "reads.fastq", "path2": null, "paired": false, "interleaved": null }, "read_counts": { "input": 100000, "filtered": { "too_short": 251, "too_long": null, "too_many_n": null, "too_many_expected_errors": null, "casava_filtered": null, "discard_trimmed": 2061, "discard_untrimmed": null }, "output": 97688, "reverse_complemented": null, "read1_with_adapter": 2254, "read2_with_adapter": null }, "basepair_counts": { "input": 10100000, "input_read1": 10100000, "input_read2": null, "quality_trimmed": 842048, "quality_trimmed_read1": 842048, "quality_trimmed_read2": null, "poly_a_trimmed": 1028, "poly_a_trimmed_read1": 1028, "poly_a_trimmed_read2": null, "output": 9037053, "output_read1": 9037053, "output_read2": null }, "adapters_read1": [ { "name": "1", "total_matches": 2254, "on_reverse_complement": null, "linked": false, "five_prime_end": null, "three_prime_end": { "type": "regular_three_prime", "sequence": "AACCGGTTACGTTGCA", "error_rate": 0.1, "indels": true, "error_lengths": [6], "matches": 2254, "adjacent_bases": { "A": 473, "C": 1240, "G": 328, "T": 207, "": 6 }, "dominant_adjacent_base": null, "trimmed_lengths": [ {"len": 3, "expect": 1562.5, "counts": [1220]}, {"len": 4, "expect": 390.6, "counts": [319]}, {"len": 5, "expect": 97.7, "counts": [30]}, {"len": 6, "expect": 24.4, "counts": [4]}, {"len": 7, "expect": 24.4, "counts": [5]}, {"len": 8, "expect": 24.4, "counts": [7]}, {"len": 9, "expect": 24.4, "counts": [4]}, {"len": 10, "expect": 24.4, "counts": [7]}, {"len": 11, "expect": 24.4, "counts": [7]}, {"len": 12, "expect": 24.4, "counts": [6]}, {"len": 13, "expect": 24.4, "counts": [8, 2]}, {"len": 14, "expect": 24.4, "counts": [1, 1]}, {"len": 15, "expect": 24.4, "counts": [2, 0]}, {"len": 16, "expect": 24.4, "counts": [3, 1]}, ] } } ], "adapters_read2": null, "poly_a_trimmed_read1": [ {"len": 23, "count": 10} ``` -------------------------------- ### 5' Adapter Trimming Example Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Illustrates 5' adapter trimming with Cutadapt. Use the -g option to specify the adapter sequence. The adapter and any preceding sequence are removed, which can also lead to empty reads. ```bash cutadapt -g ADAPTER reads.fastq -o reads.trimmed.fastq ``` -------------------------------- ### Configure Bioconda Channels Source: https://cutadapt.readthedocs.io/en/stable/installation.html Set up the required channels for Bioconda before installing packages. ```bash conda config --add channels bioconda conda config --add channels conda-forge conda config --set channel_priority strict ``` -------------------------------- ### Example read sequences for 3' adapter trimming Source: https://cutadapt.readthedocs.io/en/stable/guide.html Illustrates how a fragment of interest combined with an adapter appears in reads of varying lengths. ```text mysequen mysequenceADAP mysequenceADAPTER mysequenceADAPTERsomethingelse ``` -------------------------------- ### Configure Lmod Module for Cutadapt Source: https://cutadapt.readthedocs.io/en/stable/installation.html Example Lmod configuration file content to add the Cutadapt binary directory to the user PATH. ```lua conflict("cutadapt") whatis("adapter trimming tool") prepend_path("PATH", "/software/cutadapt-3.1/bin") ``` -------------------------------- ### Info File Format: Adapter Match Found Source: https://cutadapt.readthedocs.io/en/stable/_sources/reference.rst.txt This is an example of a row in the Cutadapt info file when an adapter match is found. It includes read name, errors, coordinates, sequences before, during, and after the match, adapter name, and quality values. ```text read_name 2 15 50 sequence_left adapter_sequence sequence_right adapter_name qual_left qual_adapter qual_right 1 ``` -------------------------------- ### Run Cutadapt Version Check Source: https://cutadapt.readthedocs.io/en/stable/_sources/develop.rst.txt Verify that Cutadapt has been installed correctly by checking its version. This command can be run after setting up the development environment. ```bash cutadapt --version ``` -------------------------------- ### Minimal report output example Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Generate a one-line summary report using --report=minimal. This output is a tab-separated table useful for quick overviews. ```bash $ cutadapt --report=minimal -a ... -m 20 -q 10 -o ... -p ... in.[12].fastq.gz status in_reads in_bp too_short too_long too_many_n out_reads w/adapters qualtrim_bp out_bp w/adapters2 qualtrim2_bp out2_bp OK 1000000 202000000 24827 0 0 975173 28968 1674222 97441426 0 0 98492473 ``` -------------------------------- ### Info File Format: No Adapter Match Found Source: https://cutadapt.readthedocs.io/en/stable/_sources/reference.rst.txt This is an example of a row in the Cutadapt info file when no adapter match is found. It includes the read name, -1 to indicate no match, the full read sequence, and quality values. ```text read_name -1 read_sequence quality_values ``` -------------------------------- ### 3' Adapter Trimming Example Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Demonstrates how Cutadapt trims 3' adapters. Use the -a option to specify the adapter sequence. Cutadapt removes the adapter and any subsequent sequence, potentially resulting in empty reads. ```bash cutadapt -a ADAPTER reads.fastq -o reads.trimmed.fastq ``` -------------------------------- ### Show help message Source: https://cutadapt.readthedocs.io/en/stable/_sources/reference.rst.txt Display the help message to see all available command-line options. ```bash cutadapt -h ``` -------------------------------- ### Check FASTQ File Formatting Source: https://cutadapt.readthedocs.io/en/stable/recipes.html Verify the formatting of a FASTQ file by running Cutadapt with the output redirected to `/dev/null`. Any formatting issues will be reported. ```bash cutadapt -o /dev/null input.fastq ``` -------------------------------- ### Trim Forward and Reverse Primers (Paired-End) Source: https://cutadapt.readthedocs.io/en/stable/_sources/recipes.rst.txt This configuration is for paired-end reads where R1 starts with the forward primer and R2 starts with the reverse primer, and reads are not expected to extend into the other primer. ```bash -g ^FWDPRIMER -G ^REVPRIMER --discard-untrimmed ``` -------------------------------- ### Remove Primers for Short Reads Source: https://cutadapt.readthedocs.io/en/stable/recipes.html Use these options to remove forward and reverse primers when reads are short and do not extend into the other primer. `--discard-untrimmed` removes read pairs where R1 does not start with FWDPRIMER or R2 does not start with REVPRIMER. ```bash -g ^FWDPRIMER -G ^REVPRIMER --discard-untrimmed ``` -------------------------------- ### Define barcodes in a FASTA file Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Example format for a FASTA file containing barcode sequences. ```fasta >barcode01 TTAAGGCC >barcode02 TAGCTAGC >barcode03 ATGATGAT ``` -------------------------------- ### Update read length tag Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Example of updating a length tag in the read header after trimming. ```text >read1 length=17 ACGTACGTACAAAAAAA ``` ```text >read1 length=10 ACGTACGTAC ``` -------------------------------- ### Example of Cutadapt report output Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt The report displays the number of reads or read pairs that were reverse-complemented. ```text Total reads processed: 60 Reads with adapters: 50 (83.3%) Reverse-complemented: 20 (33.3%) ``` -------------------------------- ### Anchor 5' adapters from a FASTA file Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Anchor all 5' adapters read from a FASTA file to the beginning of the read using the '^file:' syntax. Requires Cutadapt version 4.1 or later. ```bash cutadapt -g ^file:adapters.fasta -o output.fastq input.fastq ``` -------------------------------- ### Improperly Paired FASTQ Headers Source: https://cutadapt.readthedocs.io/en/stable/reference.html Example of FASTQ headers that are not considered properly paired due to the suffix. ```text @my_read/1;1 ``` ```text @my_read/2;1 ``` -------------------------------- ### Checking Paired-End FASTQ File Pairing Source: https://cutadapt.readthedocs.io/en/stable/_sources/recipes.rst.txt Employ Cutadapt with '-o /dev/null -p /dev/null' to verify that paired-end FASTQ files are correctly paired and that read IDs match. Problems with individual files or pairing will be reported. ```bash cutadapt -o /dev/null -p /dev/null input.R1.fastq input.R2.fastq ``` -------------------------------- ### Rename reads with prefix Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Example of using the --rename option to move a prefix from the sequence into the read ID. ```text >myread this is R1 ACGTAAAATTTT >myread this is R2 GGGGCCCC ``` ```text >myread_ACGT this is R1 AAAATTTT >myread_ACGT this is R2 GGGGCCCC ``` -------------------------------- ### Alignment Comparison Example 1 Source: https://cutadapt.readthedocs.io/en/stable/algorithms.html Comparison of previous and tuned alignment results for a specific read and adapter sequence. ```text CCAGTCCTTTCCTGAGAGT Read |||||||| || CCAGTCCT---CT 5' adapter ``` ```text CCAGTCCTTTCCTGAGAGT Read ||||||||X| CCAGTCCTCT 5' adapter ``` -------------------------------- ### Using Linked Adapters with Search Parameters Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Provide search parameters for linked adapters by setting them for each constituent adapter separately, separated by semicolons. ```bash -g "ADAPTER1;min_overlap=5...ADAPTER2;min_overlap=6" ``` -------------------------------- ### Example of trimmed_lengths structure Source: https://cutadapt.readthedocs.io/en/stable/reference.html Shows the structure of the trimmed_lengths list containing length, expected counts, and error-specific match counts. ```json "trimmed_lengths": [ {"len": 4, "expect": 390.6, "counts": [319]}, {"len": 5, "expect": 97.7, "counts": [30]}, {"len": 6, "expect": 24.4, "counts": [4]}, {"len": 7, "expect": 24.4, "counts": [5]}, {"len": 15, "expect": 24.4, "counts": [2, 1]}, ] ``` -------------------------------- ### Get Adapter Match Count Source: https://cutadapt.readthedocs.io/en/stable/recipes.html Use `jq` to retrieve the total number of times the first adapter was matched in the reads. ```bash jq '.adapters_read1[0].total_matches' mysample.cutadapt.json ``` -------------------------------- ### Run Cutadapt Using Virtual Environment Path Source: https://cutadapt.readthedocs.io/en/stable/_sources/develop.rst.txt Execute the Cutadapt binary directly from its virtual environment path. This is an alternative to running it after activating the environment. ```bash venv/bin/cutadapt --version ``` -------------------------------- ### Create patterns.txt for mmv Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Define adapter-to-sample name mappings in patterns.txt for batch file renaming with mmv. ```bash 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 ... ``` -------------------------------- ### Adapter Alignment Comparison Source: https://cutadapt.readthedocs.io/en/stable/_sources/algorithms.rst.txt Visual comparison of read trimming between the previous and updated alignment algorithms using SRR452441 dataset examples. ```text @SRR452441.2151945 AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC Previous alignment |||||||||||||||||||||||||||||||||| -GATCGGAAGAGCACACGTCTGAACTCCAGTCACGCACACGAGATCGGAAGAGCACACGTCTGAACTCCAGTCACGCACACGAATCTCGTATGCCGTCTTCT X||||||||||||||||||||||||||||||||| AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC New alignment ``` ```text @SRR452441.2157038 AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC Previous alignment |||||||||||||||||||||||||||||||||| -GATCGGAAGAGCACACGTCTGAACTCCAGTCAGATCGGAAGAGCACACGTCTGAACTCCAGTCACGCACACGAATCTCGTATGCCGTCTTCTGCTTGAAAA X||||||||||||||||||||||||||||||||X AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC New alignment ``` -------------------------------- ### Release management Source: https://cutadapt.readthedocs.io/en/stable/develop.html Commands to tag a new release and push it to the repository. ```bash git tag v0.1 ``` ```bash git push --tags ``` -------------------------------- ### Checking FASTQ File Formatting Source: https://cutadapt.readthedocs.io/en/stable/_sources/recipes.rst.txt Use Cutadapt with '-o /dev/null' to validate the formatting of a single FASTQ file. Any detected issues will be reported. ```bash cutadapt -o /dev/null input.fastq ``` -------------------------------- ### View Allowed Errors in Cutadapt Report Source: https://cutadapt.readthedocs.io/en/stable/_sources/guide.rst.txt Example output showing how Cutadapt reports the number of allowed errors based on match length. ```text Sequence: 'SOMEADAPTER'; Length: 11; Trimmed: 2 times. No. of allowed errors: 0-9 bp: 0; 10-11 bp: 1 ``` -------------------------------- ### Trim 3' Adapter (Basic) Source: https://cutadapt.readthedocs.io/en/stable/guide.html Use this command to trim a 3' adapter sequence from input FASTQ files. Replace AACCGGTT with your adapter sequence. ```bash cutadapt -a AACCGGTT -o output.fastq input.fastq.gz ``` -------------------------------- ### Trim 3' Adapter (Compressed Files) Source: https://cutadapt.readthedocs.io/en/stable/guide.html This command trims a 3' adapter sequence from compressed FASTQ input and writes to a compressed output file. Replace AACCGGTT with your adapter sequence. ```bash cutadapt -a AACCGGTT -o output.fastq.gz input.fastq.gz ``` -------------------------------- ### Run Tests with Tox Source: https://cutadapt.readthedocs.io/en/stable/_sources/develop.rst.txt Run tests across multiple Python versions using tox. This requires having binaries for all tested Python versions installed on your system. ```bash tox ``` -------------------------------- ### Trim with Linked Adapters (5' anchored) Source: https://cutadapt.readthedocs.io/en/stable/guide.html Use this command to trim a sequence with a 5' adapter (anchored) and a 3' adapter. The 5' adapter is required. ```bash cutadapt -a ^ADAPTER1...ADAPTER2 -o out.fastq.gz in.fastq.gz ```