Hello everybody,
I have a problem i need some help for.
When I run a program on the command line for a single gene, it works fine:
program.sh genename_1 ../../../unchanged_file.txt ../../aa_bb_cc_dd_genename_1.gff genename_1.bed
But I need to run it about 1500 times on the command line and I don't know how to automate it.
I have a folder. Within this folder, there are different files with different endings. I only want to analyze the files which end with .gff.
All the .gff files are the same at the beginning aa_bb_cc_dd_ then the genename comes and finally an underscore and a number like here:
aa_bb_cc_dd_Genename_1.gff
aa_bb_cc_dd_Genename_2.gff
aa_bb_cc_dd_Genename_3.gff
aa_bb_cc_dd_otherGenename_1.gff
aa_bb_cc_dd_otherGenename_2.gff
There are more than 1500 combinations.
The code which does the job for one file looks like this:
program.sh genename_1 ../../../unchanged_file.txt ../../aa_bb_cc_dd_genename_1.gff genename_1.bed
Is there any way to do this for all 1500 .gff files in a few steps. I'm very sorry i cannot suggest anything, but i don't have too much experience with the command line. I could do something like this in R, but this doesn't help here a lot.
Thanks a lot, Alex
Thanks a lot, i didn't know that R can call command line programs. This will be very usefull for me.
I guess i will try both ways.
Thanks a lot again!