jvarkit icon indicating copy to clipboard operation
jvarkit copied to clipboard

multipass PcrClipReads

Open avilella opened this issue 10 years ago • 2 comments

Verify

  • master branch or varkit

Subject of the issue

I would like to know how to best do a multipass PcrClipReads on the sam bam file

Expected behaviour

I would like to start with a bam file and a collection of bed files to run through in order. For reads falling outside the bed file, print out the bam entries as is. For reads falling inside the bed file, clip and print out. Once done for the first bam file, repeat the process with the second bed file. Each intermediate bam files should be exactly the same as the initial bam file, only with more clipping or fully discarded reads at every pass.

Actual behaviour

I believe the current default options for PcrClipReads only prints out the reads affected, but does not print any of the unaffected reads. Maybe simply needs an extra --print_all option?

avilella avatar Feb 29 '16 15:02 avilella

Or is it a matter of flipping around the bed regions so it clips outside the regions?

avilella avatar Feb 29 '16 15:02 avilella

I've added an option

    -pr,--programId                     add a program ID to the clipped SAM  records. default: false

all the clipped bam should have a new attribute PG.

lindenb avatar Feb 29 '16 18:02 lindenb