Running a script for each of the Reference .fa files along with their respective .abi files
1
0
Entering edit mode
9.1 years ago
anilkanthi ▴ 10

I have a bash script to process ".abi" files with its reference ".fasta" file.

When I have a multiple header single FASTA file (each containing different genes), it would be split into multiple fasta files with each file containing one FASTA header and sequence.

What I need to know is how can I iterate through each of the ".fasta" gene reference files along with their respective ".abi" files through the script so that I get one result at a time for each of the ".abi" file (which is done by the script)..

FASTA Bash-scripting abi • 2.1k views
ADD COMMENT
0
Entering edit mode
9.1 years ago

Your question is not totally clear, but I think what you are asking is: How do I loop over pairs of .fasta and .abi files as input for single script? If so you can probably do:

$ for fasta in *fasta; do sh script.sh $fasta ${fasta%.fasta}.abi; done

which will run "script.sh" supplying the fasta and abi file names (assuming the prefixes are the same) as arg1 and arg2, for all fasta files in a directory.

ADD COMMENT
0
Entering edit mode

Thats exactly what I want to do but the problem is that the names of each of the .abi files will be different from the .fasta file and the .fasta files header contain something like this:

>chr1:12345

Why this is needed is that 12345, for example, is the start position of the respective genes in the .fasta files and this would be necessary for the script.

ADD REPLY

Login before adding your answer.

Traffic: 2415 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6