Filtering out chromosomes still leave empty records in header

4 views
Skip to first unread message

Ricardo Linares

unread,
Jan 4, 2024, 10:58:50 AMJan 4
to sambamba-discussion
I filter out unwanted chromosomes or assemblies using:
sambamba view  -f bam -F "ref_name =~ /^chr[0-9XY]/" $BAM > $BAMout

This works and removes the reads from those chromosomes. However, when I check the BAM header, there is still a record of the chromosomes/assemblies I filtered out, which is cumbersome since those records will be passed on to downstream tools (like qualimap). Is there a way to set sambamba to remove those header records from which I am filtering out reads ?
Reply all
Reply to author
Forward
0 new messages