refresh-bio / PHIST

Phage-Host Interaction Search Tool
GNU General Public License v3.0
27 stars 2 forks source link

No `vir.list` file found #9

Closed susheelbhanu closed 1 year ago

susheelbhanu commented 2 years ago

Hi,

I'm trying to run PHIST in a snakemake workflow. However, i'm getting the below error:

Traceback (most recent call last):
  File "/mnt/irisgpfs/projects/nomis/assemblies/viromes/workflow/rules/../../deps/phist/phist.py", line 78, in <module>
    oh = open(lst_path, 'w')
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/irisgpfs/projects/nomis/assemblies/virome_results/phist/vir.list'

My run command looks like this:

python3 /mnt/irisgpfs/projects/nomis/assemblies/viromes/workflow/rules/../../deps/phist/phist.py -t 24 $(dirname /work/projects/nomis/assemblies/virome_results/vrhyme/dereplicated_bins.fna) /scratch/users/sbusi/collected_bins_20220720 /work/projects/nomis/assemblies/virome_results/phist/common_kmers.csv /work/projects/nomis/assemblies/virome_results/phist/predictions.csv

is this an issue with creating a tmp folder?

aziele commented 2 years ago

Hi,

Thank you for your interest in PHIST. All temporary files generated by PHIST are stored in the same directory as the results (predictions.csv and common_kmers.csv). It looks like the directory where you are trying to save results does not exist. Could you please check if the directory exists (/work/projects/nomis/assemblies/virome_results/phist/)?

In the next PHIST update, we will simplify running the tool by providing the out_dir argument (and the output directory will be created if it does not exist)/

python3 phist.py [options] <virus_dir> <host_dir> <out_dir>

susheelbhanu commented 2 years ago

Hey @aziele Thanks for your reply. The directory was also likely removed by snakemake so I'm trying to create it before the file is run. Will keep you posted.

aziele commented 1 year ago

Hi @susheelbhanu, we have simplified the command line that invokes PHIST.

python3 phist.py [options] <virus_dir> <host_dir> <out_dir>

Instead of specifying the path to the output files (common_kmers.csv and predictions.csv), you can just provide the output directory for the results (<out_dir>). PHIST will create the directory if it does not exist.

susheelbhanu commented 1 year ago

Thanks @aziele. This will help streamline things a lot. I worked around it by creating the directory upfront, so this is helpful.

I'm assuming that i simply need to pull the updated repo?

aziele commented 1 year ago

Hope it helps. Yes, you just need to pull the update repo.

susheelbhanu commented 1 year ago

Awesome, thank you!