This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Limiting memory usage aligner MAFFT uses

Hello all! I'm using MAFFT to do a L-INS-i alignment of about 35,000 sequences. I'm running MAFFT in the Linux command line, but I'm running into the issue that it is using basically all of the memory on our server. I've tried using the -m command to try to allot memory, but it didn't work. Does anyone have any suggestions?

alignment

2 answers

My understanding is that this can't be done without modifying the source code. If you have evidence to the contrary, I (and others, I'm sure) would like to see.

The current build from Bioconda w/options:

MAFFT v7.407 (2018/Jul/23)
https://mafft.cbrc.jp/alignment/software/
MBE 30:772-780 (2013), NAR 30:3059-3066 (2002)

High speed:
  % mafft in > out
  % mafft --retree 1 in > out (fast)

High accuracy (for <~200 sequences x <~2,000 aa/nt):
  % mafft --maxiterate 1000 --localpair  in > out (% linsi in > out is also ok)
  % mafft --maxiterate 1000 --genafpair  in > out (% einsi in > out)
  % mafft --maxiterate 1000 --globalpair in > out (% ginsi in > out)

If unsure which option to use:
  % mafft --auto in > out

--op # :         Gap opening penalty, default: 1.53
--ep # :         Offset (works like gap extension penalty), default: 0.0
--maxiterate # : Maximum number of iterative refinement, default: 0
--clustalout :   Output: clustal format, default: fasta
--reorder :      Outorder: aligned, default: input order
--quiet :        Do not report progress
--thread # :     Number of threads (if unsure, --thread -1)

L-INS-i is not the recommended method for large alignments:

About

MAFFT is a multiple sequence alignment program for unix-like operating systems. It offers a range of multiple alignment methods, L-INS-i (accurate; for alignment of <∼200 sequences), FFT-NS-2 (fast; for alignment of <∼30,000 sequences), etc.

Also check the Tips for handling a large dataset page.

Log in to answer this question.