velocyto.py icon indicating copy to clipboard operation
velocyto.py copied to clipboard

Incorrect trimming of chromosome name leads to IOError(f"Input .bam file should be chromosome-sorted. (Hint: use `samtools sort {bamfile}`)")

Open kepbod opened this issue 1 month ago • 0 comments

I ran velocyto on the rat genome. In rat genome, there are lots of chromosome names with _. I noticed that velocyto will trim chromosome name with _ (https://github.com/velocyto-team/velocyto.py/blob/master/velocyto/counter.py#L275-L283), and this will change some chromosome names to "NW" in my case, resulting to IOError (https://github.com/velocyto-team/velocyto.py/blob/master/velocyto/counter.py#L676). This issue were also mentioned in https://github.com/velocyto-team/velocyto.py/issues/117#issuecomment-749436361.

Here is the name of some chromosomes in rat: chr1 chr10 chr11 chr12 chr12_NW_023637711v1_random chr12_NW_023637712v1_random chr13 chr14 chr15 chr16

kepbod avatar Jun 25 '24 15:06 kepbod