Hi,
I need to mark reads mapped to a particular chromosome as unmapped in aligned bam file. The fastq files were aligned using an fasta file with one more chromosome than is present in our standard assembly. If possible I would like to avoid converting everything back to fastq and starting all over.
In particular, what needs to be done apart from setting the third bit in FLAGS? I notice that my bam files have reads with the third bit set, but which also have chromosome positions when I "samtools view" the bam file.
I need to mark reads mapped to a particular chromosome as unmapped in aligned bam file. The fastq files were aligned using an fasta file with one more chromosome than is present in our standard assembly. If possible I would like to avoid converting everything back to fastq and starting all over.
In particular, what needs to be done apart from setting the third bit in FLAGS? I notice that my bam files have reads with the third bit set, but which also have chromosome positions when I "samtools view" the bam file.