Closed MJNT1999 closed 3 months ago
The issue is with Snakemake: https://github.com/snakemake/snakemake/pull/2547 We should be able to create an easy workaround; I'll update here when I push a new koverage version.
Hi @MJNT1999,
Thanks for your interest in Phables!
Can you remove your existing Phables environment using the following command?
mamba remove -n phables --all
Then, can you re-set up Phables and try again? Please let us know if you still come across this error.
Thanks!
Hi, thank you so much for the quick response, I've gone ahead and reset up Phables in a fresh Miniforge, again no issues with the install or test
It works with the long reads that I gave it now
However it still fails with the short reads. I reassembled the short reads to check it wasn't my GFA files and get the same result. The assembly was done with shovill using --trim as the only additional option.
[Tue Jan 23 12:53:30 2024]
Error in rule faidx_ref:
jobid: 5
input: Benchmark/Phables/p7_d1_C2/postprocess/genomes_and_unresolved_edges.fasta
output: Benchmark/Phables/p7_d1_C2/postprocess/genomes_and_unresolved_edges.fasta.fai
log: Benchmark/Phables/p7_d1_C2/postprocess/logs/faidx_ref.err (check log file(s) for error details)
conda-env: /atlas/matthew.thomas/miniforge3/envs/Phables/lib/python3.11/site-packages/phables/workflow/conda/c119b3d9aaeabf4ee35a985fbaa3149b_/lib/python3.11/site-packages/koverage/workflow/conda/7a5a2e79bb8e852e324dc4d63a264a61_
shell:
samtools faidx Benchmark/Phables/p7_d1_C2/postprocess/genomes_and_unresolved_edges.fasta 2> Benchmark/Phables/p7_d1_C2/postprocess/logs/faidx_ref.err
(one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)
Logfile Benchmark/Phables/p7_d1_C2/postprocess/logs/faidx_ref.err:
================================================================================
samtools: /atlas/matthew.thomas/miniforge3/envs/Phables/lib/python3.11/site-packages/phables/workflow/conda/c119b3d9aaeabf4ee35a985fbaa3149b_/lib/python3.11/site-packages/koverage/workflow/conda/7a5a2e79bb8e852e324dc4d63a264a61_/bin/../lib/libtinfow.so.6: no version information available (required by samtools)
samtools: /atlas/matthew.thomas/miniforge3/envs/Phables/lib/python3.11/site-packages/phables/workflow/conda/c119b3d9aaeabf4ee35a985fbaa3149b_/lib/python3.11/site-packages/koverage/workflow/conda/7a5a2e79bb8e852e324dc4d63a264a61_/bin/../lib/libncursesw.so.6: no version information available (required by samtools)
samtools: /atlas/matthew.thomas/miniforge3/envs/Phables/lib/python3.11/site-packages/phables/workflow/conda/c119b3d9aaeabf4ee35a985fbaa3149b_/lib/python3.11/site-packages/koverage/workflow/conda/7a5a2e79bb8e852e324dc4d63a264a61_/bin/../lib/libncursesw.so.6: no version information available (required by samtools)
[faidx] Could not build fai index Benchmark/Phables/p7_d1_C2/postprocess/genomes_and_unresolved_edges.fasta.fai
Hi @MJNT1999,
Can you please check if the file postprocess/genomes_and_unresolved_edges.fasta
is created?
If that's fine, it looks like a conda issue samtools/issues/1822.
Can you run the following commands and try setting up Phables again? Sorry for the trouble.
conda config --add channels defaults
conda config --add channels bioconda
conda config --add channels conda-forge
conda config --set channel_priority strict
The file was created, but there is nothing in it
The genomes_and_unresolved_edges.fasta.idx has been created and while it has content it is only 128 kb
Is is the file supposed to be empty?
I will go ahead with the following commands
There should be sequences recorded in postprocess/genomes_and_unresolved_edges.fasta
if phage sequences were identified.
Can you check if there are any sequences recorded in phables/resolved_paths.fasta
and phables/unresolved_phage_like_edges.fasta
?
Nothing in the either of those files sadly. I have run GeNomad and Vibrant on this sample and found at least one prophage in this sample.
Unfortunately, as mentioned in the manuscript, Phables will not identify prophages as it requires resolving the bacterial component they connect to. Phables will only identify phages that are not integrated into bacterial genomes.
Ah okay I can't guarentee my prophage is active, thank you so much for your help with this!
No problem. I will fix Phables to stop if no genomes are resolved (so it won't run the post-processing steps).
I face the similar issue as MJNT1999 above. My test run is fine. Nevertheless, when I give the actual data to the pipeline, Snakemake fails. I should admit that I am quite new to this bioinformatics world.
snakemake -s /home/ubuntu/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/test_phables.smk --configfile phables.out/config.yaml --cores 1 --use-conda --conda-prefix /home/ubuntu/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/conda --rerun-incomplete --printshellcmds --nolock --show-failed-logs [2024:01:30 19:35:17] Snakemake finished successfully [2024:01:30 21:27:01] Config file phables.out/config.yaml already exists. Using existing config file. [2024:01:30 21:27:01] Updating config file with new values [2024:01:30 21:27:01] Writing config file to phables.out/config.yaml [2024:01:30 21:27:01] ------------------ [2024:01:30 21:27:01] | Runtime config | [2024:01:30 21:27:01] ------------------
alpha: 1.2 compcount: 200 conda_prefix: /home/ubuntu/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/conda configfile: phables.out/config.yaml covtol: 100 databases: null dir: /home/ubuntu/miniconda3/envs/phables/lib/python3.11/site-packages/phables/test_data evalue: 1.0e-10 input: /home/ubuntu/phables/E002.final_k149.gfa log: phables.out/phables.log longreads: false maxpaths: 10 mgfrac: 0.2 mincov: 10 minlength: 2000 output: phables.out profile: null reads: /home/ubuntu/Revathy/Ryan/pearl/viromes/reads/trimmed/E002/ resources: jobCPU: 8 jobMem: 16000 seqidentity: 0.3 snake_args: [] snake_default:
[2024:01:30 21:27:01] --------------------- [2024:01:30 21:27:01] | Snakemake command | [2024:01:30 21:27:01] ---------------------
snakemake -s /home/ubuntu/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/phables.smk --configfile phables.out/config.yaml --cores 16 --use-conda --conda-prefix /home/ubuntu/miniconda3/envs/phables/lib/python3.11/site-packages/phables/workflow/conda --rerun-incomplete --printshellcmds --nolock --show-failed-logs [2024:01:30 21:28:06] ERROR: Snakemake failed
I get the mamba build error at the end saying,
Could not solve for environment specs The following package could not be installed └─ koverage >=0.1.8 is not installable because it requires └─ datapane >=0.16.7 but there are no viable options ├─ datapane 0.16.7 would require │ └─ boltons >=20.0.0,<22.0.0 , which conflicts with any installable versions previously reported; └─ datapane 0.17.0 would require └─ dominate >=2.7.0,<3.0.0 , which conflicts with any installable versions previously reported.
I would appreciate any help.
Hi Revathi, please don't hesitate to open new issues. As a quick fix, can you check if you're using strict channel priority? Set it to flexible or disabled https://conda.io/projects/conda/en/latest/user-guide/tasks/manage-channels.html
Vijini, I suspect the problem is having bioconda listed before conda-forge in the env yaml. I never use strict channel_priority and flexible is now the default for conda so this usually slips through the cracks for me, but it's usually easy enough to address. We could also set up a workflow to test the build environments under strict channel priority; I recently did this for Koverage and Hecatomb.
Hi Michael Roach, Thank you for your input. Disabling the strict channel priority helped. I see that step 4/11 is running. Thank you. Will keep you updated. Regards, Revathy
Closing this issue. Please re-open if needed.
Describe the bug Phables fails at Koverage step with error. I installed the latest version of phables using mamba, the install appears to work and the test is fine. The run fails when it reaches the coverage step. I have tried this with illumina files (shown below) and with an ONT from an isolate which was assembled with Flye. Any insight into this would be very much appreciated!
To Reproduce
Expected behavior Phables runs
Screenshots If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
Linux Terminal Conda version 23.11.0 Mamba version 1.5.5
Additional context Add any other context about the problem here.