faircloth-lab / phyluce

software for UCE (and general) phylogenomics
http://phyluce.readthedocs.org/
Other
76 stars 48 forks source link

Adjusting Mafft parameters, gappy alignments #243

Open StephenBaca opened 2 years ago

StephenBaca commented 2 years ago

Hi Dr. Faircloth,

Is it possible to adjust Mafft parameters in Phylyuce?

For conserved loci, the default Mafft setting works fine. But it seems like when it gets into quicker evolving regions or areas with indels, it opens up gaps too readily. For example in the case of the attached locus, it openned up broad chunks of gaps for missing data designators apparently. I would like to adjust the gap penalties a bit (or perhaps re-align with the local pair algorithm). Is this possible in the Phyluce wrapper? Do you have any insight on why it might be open gaps for missing data?

Thanks, Stephen

uce-318.txt

brantfaircloth commented 2 years ago

Hi Stephen,

You can manually adjust them if you like - the parameters are set in this file:

https://github.com/faircloth-lab/phyluce/blob/main/phyluce/mafft.py#L42-L46

You just need to separate each option pair - e.g., --maxiterate 1000 becomes:

"--maxiterate",
"1000",

And you can add as many parameters, penalties, etc. as mafft can take.

Alternatively, you can run mafft outside of phyluce using it in combination with something like GNU Parallel, then continue working (in phyluce) with the alignments produced.

StephenBaca commented 2 years ago

Great! thank you!!!