Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parallel Run #3

Open
mwylerCH opened this issue Jun 7, 2024 · 2 comments
Open

Parallel Run #3

mwylerCH opened this issue Jun 7, 2024 · 2 comments

Comments

@mwylerCH
Copy link

mwylerCH commented Jun 7, 2024

Many thanks for developing the tool.
Somehow I get an error that it's hardly reproducible. If I'm running GenoFLU in a single instance/sequentially it runs through without problems. However, if I'm running them in parallel (for example on a HPC), I got the following issue:

  • creation of ${SEQNAME}_blast_hpia_genotyping_dir folders
  • presence of ${SEQNAME}.temp

with SEQNAME=file name.

As a perl monk I'm not too much into python, it's possible, that GenoFlu uses some unspecific variables/file names?
Many thanks

@mwylerCH
Copy link
Author

mwylerCH commented Jun 7, 2024

Are possibly the hpai_geno_db.n* files a source of the issue? They appear during the run in the HOME directory for each run. Maybe by packing them into a tempfolder or by checking if they are already available would improve the parallelization.

@stuber
Copy link
Contributor

stuber commented Jun 7, 2024

Yes, the BLAST files are likely the issue. As currently written GenoFLU must have only one FASTA file per directory. Possibly an update will be made to run multiple per directory in the future but for now I recommend packaging FASTA files into their own directory then looping over directories using the ampersand to run in the background.

# Package FASTA to directory
for i in *.fasta; do 
    mkdir ${i%.fasta}
    mv $i ${i%.fasta}
done
# Run all directories at one time
cdir=$(pwd)
for d in *; do 
	(cd $cdir; echo $d; cd ./$d; 
	genoflu.py -f *fasta -n ${d}
	cd $cdir) &
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants