USDA-VS / vSNP3

vSNP -- validate SNPs
GNU General Public License v3.0
7 stars 1 forks source link

Error while running vSNP 3.20 "step1" with nanopore data #7

Open duceppemo opened 6 months ago

duceppemo commented 6 months ago

Command used: vsnp3_step1.py \ -r1 "$r1" \ --spoligo \ --nanopore

Error message: Traceback (most recent call last): File "/home/bioinfo/miniconda3/envs/vsnp3.20/bin/vsnp3_step1.py", line 273, in <module> vsnp.run() File "/home/bioinfo/miniconda3/envs/vsnp3.20/bin/vsnp3_step1.py", line 158, in run if alignment.zero_coverage.ave_coverage < 40 or alignment.DUPLICATION_RATIO > .80 or float(fastq_stats.R1.passQ20) < 50.0: ValueError: could not convert string to float: '11,015' Looks like it's caused by the use of a comma (",") as thousands separator. It might be link to the host system language preferences if you don't get that error on your dev / production machine.

duceppemo commented 6 months ago

Or it could be the decimal separator too. French keyboards used the comma and decimal separator. I definitely don't have 11,015X coverage, so it would make more sense that it's the decimal separator.

stuber commented 6 months ago

I've seen something similar. Try this and let's see if it fixes it.

Before running the script run export LC_ALL=C? Will look something like this.

export LC_ALL=C

vsnp3_step1.py -r1 *_R1*fastq.gz -r *_R2*fastq.gz
stuber commented 6 months ago

Also, I see you're using the --nanopore option. With this option bcftools is used. bcftools has not been working from conda lately. If you have issues with it let me know and I'll send what I've used to fix it.

forty2wallabyway commented 1 month ago

Hi @stuber

I think I am experiencing the bcftools/conda conflict that you described as I received the following while running with --nanopore:

Will attempt to run bcftools from conda environment FATAL: could not open image /project/scratch/singularity/bcftools.sif: failed to retrieve path for /project/scratch/singularity/bcftools.sif: lstat /project: no such file or directory FATAL: could not open image /project/scratch/singularity/bcftools.sif: failed to retrieve path for /project/scratch/singularity/bcftools.sif: lstat /project: no such file or directory

Would you be able to assist? Thx

stuber commented 1 month ago

Hi,

Updated to the latest vsnp3 version 3.26 if needed.

After testing my bcftools using bcftools -h, I can see that I'm running version 1.21, and it appears to be working correctly. If you are not running version 1.21, try:

conda install -c bioconda bcftools=1.21

If this doesn't fix bcftools, please send me the error output.

forty2wallabyway commented 1 month ago

Thanks for the super fast reply. I can confirm that I am currently running vsnp3 v3.26 and bcftools v1.21

Here is a run log as well as the readout. THnks! BTV13_vsnp3_stdout.txt BTV-13_run_log.txt

stuber commented 1 month ago

Thanks for the stdout file.

A BCFtools "fix" specific to my environment found its way into the script. I will need to push an update to address this. It will come with the next update. For now, this will need to be fixed manually. The fix is needed in the vsnp3_alignment_vcf.py file. Due to issues with BCFtools, we found it most stable to run it from a container. See lines 148-155. You can try applying a fix in one of two ways:

  1. If you're running on a system with Singularity, update the hard-coded paths in these lines to fit your environment.
  2. If Singularity is not available, comment out these lines and uncomment line 156.

Access file:

vim $(which vsnp3_alignment_vcf.py