statgen / demuxlet

Genetic multiplexing of barcoded single cell RNA-seq
Apache License 2.0
116 stars 25 forks source link

SAM/BAM/CRAM file has 1 before 10, but VCF/BCF file has 1 after 10 #102

Open WernaUVenema opened 1 year ago

WernaUVenema commented 1 year ago

Dear all,

Although I already sorted the VCF file according to the chromosome order of the BAM file AND adjusted the header of the VCF file, I still get this error: " [E:int32_t cmdCramDemuxlet(int32_t, char**)] Your VCF/BCF files and SAM/BAM/CRAM files have different ordering of chromosomes. SAM/BAM/CRAM file has 1 before 10, but VCF/BCF file has 1 after 10 "

What could be the problem? Is there a bug?

Could anyone help me out here?

Thanks!

hyunminkang commented 1 year ago

I doubt that this is a bug. If you can compare the results from

samtools view -H [in.bam] | grep ^@SQ | head -n 30 and

tabix -H [in.vcf.gz] | grep contig | head -n 30

that would clarify the difference.

WernaUVenema commented 1 year ago
Schermafbeelding 2023-04-24 om 16 06 42

thats the vcf through grep

WernaUVenema commented 1 year ago
Schermafbeelding 2023-04-24 om 16 06 35

and therethe BAM

hyunminkang commented 1 year ago

Did you reorder the VCF header too?

WernaUVenema commented 1 year ago

Yes, I did that manually using nano

Schermafbeelding 2023-04-24 om 16 57 33
hyunminkang commented 1 year ago

I don't know what the problem is exactly here. I didn't run into this problem before. Is it possible that you can use demuxlet in popscle (which is recommended anyways) and see if the problem persists?