Question: Edit bam files using Pysam
0
gravatar for zaidnab
11 months ago by
zaidnab0
zaidnab0 wrote:

Hi there! I am trying to edit values in a bam file, using Pysam, or any other interface. I want to change the base quality, and the read sequence of certain reads. I have searched a ton, but have not found any methods of editing bam files directly. I am not sure if this is possible. Any help would be appreciated! Thanks :)

ADD COMMENTlink modified 11 months ago by Devon Ryan81k • written 11 months ago by zaidnab0

Out of curiosity, why do you want to do that?

ADD REPLYlink written 11 months ago by ATpoint5.7k
1
gravatar for Devon Ryan
11 months ago by
Devon Ryan81k
Freiburg, Germany
Devon Ryan81k wrote:

You can't really edit a BAM file directly, but you can iterate over the reads and write them in a modified state to a new file.

ADD COMMENTlink written 11 months ago by Devon Ryan81k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1864 users visited in the last hour