I don't have much background on bioinformatics (I'm studying and having some trainee about it at the same time). Sorry if it's a stupid question, I could not find an answer by my own.
I'm using several different pipelines repeatedly times and I would like to know how could I automate it, at least part of the job. The pipelines that I'm using are: muscle via anvi'o for multiple sequence alignment and seqkit to manipulate fasta files.
I'm using macOS and terminal.
All the commands that I'm using requests an input file and output which I've been trying to pass via loop and
For an example:
for entrada saida in `cat name_path3.txt`; do muscle -in $entrada -out $saida ; done
name_path3.txt looks like (with no space between lines)
/User/hdc/.../file_input_1.fasta /User/hdc/.../file_output_1.fasta /User/hdc/.../file_input_2.fasta /User/hdc/.../file_output_2.fasta
The loop woks fine but it seams that the pipeline does not recognize/read the variable correctly and do not work. If I pass just the pathways one by one works fine.
- Is correct to use cat ? Should I use another function?
- Should I modify the txt file with something?
By the way, I already did by hand. But I don't want to do the way I did if I have to do things like that in the future :)
Thanks so much!