Updating the recalibrator to use non-depricated getPileup() method. Adding documentation to AnalyzeAnnotations so that the walker isn't marked as unclean at compile time.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2688 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
c231547204
commit
0345d9f6a5
|
|
@ -47,7 +47,7 @@ import net.sf.samtools.SAMRecord;
|
|||
/**
|
||||
* This walker is designed to work as the first pass in a two-pass processing step.
|
||||
* It does a by-locus traversal operating only at sites that are not in dbSNP.
|
||||
* We assume that all reference mismatches we see are therefore errors and indicitive of poor base quality.
|
||||
* We assume that all reference mismatches we see are therefore errors and indicative of poor base quality.
|
||||
* This walker generates tables based on various user-specified covariates (such as read group, reported quality score, cycle, and dinucleotide)
|
||||
* Since there is a large amount of data one can then calculate an empirical probability of error
|
||||
* given the particular covariates seen at this site, where p(error) = num mismatches / num observations
|
||||
|
|
@ -238,7 +238,7 @@ public class CovariateCounterWalker extends LocusWalker<Integer, PrintStream> {
|
|||
}
|
||||
|
||||
// Only use data from non-dbsnp sites
|
||||
// Assume every mismatch at a non-dbsnp site is indicitive of poor quality
|
||||
// Assume every mismatch at a non-dbsnp site is indicative of poor quality
|
||||
if( !isSNP && ( ++numUnprocessed >= PROCESS_EVERY_NTH_LOCUS ) ) {
|
||||
numUnprocessed = 0; // Reset the counter because we are processing this very locus
|
||||
|
||||
|
|
@ -248,7 +248,7 @@ public class CovariateCounterWalker extends LocusWalker<Integer, PrintStream> {
|
|||
byte[] bases;
|
||||
|
||||
// For each read at this locus
|
||||
for( PileupElement p : context.getPileup() ) {
|
||||
for( PileupElement p : context.getBasePileup() ) {
|
||||
read = p.getRead();
|
||||
offset = p.getOffset();
|
||||
|
||||
|
|
@ -305,7 +305,7 @@ public class CovariateCounterWalker extends LocusWalker<Integer, PrintStream> {
|
|||
* @param ref The reference base
|
||||
*/
|
||||
private static void updateMismatchCounts(final Pair<Long, Long> counts, final AlignmentContext context, final char ref) {
|
||||
for( PileupElement p : context.getPileup() ) {
|
||||
for( PileupElement p : context.getBasePileup() ) {
|
||||
final char readChar = (char)(p.getBase());
|
||||
final int readCharBaseIndex = BaseUtils.simpleBaseToBaseIndex(readChar);
|
||||
final int refCharBaseIndex = BaseUtils.simpleBaseToBaseIndex(ref);
|
||||
|
|
|
|||
|
|
@ -36,9 +36,11 @@ import java.io.IOException;
|
|||
*/
|
||||
|
||||
/**
|
||||
* Created by IntelliJ IDEA.
|
||||
* User: rpoplin
|
||||
* Date: Jan 15, 2010
|
||||
* Takes variant calls as .vcf files and creates plots of truth metrics as a function of the various annotations found in the INFO field.
|
||||
*
|
||||
* @author rpoplin
|
||||
* @since Jan 15, 2010
|
||||
* @help.summary Takes variant calls as .vcf files and creates plots of truth metrics as a function of the various annotations found in the INFO field.
|
||||
*/
|
||||
|
||||
public class AnalyzeAnnotationsWalker extends RodWalker<Integer, Integer> {
|
||||
|
|
@ -56,7 +58,7 @@ public class AnalyzeAnnotationsWalker extends RodWalker<Integer, Integer> {
|
|||
private int MIN_VARIANTS_PER_BIN = 1000;
|
||||
@Argument(fullName = "max_variants_per_bin", shortName = "maxBinSize", doc = "The maximum number of variants in a bin.", required = false)
|
||||
private int MAX_VARIANTS_PER_BIN = 20000;
|
||||
@Argument(fullName = "sampleName", shortName = "sampleName", doc = "Only process variants for this sample.", required = false)
|
||||
@Argument(fullName = "sampleName", shortName = "sampleName", doc = "If supplied, only process variants found in this sample.", required = false)
|
||||
private String SAMPLE_NAME = null;
|
||||
|
||||
|
||||
|
|
@ -71,6 +73,9 @@ public class AnalyzeAnnotationsWalker extends RodWalker<Integer, Integer> {
|
|||
//
|
||||
//---------------------------------------------------------------------------------------------------------------
|
||||
|
||||
/**
|
||||
* Create the output directory and setup the path variables
|
||||
*/
|
||||
public void initialize() {
|
||||
|
||||
// create the output directory where all the data tables and plots will go
|
||||
|
|
|
|||
Loading…
Reference in New Issue