Completed my documentation responsibilities - based on Mark's reasonable assignment and not the one Matt made up while on Meth.

git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@2342 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
ebanks 2009-12-13 04:13:30 +00:00
parent bd2a46ab4c
commit 45199136f0
13 changed files with 43 additions and 22 deletions

View File

@ -9,6 +9,9 @@ import org.broadinstitute.sting.utils.pileup.*;
import java.util.*; import java.util.*;
/**
* Computes the coverage per sample.
*/
public class CoverageBySample extends LocusWalker<Integer, Integer> { public class CoverageBySample extends LocusWalker<Integer, Integer> {
private HashSet<String> sampleNames = new HashSet<String>(); private HashSet<String> sampleNames = new HashSet<String>();

View File

@ -15,7 +15,7 @@ import java.io.*;
/** /**
* VariantAnnotator annotates variants. * Annotates variant calls with context information. Users can specify which of the available annotations to use.
*/ */
//@Requires(value={DataSource.READS, DataSource.REFERENCE},referenceMetaData=@RMD(name="variant",type=VariationRod.class)) //@Requires(value={DataSource.READS, DataSource.REFERENCE},referenceMetaData=@RMD(name="variant",type=VariationRod.class))
@Allows(value={DataSource.READS, DataSource.REFERENCE}) @Allows(value={DataSource.READS, DataSource.REFERENCE})

View File

@ -13,7 +13,8 @@ import java.util.*;
/** /**
* CallsetConcordanceWalker finds the concordance between multiple VCF callsets (different tests are available). * Determines the concordance between multiple VCF call sets at each position.
* Users can specify which concordance tests should be run.
*/ */
@Requires(value={DataSource.REFERENCE}) @Requires(value={DataSource.REFERENCE})
@Reference(window=@Window(start=-20,stop=20)) @Reference(window=@Window(start=-20,stop=20))

View File

@ -5,15 +5,16 @@ import net.sf.samtools.SAMRecord;
import org.broadinstitute.sting.gatk.walkers.ReadWalker; import org.broadinstitute.sting.gatk.walkers.ReadWalker;
import org.broadinstitute.sting.utils.cmdLine.Argument; import org.broadinstitute.sting.utils.cmdLine.Argument;
/**
* Computes the coverage per every <granularity> bases on the reference, or on the subset of the reference
* specified by the intervals provided. Moving to the next contig on the reference will always restart the
* count anew, even if the count of bases in the last chunk on the previous contig did not reach specified <granularity>.
*/
public class CoarseCoverageWalker extends ReadWalker<Integer,Integer> { public class CoarseCoverageWalker extends ReadWalker<Integer,Integer> {
@Argument(fullName="granularity",shortName="G",doc="Will print numbers of reads per every <granularity> bases "+ @Argument(fullName="granularity", shortName="G", doc="Granularity", required=true)
"on the reference, or on the subset of the reference specified by Intervals (if given). Moving to the next "+
"contig on the reference will always restart the count anew, even if the count of bases in the last chunk on"+
" the previous contig did not reach specified <granularity>.",required=true)
public Integer N; public Integer N;
private int chunkStart = 1; // start of the current chunk we are counting reads for private int chunkStart = 1; // start of the current chunk we are counting reads for
private int contig = 0; // current contig we are on private int contig = 0; // current contig we are on
private int count = 0; // number of reads overlapping with the current chunk private int count = 0; // number of reads overlapping with the current chunk

View File

@ -9,6 +9,9 @@ import org.broadinstitute.sting.utils.genotype.Variation;
import java.util.Iterator; import java.util.Iterator;
/**
* Create a mask for use with the PickSequenomProbes walker.
*/
public class CreateSequenomMask extends RodWalker<Integer, Integer> { public class CreateSequenomMask extends RodWalker<Integer, Integer> {
public void initialize() {} public void initialize() {}

View File

@ -12,8 +12,9 @@ import java.io.*;
import java.util.Iterator; import java.util.Iterator;
/** /**
* Generates an alternative reference sequence over the specified interval. Given a variant ROD track (named "snpmask"), * Generates an alternative reference sequence over the specified interval. Given variant ROD tracks,
* it replaces the reference bases at variation sites with the bases supplied by the ROD. * it replaces the reference bases at variation sites with the bases supplied by the ROD(s). Additionally,
* allows for a "snpmask" ROD to set overlapping bases to 'N'.
*/ */
@WalkerName("FastaAlternateReferenceMaker") @WalkerName("FastaAlternateReferenceMaker")
@Requires(value={DataSource.REFERENCE}) @Requires(value={DataSource.REFERENCE})

View File

@ -44,6 +44,10 @@ import java.io.File;
import java.util.*; import java.util.*;
/**
* A variant caller which unifies the approaches of several disparate callers. Works for single-sample,
* multi-sample, and pooled data. The user can choose from several different incorporated calculation models.
*/
@Reference(window=@Window(start=-20,stop=20)) @Reference(window=@Window(start=-20,stop=20))
public class UnifiedGenotyper extends LocusWalker<Pair<VariationCall, List<Genotype>>, Integer> { public class UnifiedGenotyper extends LocusWalker<Pair<VariationCall, List<Genotype>>, Integer> {

View File

@ -24,8 +24,8 @@ import java.util.*;
*/ */
/** /**
* Copies reads from the input stream into the <code>outputBAM</code>, replacing those * Copies reads from the input stream into the outputBAM, replacing those
* reads which have been cleaned with their new clean copies. * reads which have been cleaned/realigned with their new clean copies.
*/ */
@Requires({DataSource.READS, DataSource.REFERENCE}) @Requires({DataSource.READS, DataSource.REFERENCE})
public class CleanedReadInjector extends ReadWalker<Integer,Integer> { public class CleanedReadInjector extends ReadWalker<Integer,Integer> {

View File

@ -10,11 +10,9 @@ import net.sf.samtools.AlignmentBlock;
import java.util.List; import java.util.List;
// A walker to determine intervals within which reads should be cleaned and realigned /**
// because they contain one or more indels (which possibly caused them not to align perfectly). * Emits intervals consisting of indels from the aligned reads.
// Note that the reduce step assumes that reductions occur in order (i.e. no hierarchical reductions), */
// although this can easily be changed if necessary.
@WalkerName("IndelIntervals") @WalkerName("IndelIntervals")
@Requires({DataSource.READS, DataSource.REFERENCE}) @Requires({DataSource.READS, DataSource.REFERENCE})
@ReadFilters({Platform454Filter.class, ZeroMappingQualityReadFilter.class}) @ReadFilters({Platform454Filter.class, ZeroMappingQualityReadFilter.class})
@ -48,6 +46,8 @@ public class IndelIntervalWalker extends ReadWalker<IndelIntervalWalker.Interval
return null; return null;
} }
// Note that the reduce step assumes that reductions occur in order (i.e. no hierarchical reductions),
// although this can easily be changed if necessary.
public Interval reduce(Interval value, Interval sum) { public Interval reduce(Interval value, Interval sum) {
// if there is no interval to the left, then this is the first one // if there is no interval to the left, then this is the first one
if ( sum == null ) if ( sum == null )

View File

@ -5,7 +5,6 @@ import org.broadinstitute.sting.gatk.refdata.*;
import org.broadinstitute.sting.gatk.walkers.LocusWindowWalker; import org.broadinstitute.sting.gatk.walkers.LocusWindowWalker;
import org.broadinstitute.sting.gatk.walkers.WalkerName; import org.broadinstitute.sting.gatk.walkers.WalkerName;
import org.broadinstitute.sting.gatk.walkers.ReadFilters; import org.broadinstitute.sting.gatk.walkers.ReadFilters;
import org.broadinstitute.sting.gatk.contexts.AlignmentContext;
import org.broadinstitute.sting.gatk.filters.Platform454Filter; import org.broadinstitute.sting.gatk.filters.Platform454Filter;
import org.broadinstitute.sting.gatk.filters.ZeroMappingQualityReadFilter; import org.broadinstitute.sting.gatk.filters.ZeroMappingQualityReadFilter;
import org.broadinstitute.sting.utils.cmdLine.Argument; import org.broadinstitute.sting.utils.cmdLine.Argument;
@ -16,6 +15,11 @@ import java.util.*;
import java.io.File; import java.io.File;
import java.io.FileWriter; import java.io.FileWriter;
/**
* Performs local realignment of reads based on misalignments due to the presence of indels.
* Unlike most mappers, this walker uses the full alignment context to determine whether an
* appropriate alternate reference (i.e. indel) exists and updates SAMRecords accordingly.
*/
@WalkerName("IntervalCleaner") @WalkerName("IntervalCleaner")
@ReadFilters({Platform454Filter.class, ZeroMappingQualityReadFilter.class}) @ReadFilters({Platform454Filter.class, ZeroMappingQualityReadFilter.class})
public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer> { public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer> {
@ -60,8 +64,6 @@ public class IntervalCleanerWalker extends LocusWindowWalker<Integer, Integer>
private TreeSet<ComparableSAMRecord> readsToWrite = null; private TreeSet<ComparableSAMRecord> readsToWrite = null;
private TreeSet<ComparableSAMRecord> nextSetOfReadsToWrite = null; private TreeSet<ComparableSAMRecord> nextSetOfReadsToWrite = null;
private boolean debugOn = false;
public void initialize() { public void initialize() {
if ( LOD_THRESHOLD < 0.0 ) if ( LOD_THRESHOLD < 0.0 )

View File

@ -25,7 +25,6 @@
package org.broadinstitute.sting.gatk.walkers.indels; package org.broadinstitute.sting.gatk.walkers.indels;
import net.sf.samtools.SAMRecord; import net.sf.samtools.SAMRecord;
import org.broadinstitute.sting.gatk.GenomeAnalysisEngine;
import org.broadinstitute.sting.gatk.filters.Platform454Filter; import org.broadinstitute.sting.gatk.filters.Platform454Filter;
import org.broadinstitute.sting.gatk.filters.ZeroMappingQualityReadFilter; import org.broadinstitute.sting.gatk.filters.ZeroMappingQualityReadFilter;
import org.broadinstitute.sting.gatk.walkers.*; import org.broadinstitute.sting.gatk.walkers.*;
@ -36,7 +35,8 @@ import java.util.*;
/** /**
* Merges intervals based on reads which overlap them. * Merges sets of intervals based on reads which overlap them; no two intervals in the final list
* will have a read that even partially spans them both. A maximum interval size is enforced though.
*/ */
@WalkerName("IntervalMerger") @WalkerName("IntervalMerger")
@Requires({DataSource.READS, DataSource.REFERENCE}) @Requires({DataSource.READS, DataSource.REFERENCE})

View File

@ -14,6 +14,9 @@ import org.broadinstitute.sting.utils.cmdLine.Argument;
import java.util.*; import java.util.*;
/**
* Emits intervals consisting of nearby loci with high mismatch rates.
*/
@WalkerName("MismatchIntervals") @WalkerName("MismatchIntervals")
@ReadFilters({Platform454Filter.class, ZeroMappingQualityReadFilter.class}) @ReadFilters({Platform454Filter.class, ZeroMappingQualityReadFilter.class})
public class MismatchIntervalWalker extends LocusWalker<Pair<GenomeLoc, Boolean>, Pair<LinkedList<Boolean>, GenomeLoc>> { public class MismatchIntervalWalker extends LocusWalker<Pair<GenomeLoc, Boolean>, Pair<LinkedList<Boolean>, GenomeLoc>> {

View File

@ -10,6 +10,9 @@ import org.broadinstitute.sting.utils.GenomeLocParser;
import org.broadinstitute.sting.utils.cmdLine.Argument; import org.broadinstitute.sting.utils.cmdLine.Argument;
import org.broadinstitute.sting.utils.genotype.Variation; import org.broadinstitute.sting.utils.genotype.Variation;
/**
* Given a ROD track SNP calls called "snps", emits intervals consisting of clustered SNPs.
*/
@WalkerName("SNPClusters") @WalkerName("SNPClusters")
@Requires(value={DataSource.REFERENCE},referenceMetaData={@RMD(name="snps",type= VariationRod.class)}) @Requires(value={DataSource.REFERENCE},referenceMetaData={@RMD(name="snps",type= VariationRod.class)})
public class SNPClusterWalker extends RefWalker<GenomeLoc, GenomeLoc> { public class SNPClusterWalker extends RefWalker<GenomeLoc, GenomeLoc> {