samtools reheader error
1
0
Entering edit mode
21 days ago

Hello, everybody. I used VG to align a pangenome and generate the original BAM file, where the header sequence order is chr1, chr10, chr11. I wanted to replace the header to chr1, chr2, chr3, so I generated a SAM file, manually adjusted the chromosome order, and then used samtools reheader to modify the BAM file. After modification, an issue occurred: the chromosome positions of the original sequences changed. I would like to know how to avoid this situation. error

samtools • 342 views
ADD COMMENT
0
Entering edit mode

What do you hope to achieve by renaming the header? That is unusual as the header matches the reference used. Also why not use http://www.htslib.org/doc/samtools-reheader.html

ADD REPLY
0
Entering edit mode

I am using GATK to identify regions requiring local realignment, providing target intervals for the IndelRealigner tool to optimize the alignment quality around short insertions and deletions (indels). However, the following error occurred, so I want to adjust the order of the BAM file header.

gatk3.8) chiyong@chiyong-Super-Server:/mnt/h/gigas/data$       /home/chiyong/miniconda3/envs/gatk3.8/bin/gatk3 \
           -Xms20G -Xmx20G  \
           -T RealignerTargetCreator \
           --remove_program_records \
           --disable_bam_indexing \
           -nt 85 \
           -R /mnt/d/fugu/00.genome/hetun_t2t.fasta  \
           -I /mnt/c/pan-genome/Minigraph-Cactus/pangenome/sampling/bam/CF108.lefted.bam \
           -o /mnt/c/pan-genome/Minigraph-Cactus/pangenome/sampling/bam/CF108.left.shifted.intervals

##### ERROR   reads contigs = [chr1, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr2, chr20, chr21, chr22, chr3, chr4, chr5, chr6, chr7, chr8, chr9]
##### ERROR   reference contigs = [chr1, chr2, chr3, chr4, chr5, chr6, chr7, chr8, chr9, chr10, chr11, chr12, chr13, chr14, chr15, chr16, chr17, chr18, chr19, chr20, chr21, chr22]
##### ERROR ---
ADD REPLY
1
Entering edit mode
21 days ago
aw7 ▴ 350

You asked the same question on GitHub. It has been answered there.

ADD COMMENT

Login before adding your answer.

Traffic: 1752 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6