dada2 icon indicating copy to clipboard operation
dada2 copied to clipboard

dada2 packbio and cutadapt

Open sdesteya opened this issue 5 months ago • 5 comments

Dear,

I am using dada2 to process packbio 16S rRNA amplicon reads. But with the RemovePrimer function is loose >50% of my reads and for some samples >90%. I saw here that cutadapt is a nice alternative to remove the primers but i have a problem for packbio the reads are in both orientation how can a change the read orientation that they all are in the forward direction ?

Thank you in advance

sdesteya avatar Jan 24 '24 10:01 sdesteya

I have not used cutadapt to re-orient reads. That said, their user guide seems to have information on this: https://cutadapt.readthedocs.io/en/stable/guide.html#reverse-complement

benjjneb avatar Jan 24 '24 16:01 benjjneb

I used --revcomp to check the reverse complement so in my output file I do known the reads that are not in the forward orientation because in their header RC is added. But i don't know how to change the orientation of the reads after cutadapt?

sdesteya avatar Jan 24 '24 16:01 sdesteya

But i don't know how to change the orientation of the reads after cutadapt?

Why are you trying to do this? My understanding from that bit of the cutadapt documents I linked above is that cutadapt re-oriented the reads to be in consistent orientation (the starting data will be in a mixture of 5'->3' and 3'->5' orientations).

benjjneb avatar Jan 24 '24 16:01 benjjneb

I indeed misunderstood the --revcomp explanation, the orientation that best matches is retained. thanks for your help !

sdesteya avatar Jan 26 '24 11:01 sdesteya

We've been using something like this for trimming using cutadapt:

# revprimer_rc is revcomp of reverse primer
cutadapt --rc \
                -g "${fwdprimer}...${revprimer_rc}" \
                -j ${cores} \
                --untrimmed-output "${id}.untrimmed.fastq.gz" \
                -o "${id}.noprimer.fastq.gz" \
                ${reads} > "${id}.noprimer.cutadapt.out"

The -g requires both primers, but this can be relaxed using -a. In general we've seen little sequence loss using this, but we haven't tested anchoring the primers.

cjfields avatar Feb 21 '24 22:02 cjfields