Samtools reheader Numerical result out of range

1

Hi,
I am trying to change the header of a bam file to keep only one chromosome, using the following command:

samtools view -H align.virus.bam | awk '!/^@/ {print} !/^@SQ/ {print} $0 ~ /MN908947.3/'  | samtools reheader - align.virus.bam > mybam.bam

The issue is that, when I try to samtools view -h mybam.bam | less.

I get this error:

samtools view: error reading file "mybam.bam": Numerical result out of range

I am using samtools 1.12

Thanks


samtools


header


bam

• 15 views



Source link