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

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

Open
algarnham opened this issue May 11, 2023 · 1 comment
Open

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

algarnham opened this issue May 11, 2023 · 1 comment

Comments

@algarnham
Copy link

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
Copy link
Collaborator

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

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