bokulich-lab / RESCRIPt

REference Sequence annotation and CuRatIon Pipeline
BSD 3-Clause "New" or "Revised" License
89 stars 26 forks source link

`trim-alignment` : expose multithreading #127

Closed nbokulich closed 4 months ago

nbokulich commented 2 years ago

mafft has a --threads option that is exposed in q2-alignment's mafft-add action. But this is not exposed in RESCRIPt. This option should be exposed to enable multithreading. (or maybe this is intended? when adding primers to a larger alignment does multithreading offer any advantage?)

colinbrislawn commented 10 months ago

Testing directly with MAFFT, yes it appears that --addfragments makes use of --thread quite well

Database: the first 1k or 10k items in SILVA_138.1_SSURef_NR99_tax_silva_full_align_trunc.fasta Primer: the new EMP forward primer: GTGYCAGCMGCCGCGGTAA Example command:

time mafft --preservecase --inputorder --thread 1 \
  --addfragments primer1.fasta \
  Silva_1k.aln.fasta \
  | gzip -c > Silva_1k_primer1_1threads.aln.fasta.gz
DB size (first n seqs) threads real
1k 1 0m 28.557s
1k 4 0m 15.533s
10k 1 31m 0.793s
10k 4 10m 47.784s