Skip to content

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

@JTnmn2000

Description

@JTnmn2000

Hi there!

I'm trying to use vireo to demultiplex samples of a 10x scRNAseq dataset in which there are 24 cell lines. I am missing the vcf files for 3 of them, so I am trying to run vireo while providing the merged vcf file for the 21 cell lines I did have the files for. My vcf is already filtered for biallelic SNPs and maf>0.1

After running cellSNP-lite, I tried running vireo like this, with the DONOR_GT_file being my partial vcf:
vireo -c CELL_DATA -d DONOR_GT_FILE -o OUT_DIR -N n_donor --genoTag GT

But I keep getting the following error:

[vireo] Loading cell folder ...
[vireo] Loading donor VCF file ...
[vireo] 11735 out 59108 variants matched to donor VCF
Traceback (most recent call last):
  File "/home/rstudio/miniconda3/envs/Vireo_venv/bin/vireo", line 10, in <module>
    sys.exit(main())
             ~~~~^^
  File "/home/rstudio/miniconda3/envs/Vireo_venv/lib/python3.14/site-packages/vireoSNP/vireo.py", line 172, in main
    donor_GPb = parse_donor_GPb(donor_vcf['GenoINFO'][options.geno_tag],
        options.geno_tag)
  File "/home/rstudio/miniconda3/envs/Vireo_venv/lib/python3.14/site-packages/vireoSNP/utils/vcf_utils.py", line 331, in parse_donor_GPb
    GT_prob[i, j, :] = parse_GT_code(GT_dat[i][j], tag)
                       ~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/home/rstudio/miniconda3/envs/Vireo_venv/lib/python3.14/site-packages/vireoSNP/utils/vcf_utils.py", line 313, in parse_GT_code
    _prob[int(float(code[0]) + float(code[-1]))] = 1
              ~~~~~^^^^^^^^^
ValueError: could not convert string to float: '.'

It's true that for many variants, the GT info for cell lines is missing and thus ./. in the vcf file. However, I retain too little variants if I filter the vcf for variants that have GT information for all 21 cell lines. Is vireo not able to handle the ./. at all? And is that the only issue for why vireo is not running properly?

Thanks in advance!
J

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions