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

Check if cell data has any variant and check if cell data variants ha… #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ghuls
Copy link
Contributor

@ghuls ghuls commented Sep 19, 2024

…ve any overlap with donor VCF file.

Check if cell data has any variant and check if cell data variants have any overlap with donor VCF file.

Examples:

  • Running vireo with a cellSNP directory that does not have any variant (as provided CBs for cellSNP-lite did not overlap with any variants).

    [vireo] Loading cell folder ... Error: cell data in vcf file, or cellSNP output folder, or vartrix's alt.mtx,ref.mtx,barcodes.tsv does not contain any variants.

  • Running vireo with a VCF file that does not overlap at all with the SNPs used in cellSNP-lite.

    cellSNP-lite [vireo] Loading cell folder ... [vireo] Loading donor VCF file ... /conda/envs/cellsnp/lib/python3.11/site-packages/numpy/core/fromnumeric.py:3504: RuntimeWarning: Mean of empty slice. return _methods._mean(a, axis=axis, dtype=dtype, /conda/envs/cellsnp/lib/python3.11/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in scalar divide ret = ret.dtype.type(ret / rcount) [vireo] warning: no variants matched to donor VCF, please check chr format! Error: No matching variants found between cell data and donor VCF.

Before:

[vireo] Loading cell folder ... [vireo] Loading donor VCF file ... /conda/envs/cellsnp/lib/python3.11/site-packages/numpy/core/fromnumeric.py:3504: RuntimeWarning: Mean of empty slice. return _methods._mean(a, axis=axis, dtype=dtype, /conda/envs/cellsnp/lib/python3.11/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in scalar divide ret = ret.dtype.type(ret / rcount) [vireo] warning: no variants matched to donor VCF, please check chr format! Traceback (most recent call last): File "/conda/envs/cellsnp/bin/vireo", line 8, in <module> sys.exit(main()) ^^^^^^ File "/conda/envs/cellsnp/lib/python3.11/site-packages/vireoSNP/vireo.py", line 168, in main donor_GPb = parse_donor_GPb(donor_vcf['GenoINFO'][options.geno_tag], ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/conda/envs/cellsnp/lib/python3.11/site-packages/vireoSNP/utils/vcf_utils.py", line 328, in parse_donor_GPb GT_prob = np.zeros((len(GT_dat), len(GT_dat[0]), 3)) ~~~~~~^^^ IndexError: list index out of range

The traceback obscures the warning message.

…ve any overlap with donor VCF file.

Check if cell data has any variant and check if cell data variants
have any overlap with donor VCF file.

Examples:

  - Running vireo with a cellSNP directory that does not have any variant
    (as provided CBs for cellSNP-lite did not overlap with any variants).

        [vireo] Loading cell folder ...
        Error: cell data in vcf file, or cellSNP output folder, or vartrix's alt.mtx,ref.mtx,barcodes.tsv does not contain any variants.

  - Running vireo with a VCF file that does not overlap at all with the
    SNPs used in cellSNP-lite.

        [vireo] Loading cell folder ...
        [vireo] Loading donor VCF file ...
        /conda/envs/cellsnp/lib/python3.11/site-packages/numpy/core/fromnumeric.py:3504: RuntimeWarning: Mean of empty slice.
          return _methods._mean(a, axis=axis, dtype=dtype,
        /conda/envs/cellsnp/lib/python3.11/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in scalar divide
          ret = ret.dtype.type(ret / rcount)
        [vireo] warning: no variants matched to donor VCF, please check chr format!
        Error: No matching variants found between cell data and donor VCF.

Before:

    [vireo] Loading cell folder ...
    [vireo] Loading donor VCF file ...
    /conda/envs/cellsnp/lib/python3.11/site-packages/numpy/core/fromnumeric.py:3504: RuntimeWarning: Mean of empty slice.
      return _methods._mean(a, axis=axis, dtype=dtype,
    /conda/envs/cellsnp/lib/python3.11/site-packages/numpy/core/_methods.py:129: RuntimeWarning: invalid value encountered in scalar divide
      ret = ret.dtype.type(ret / rcount)
    [vireo] warning: no variants matched to donor VCF, please check chr format!
    Traceback (most recent call last):
      File "/conda/envs/cellsnp/bin/vireo", line 8, in <module>
        sys.exit(main())
                 ^^^^^^
      File "/conda/envs/cellsnp/lib/python3.11/site-packages/vireoSNP/vireo.py", line 168, in main
        donor_GPb = parse_donor_GPb(donor_vcf['GenoINFO'][options.geno_tag],
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/conda/envs/cellsnp/lib/python3.11/site-packages/vireoSNP/utils/vcf_utils.py", line 328, in parse_donor_GPb
        GT_prob = np.zeros((len(GT_dat), len(GT_dat[0]), 3))
                                             ~~~~~~^^^
    IndexError: list index out of range

    The traceback obscures the warning message.
@ghuls ghuls force-pushed the check_empty_overlap_cell_vcf_and_donor_vcf branch from d60d4f4 to 89f598b Compare September 19, 2024 15:27
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

Successfully merging this pull request may close these issues.

1 participant