I have a folder with around 100 multifasta files. I want to align each multifasta file inidividually using MAFFT. Each multifasta file ends with .unaligned.fasta
I would like to change those file endings to aligned.fasta
.
I have tried using MAFFT normally on the command line as so, with asterisks to allow for multiple characters where necessary:
mafft --quiet *.unaligned.fasta > *.aligned.fasta
However, I get error messages like this one
Unknown option: beaverHb.unaligned.fasta
for all of my multifasta files.
How can I align all my multifasta files using MAFFT in the command line?
Some more general advice, this isn't a quirk of MAFFT, what you're trying to do with that command won't work more broadly.
The shell doesn't know what
*.aligned.fasta
means for example, so you need to help it out by building the filenames from variables etc (or useparallel
's{.}
syntax).I'd advise doing some more reading about working with wildcards and loops in the shell as what you're going to do here is likely end up overwriting most if not all of your data at some point.