single-cell-genetics / vireo

Demultiplexing pooled scRNA-seq data with or without genotype reference
https://vireoSNP.readthedocs.io
Apache License 2.0
71 stars 27 forks source link

ValueError: could not convert string to float: '.' #84

Open algarnham opened 1 year ago

algarnham commented 1 year ago

Hi,

I've been trying to run vireo (v0.5.8) for some snRNAseq data, but I've been getting the following error:

Loading vireoSNP/0.5.8 Loading requirement: bcl2fastq/2.19.1 [vireo] Loading cell folder ... [vireo] Loading donor VCF file ... [vireo] 3310 out 3470 variants matched to donor VCF Traceback (most recent call last): File "/stornext/System/data/apps/vireoSNP/vireoSNP-0.5.8/bin/vireo", line 11, in load_entry_point('vireoSNP==0.5.8', 'console_scripts', 'vireo')() File "/stornext/System/data/apps/vireoSNP/vireoSNP-0.5.8/lib64/python3.6/site-packages/vireoSNP/vireo.py", line 165, in main options.geno_tag) File "/stornext/System/data/apps/vireoSNP/vireoSNP-0.5.8/lib64/python3.6/site-packages/vireoSNP/utils/vcf_utils.py", line 306, in parse_donor_GPb GT_prob[i, j, :] = parse_GT_code(GT_dat[i][j], tag) File "/stornext/System/data/apps/vireoSNP/vireoSNP-0.5.8/lib64/python3.6/site-packages/vireoSNP/utils/vcf_utils.py", line 288, in parse_GT_code _prob[int(float(code[0]) + float(code[-1]))] = 1 ValueError: could not convert string to float: '.'

The command I'm using is:

vireo --cellData cellsnp_lite --donorFile all_donors_chr.vcf.gz --outDir vireo_strat2 --nInit 200 --nproc 30 --genoTag GT

The all_donors_chr.vcf.gz has been filtered using the cellsnp_lite regions as recommended in the manual.

Any advice/help you could give in over coming this error would be much appreciated!

Thanks!

huangyh09 commented 1 year ago

Hi, thanks for raising the issue and sorry for the delay.

It looks like in your donorFile all_donors_chr.vcf.gz, there are SNPs with uncommon genotypes (usually, ., .|. or ./.). https://github.com/single-cell-genetics/vireo/blob/master/vireoSNP/utils/vcf_utils.py#L284

You may check if you only include biallelic SNPs. Otherwise, please only keep bi-allelic SNPs.

Yuanhua