-
Notifications
You must be signed in to change notification settings - Fork 6
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
Error when using sort_vcf_same_as_bam.sh #11
Comments
Also tried to create index for file but did not solve the issue, just referred to different position 1:15
|
Fixed my issue by adapting the bcf file to have the same naming pattern than my bam file
Thanks again for the amazing tool! |
Also your BAM header looks a bit weird. Normally the tags should be in upper case (at least for the standard ones). samtools view -H ${bam} | sed -e 's/^@\([a-z][a-z]\)/@\U\1/' > fixed_bam_header.sam
samtools reheader -P fixed_bam_header.sam in.bam > out.bam |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you for these tools!
I am encountering this error
[E:%s] Your VCF/BCF files and SAM/BAM/CRAM files have different ordering of chromosomes. SAM/BAM/CRAM file has %s before %s, but VCF/BCF file has %s after %s"
and thus try to usesort_vcf_same_as_bam.sh
.I download a vcf of common snps like so:
For convenience I include the first 300 lines of the resulting vcf file: vcf_head300.txt
Then I try to reorder it like:
This leads to the following error:
This position refers to the first line in the table in the vcf file.
My bam file looks like this, as shown by
samtools view -H tmp_dir_example_bam/example_bam.bam
Thank you for your help and let me know if I should provide any more information please!
The text was updated successfully, but these errors were encountered: