Question: running resfinder in parallel
gravatar for saadleeshehreen
18 months ago by
saadleeshehreen70 wrote:

Hi, We have all reference bacterial genome in our server under A,B,C,D.....Z subfolder. Each of them contains subfolder for each bacterial genome. Under that subfolder fasta file is situated. For example: ~/bacterial_genome/P/Pseudomonas_genome1/genome1.fna Now, I want to know the resistance status of each genome by running resfinder. I concatenated the whole database but due to large size of the input file (~430 gb) our server killed the job. So, I downloaded GNU parallel to handle it. I need to run resfinder 15 times for each of the genome ( because the parameter -a will change every time with different resistance phenotype).

Generally the command for one genome is following: cd ~/resistance mkdir aminoglycoside cd aminoglycoside export PATH=$PATH:/usr/local/bin/blast-2.2.26/bin -d /Volumes/scratch/databases/resfinderdb/ -i ~/bacterial_genome/P/Pseudomonas_genome1/genome1.fna -a aminoglycoside -k 90.00 -l 0.60

Main problem is this software create results file in the current directory and if the program is run again in the same directory, it deletes previous and save new one.

I am looking for a solution to write script in parallel for running the resfinder software for each genome .


genome • 444 views
ADD COMMENTlink modified 18 months ago by lakhujanivijay4.4k • written 18 months ago by saadleeshehreen70
gravatar for lakhujanivijay
18 months ago by
lakhujanivijay4.4k wrote:

I am trying to make sense of the poorly formatted text. Please do proper formatting before posting.

a GNU parallel solution would be like this

cd ~/resistance; parallel -j 10 -k 'mkdir {}; cd {};export PATH=$PATH:/usr/local/bin/blast-2.2.26/bin -d /Volumes/scratch/databases/resfinderdb/ -i ~/bacterial_genome/P/Pseudomonas_genome1/genome1.fna -a {} -k 90.00 -l 0.60' ::: *

NOTE: I haven't tried this. You wil definitely have to make changes to make this work. This is just to give you an idea

ADD COMMENTlink written 18 months ago by lakhujanivijay4.4k

Hi, I rewrite my command and use while loop. Could you please send me a GNU parallel solution for it? cat ./ | while read i j; do mkdir -p ./${j%.} perl ~/res/ -d ~/res/resfinderdb -i ${i} -a all -k 90.00 -l 0.60 -o ./${j%.} done

ADD REPLYlink written 18 months ago by saadleeshehreen70
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 2185 users visited in the last hour