-
Notifications
You must be signed in to change notification settings - Fork 16
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
matching chromosome order in vcf and bam files #42
Comments
Hi @dalhoomist You can reorder your VCF file corresponding to the BAM using |
Hi, I'm having the same problem here. I tried @raivivek's suggestion but after running
With help from a colleague we figured out the metadata at the top of the VCF file is not sorted, and apparently other software can handle this (having different order in the metadata and each variant entry) but it doesn't seem the case for demuxlet. Is there any way to fix this that wouldn't involve manually moving around the metadata entries for each chromosome? Thanks! |
Hi @fatimasnc -- you're right on. Perhaps I should have mentioned this earlier as well, but certainly don't have to do it manually. Picard offers several other commands (such as |
Thanks a lot for your reply @raivivek! In the end we managed to solve it with this helper script from the aerts lab :) |
Hi, I have read your conversation and thanks for you providing the helper script. But I do not know hou to run this sort_vcf_same_as_bam.sh .Could you please provide an example? Thanks so much for helping. |
Hello,
I am using popscle dsc-pileup function as a prelude for running demuxlet on cellranger output. Here is my code:
packages/popscle/bin/popscle dsc-pileup --sam bam.bam --vcf vcf1.vcf --out home/workscape/TB3966/pileup --group-list barcodes.tsv
I downloaded a vcf from the 1000genomes to use here. The problem is that pipeline is throwing the following error:
[E:int32_t cmdCramDscPileup(int32_t, char**)] Your VCF/BCF files and SAM/BAM/CRAM files have different ordering of chromosomes. SAM/BAM/CRAM file has 19 before 2, but VCF/BCF file has 19 after 2
The order of chromosomes in the vcf normally started from 1, 2, 3 ... etc. In the bam file it is 1 10 11 12 ....
Is there a way to fix that?
Thanks for all the help.
The text was updated successfully, but these errors were encountered: