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

TypeError: '>=' not supported between instances of 'NoneType' and 'int' #75

Open
alexisweber opened this issue Jan 31, 2023 · 1 comment

Comments

@alexisweber
Copy link

I generated a cellSNP vcf file from snRNA-Seq comprised of three different donors. I'd like to identify the barcodes belonging to one of the donors using its corresponding genotype. I recently tried to run vireo using the cellSNP vcf and the genotype vcf from one of the donors to identify which barcodes belonged to that donor. However, I received an error from the match_donor_VCF() function, defined in io_utils.py, that the match() function output mm_idx is a NoneType and can't be contrasted to an int class by >=.

The script I ran:
CELL_DATA=/u/home/a/alexiswe/project-dhg/CellSNPRun/Ctrl0512CellSNPOut/total_chroms_cellsY.vcf.gz DONOR_GT_FILE=/u/home/a/alexiswe/project-dhg/111822GenotypePlinkables/PLINK_050123_0406_B07_N1644/N1644.vcf.gz OUT_DIR=/u/home/a/alexiswe/project-dhg/CtrlMultiomeVireoOut/Ctrl0512VireoOut
/u/home/a/alexiswe/.local/bin/vireo -c $CELL_DATA -d $DONOR_GT_FILE -o $OUT_DIR -N $n_donor -t GT

The error I received:
[vireo] Loading cell VCF file ... [vireo] Loading donor VCF file ... Traceback (most recent call last): File "/u/home/a/alexiswe/.local/bin/vireo", line 33, in <module> sys.exit(load_entry_point('vireoSNP==0.5.6', 'console_scripts', 'vireo')()) File "/u/home/a/alexiswe/.local/lib/python3.9/site-packages/vireoSNP/vireo.py", line 160, in main cell_dat, donor_vcf = match_donor_VCF(cell_dat, donor_vcf) File "/u/home/a/alexiswe/.local/lib/python3.9/site-packages/vireoSNP/utils/io_utils.py", line 20, in match_donor_VCF if np.sum(mm_idx == mm_idx) == 0 or np.sum(mm_idx >= 0) == 0: TypeError: '>=' not supported between instances of 'NoneType' and 'int'

@huangyh09
Copy link
Collaborator

Hi,

Thanks for sharing the issue and sorry for the delay in getting back. After some diagnosis, it looks like an uncommon issue when the donor file uses “chr” and the cell file doesn’t, and the SNPs are only partially matched.

Here, I made a quick fix in the new release v0.5.8. Please upgrade and try it again, and see if it resolves the issue.

pip install -U vireoSNP

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