single-cell-genetics / cellsnp-lite

Efficient genotyping bi-allelic SNPs on single cells
https://cellsnp-lite.readthedocs.io
Apache License 2.0
124 stars 11 forks source link

Automatically detect all chromosomes in bam #76

Open chilampoon opened 1 year ago

chilampoon commented 1 year ago

Hi there, I ran cellsnp on my mouse data but ran into this error:

[W::check_args] Max depth set to maximum value (2147483647)
[I::main] mode 2b: pileup 22 whole chromosomes in 1 sample(s).
[E::csp_pileup] could not parse name for chrom 20.
[E::main] running mode 2b failed.
[E::main] Quiting...
[I::main] end time: 2022-10-27 23:59:26
[I::main] time spent: 0 seconds.

I just noticed that the default param for --chrom is 1-22 however it's only 1-19 and M,X,Y in mouse, so if the default chromosomes could be automatically extracted from the input it'd be very much appreciated, thank you very much!

chilampoon commented 1 year ago

Also it'd be better to make the chromosome id be consistent between vcf and bam.., now it's like 1 in vcf but it's actually chr1 in bam

chilampoon commented 1 year ago

Oh nevermind if I set --chrom chr1 then in vcf it'll also be chr1, sorry I was just being dumb