aitgon / vtam

MIT License
3 stars 3 forks source link

sortreads: add option to make anchored/non-anchored search when trimming primers #18

Closed meglecz closed 2 years ago

meglecz commented 3 years ago

Trimming primers should be anchored by default, but we should give the possibility to users to make it non-anchored. The non-anchored search is slower, but it is necessary if there is a spacer between the tag and the primer. The present version is a non-anchored search.

The choice of anchored/non-anchored search should be independent for demultiplexing and for trimming primers.

By default use anchored search

cutadapt --cores=0 -e 0.1 --no-indels --trimmed-only --minimum-length 50 --maximum-length 500 --front "^GGNTGAACNGTNTAYCCNCC...TGRTTYTTYGGNCAYCCHGAAGTWTA$" --output marker-run-sample-replicate.fasta.gz tagtrimmed.marker-run-sample-replicate.fasta.gz

rm marker-run-sample-replicate.fasta.gz

non-anchored version

cutadapt --cores=0 -e 0.1 --no-indels --trimmed-only --minimum-length 50 --maximum-length 500 --front "GGNTGAACNGTNTAYCCNCC;min_overlap=length-of-the-primer...TGRTTYTTYGGNCAYCCHGAAGTWTA;min_overlap=length-of-the-primer" --output marker-run-sample-replicate.fasta.gz tagtrimmed.marker-run-sample-replicate.fasta.gz

rm marker-run-sample-replicate.fasta.gz