The current GATK version is 3.7-0
Examples: Monday, today, last week, Mar 26, 3/26/04

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Powered by Vanilla. Made with Bootstrap.
GATK 3.7 is here! Be sure to read the Version Highlights and optionally the full Release Notes.
Register now for the upcoming GATK Best Practices workshop, Feb 20-22 in Leuven, Belgium. Open to all comers! More info and signup at http://bit.ly/2i4mGxz

read filter for FLAG 0x2 in BAM file

wkretzschwkretzsch Member Posts: 6

Hi,
I would like to perform base quality score recalibration on only the reads that have the "properly aligned" bit (0x2) set in the FLAG column of the SAM format. Ideally, I would like to use the --read_filter argument. Below is some code that does this to my satisfaction with the PrintReads walker of GATK 2 lite. However, GATK 2 lite does not support base quality score recalibration table creation. Is there any way someone could add the code to the GATK 2 full version?

I am not sure why, but the code seems to only work with the System.out.println() line.

Thanks,
Winni

/*

  • code written by Kiran Garimella
    */

package org.broadinstitute.sting.gatk.filters;

import net.sf.samtools.SAMRecord;

public class ProperPairFilter extends ReadFilter {
@Override
public boolean filterOut(SAMRecord samRecord) {
System.out.println(samRecord.getProperPairFlag());
return !samRecord.getProperPairFlag();
}
}

Tagged:

Best Answer

Answers

Sign In or Register to comment.