omicverse.alignment.mafft#
- omicverse.alignment.mafft(input_fasta, output_dir, output_name='aligned.fasta', mode='auto', threads=4, extra_args=None, mafft_path=None, auto_install=True, overwrite=False)[source]#
Run MAFFT multiple sequence alignment.
- Parameters:
input_fasta (
str) – Path to unaligned FASTA (ASV centroids, 16S sequences, …).output_dir (
str) – Directory for the aligned FASTA + log. Required (no$HOME).output_name (
str(default:'aligned.fasta')) – Filename for the aligned FASTA insideoutput_dir.mode (
str(default:'auto')) – MAFFT strategy flag:'auto'(default;--autopicks FFT-NS-1 / L-INS-i depending on size),'fftns','linsi','einsi','ginsi', or'retree1'(fastest).threads (
int(default:4)) – Passed as--thread. MAFFT supports--thread -1for auto-detect.extra_args (
Optional[Sequence[str]] (default:None)) – Appended verbatim to the mafft command line (coerced tostr).mafft_path (
Optional[str] (default:None)) – Explicit path to themafftbinary.auto_install (
bool(default:True)) – Tryconda install -c bioconda mafftif absent.overwrite (
bool(default:False)) – Re-run even if the aligned file already exists.
- Return type:
{"input": …, "aligned": …, "log": …}— absolute paths.