Cutadapt cannot unconditionally trim 5'

Issue #123 resolved
Former user created an issue

Thank you for the useful software. I'm trying to get the packaged cutadapt to trim the first 3 bases of the 5' reads. Looking at the documentation for cutadapt

By using the --cut option or its abbreviation -u, it is possible to unconditionally remove bases from the beginning or end of each read.

So I edited the example Known_miRNAs_pipeline.ini

[Adapter]
; Adapter sequence to be removed in the analysis
adapter=ATCTCGTATGCCGTCTTCTGCTTGAA
; Specific software to remove the adapter from the sequences
adaptersoft=CutAdapt
cutadaptparameters=-u 3

However, miARma dies with

CUTADAPT ERROR :: system args failed: 512 (mkdir -p Examples/basic_examples/miRNAs/Known_miRNAs/results///cutadapt_results/ ; cut_adapt -b ATCTCGTATGCCGTCTTCTGCTTGAA  -m 15 -M 35 -q 0  -u 3 Examples/basic_examples/miRNAs/reads///SRR873382.fastq.gz > Examples/basic_examples/miRNAs/Known_miRNAs/results///cutadapt_results/SRR873382_cut.fastq 2>> Examples/basic_examples/miRNAs/Known_miRNAs/results//miARma_stat.133068.log) at lib//CbBio/RNASeq/Adapt.pm line 854.

Looking into miARma_stat log, last line is

cut_adapt: error: no such option: -u

I also tried --cut and same error. The example pipeline completes fine if I don't try to cut the 5'. Thanks for any help.

Comments (2)

  1. Eduardo Andres Leon

    Hi, The version included in miARma has no -u option (see below). Nevertheless to remove the first 3 bases from 5', you have to use the Adaptertrimming utility (https://bitbucket.org/cbbio/miarma/src/master/Examples/basic_examples/miRNAs/Known_miRNAs/2.Adapter/2.2.AdapterTrimming_adapter_removal.ini)

    cutadapt options:

    -a ADAPTER, --adapter=ADAPTER
                        Sequence of an adapter that was ligated to the 3' end.
                        The adapter itself and anything that follows is
                        trimmed.
    -b ADAPTER, --anywhere=ADAPTER
                        Sequence of an adapter that was ligated to the 5' or
                        3' end. If the adapter is found within the read or
                        overlapping the 3' end of the read, the behavior is
                        the same as for the -a option. If the adapter overlaps
                        the 5' end (beginning of the read), the initial
                        portion of the read matching the adapter is trimmed,
                        but anything that follows is kept.
    -g ADAPTER, --front=ADAPTER
                        Sequence of an adapter that was ligated to the 5' end.
                        If the adapter sequence starts with the character '^',
                        the adapter is 'anchored'. An anchored adapter must
                        appear in its entirety at the 5' end of the read (it
                        is a prefix of the read). A non-anchored adapter may
                        appear partially at the 5' end, or it may occur within
                        the read. If it is found within a read, the sequence
                        preceding the adapter is also trimmed. In all cases,
                        the adapter itself is trimmed.
    
  2. Log in to comment