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

Issue with reference for cellsnp-lite #43

Closed haigdjambazian closed 2 years ago

haigdjambazian commented 2 years ago

I get this error on running cellsnp-lite: [I::main] start time: 2022-05-25 08:01:24 [W::check_args] Max depth set to maximum value (2147483647) [I::main] mode 2a: pileup 22 whole chromosomes in 737280 single cells. [E::csp_pileup] could not parse name for chrom 1. [E::main] running mode 2a failed. Is the tool expecting the reference to be named a certain way? This is the format of my reference header: >OVEO01000019 1 Plasmodiophora brassicae genome assembly, contig: contig_19_no3tel, whole genome shotgun sequence Thanks in advance.

hxj5 commented 2 years ago

Hi, as you were running mode 2a, the tool expects the input chromosome names (specified by --chrom) to match the names in bam header (you may check with samtools view -h <bam>). The default value for --chrom is 1,2,...,22, you may change it based on your reference file or bam file.

haigdjambazian commented 2 years ago

This makes sense, I renamed my contigs to 1,2,...,20 and the tool now complains about 21 since it is expecting 22 chr. Adding --chrom 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20 allowed to tool to start with no errors. Thanks!