Hi
I have to run this on 136 .vcf files but manually one by one takes an ages
Can you please help me in any script to do that at the same time in terminal?
[fi1d18@cyan01 snp]$ bcftools query -f '%CHROM\t%POS\t%REF\t%ALT[\t%ID]\n' file.vcf > file.txt
[fi1d18@cyan01 snp]$
Thanks
There are many threads that deal with
for
loops in shell on Biostars. I will link one to get you going: Bash Script Loop HelpIf you have compute resources then you can use
parallel
in addition. Or ideally submit separate jobs on a compute cluster (if you have access to one).Thank you we have clutter computing but should not I prepare a txt for submitting each that takes the same time
May be I am wrong though :(
It should take no additional time (well some minutes). I will use the example posted in the answer below to show you how you could submit cluster jobs (I will use
SLURM
as an example but substitute your own job scheduler as needed).Looks like the user who had posted the answer chose to take it out. But you could use some variation like so
This
for
loop will submit individual cluster jobs of each of your data files.Thank you; I provided a .txt file containing
Then in terminal I wrote
qsub file.txt
After running job error file says
I had said specifically that it was an example using
SLURM
. If your cluster uses a different job scheduler this is obviously not going to work.Since you are using
qsub
your cluster is using SGE/PBS. You will need to use an appropriate command that works for your job scheduler.Please edit your post title to make it useful for others. It doesn't currently tell anyone anything about the content.