lindenb / jvarkit

Java utilities for Bioinformatics
https://jvarkit.readthedocs.io/
Other
482 stars 133 forks source link

multipass PcrClipReads #46

Open avilella opened 8 years ago

avilella commented 8 years ago

Verify

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 commented 8 years ago

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

lindenb commented 8 years ago

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.