Hi, I'm new in bioinformatics and need some help. I have multiple fasta files in the same directory. And I need to trim the sequences inside the files using TrimAL. Since there are 200 files I though it would be easier to do a for loop so I could run all at once. But all examples I found to use for loops did not work. The files are named as EOG091503G5_aligned.fasta, EOG091506R4_aligned.fasta, EOG0915095X_aligned.fasta, EOG0915054S_aligned.fasta, for example.
I have tried something like this and some variants of this script, but nothing worked:
#!/bin/bash for file in aligned_trim/*_aligned.fasta; do trimal -in $file -out $file_trim.fasta -htmlout $file_trim.html -automated1; done
I used bash scripts because was the ones that I found people explaining, but if a Python script is the better option for me it's ok too.
I appreciate any help. Thank you in advance.