Adding docs to yet more walkers
This commit is contained in:
parent
fadcbf68fd
commit
b3b5d608ca
|
|
@ -40,18 +40,48 @@ import java.util.List;
|
|||
|
||||
|
||||
/**
|
||||
* 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(s). Additionally,
|
||||
* allows for a "snpmask" ROD to set overlapping bases to 'N'.
|
||||
* Generates an alternative reference sequence over the specified interval.
|
||||
*
|
||||
* <p>
|
||||
* Given variant ROD tracks, 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'.
|
||||
*
|
||||
* <h2>Input</h2>
|
||||
* <p>
|
||||
* The reference, requested intervals, and any number of variant rod files.
|
||||
* </p>
|
||||
*
|
||||
* <h2>Output</h2>
|
||||
* <p>
|
||||
* A fasta file representing the requested intervals.
|
||||
* </p>
|
||||
*
|
||||
* <h2>Examples</h2>
|
||||
* <pre>
|
||||
* java -Xmx2g -jar GenomeAnalysisTK.jar \
|
||||
* -R ref.fasta \
|
||||
* -T FastaAlternateReferenceMaker \
|
||||
* -o output.fasta \
|
||||
* -L input.intervals \
|
||||
* --variant input.vcf \
|
||||
* [--snpmask mask.vcf]
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@WalkerName("FastaAlternateReferenceMaker")
|
||||
@Reference(window=@Window(start=-1,stop=50))
|
||||
@Requires(value={DataSource.REFERENCE})
|
||||
public class FastaAlternateReferenceWalker extends FastaReferenceWalker {
|
||||
|
||||
/**
|
||||
* Variants from these input files are used by this tool to construct an alternate reference.
|
||||
*/
|
||||
@Input(fullName = "variant", shortName = "V", doc="variants to model", required=false)
|
||||
public List<RodBinding<VariantContext>> variants = Collections.emptyList();
|
||||
|
||||
/**
|
||||
* Snps from this file are used as a mask when constructing the alternate reference.
|
||||
*/
|
||||
@Input(fullName="snpmask", shortName = "snpmask", doc="SNP mask VCF file", required=false)
|
||||
public RodBinding<VariantContext> snpmask;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,14 +38,44 @@ import org.broadinstitute.sting.utils.collections.Pair;
|
|||
import java.io.PrintStream;
|
||||
|
||||
/**
|
||||
* Renders a new reference in FASTA format consisting of only those loci provided in the input data set. Has optional
|
||||
* features to control the output format.
|
||||
* Renders a new reference in FASTA format consisting of only those loci provided in the input data set.
|
||||
*
|
||||
* <p>
|
||||
* The output format can be partially controlled using the provided command-line arguments.
|
||||
*
|
||||
* <h2>Input</h2>
|
||||
* <p>
|
||||
* The reference and requested intervals.
|
||||
* </p>
|
||||
*
|
||||
* <h2>Output</h2>
|
||||
* <p>
|
||||
* A fasta file representing the requested intervals.
|
||||
* </p>
|
||||
*
|
||||
* <h2>Examples</h2>
|
||||
* <pre>
|
||||
* java -Xmx2g -jar GenomeAnalysisTK.jar \
|
||||
* -R ref.fasta \
|
||||
* -T FastaReference \
|
||||
* -o output.fasta \
|
||||
* -L input.intervals
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@WalkerName("FastaReferenceMaker")
|
||||
public class FastaReferenceWalker extends RefWalker<Pair<GenomeLoc, String>, GenomeLoc> {
|
||||
|
||||
@Output PrintStream out;
|
||||
@Argument(fullName="lineWidth", shortName="lw", doc="Maximum length of sequence to write per line", required=false) public int fastaLineWidth=60;
|
||||
@Argument(fullName="rawOnelineSeq", shortName="raw", doc="Print sequences with no FASTA header lines, one line per interval (i.e. lineWidth = infinity) - CAUTION: adjacent intervals will automatically be merged", required=false) public boolean fastaRawSeqs=false;
|
||||
|
||||
@Argument(fullName="lineWidth", shortName="lw", doc="Maximum length of sequence to write per line", required=false)
|
||||
public int fastaLineWidth=60;
|
||||
|
||||
/**
|
||||
* Please note that when using this argument adjacent intervals will automatically be merged.
|
||||
*/
|
||||
@Argument(fullName="rawOnelineSeq", shortName="raw", doc="Print sequences with no FASTA header lines, one line per interval (i.e. lineWidth = infinity)", required=false)
|
||||
public boolean fastaRawSeqs=false;
|
||||
|
||||
protected FastaSequence fasta;
|
||||
|
||||
|
|
|
|||
|
|
@ -53,6 +53,30 @@ import java.util.*;
|
|||
|
||||
/**
|
||||
* Converts variants from other file formats to VCF format.
|
||||
*
|
||||
* <p>
|
||||
* Note that there must be a Tribble feature/codec for the file format as well as an adaptor.
|
||||
*
|
||||
* <h2>Input</h2>
|
||||
* <p>
|
||||
* A variant file to filter.
|
||||
* </p>
|
||||
*
|
||||
* <h2>Output</h2>
|
||||
* <p>
|
||||
* A VCF file.
|
||||
* </p>
|
||||
*
|
||||
* <h2>Examples</h2>
|
||||
* <pre>
|
||||
* java -Xmx2g -jar GenomeAnalysisTK.jar \
|
||||
* -R ref.fasta \
|
||||
* -T VariantsToVCF \
|
||||
* -o output.vcf \
|
||||
* --variant:RawHapMap input.hapmap \
|
||||
* --dbsnp dbsnp.vcf
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@Reference(window=@Window(start=-40,stop=40))
|
||||
public class VariantsToVCF extends RodWalker<Integer, Integer> {
|
||||
|
|
@ -61,15 +85,24 @@ public class VariantsToVCF extends RodWalker<Integer, Integer> {
|
|||
protected VCFWriter baseWriter = null;
|
||||
private SortingVCFWriter vcfwriter; // needed because hapmap/dbsnp indel records move
|
||||
|
||||
/**
|
||||
* Variants from this input file are used by this tool as input.
|
||||
*/
|
||||
@Input(fullName="variant", shortName = "V", doc="Input variant file", required=true)
|
||||
public RodBinding<Feature> variants;
|
||||
|
||||
@ArgumentCollection
|
||||
protected DbsnpArgumentCollection dbsnp = new DbsnpArgumentCollection();
|
||||
|
||||
@Argument(fullName="sample", shortName="sample", doc="The sample name represented by the variant rod (for data like GELI with genotypes)", required=false)
|
||||
/**
|
||||
* This argument is used for data (like GELI) with genotypes but no sample names encoded within.
|
||||
*/
|
||||
@Argument(fullName="sample", shortName="sample", doc="The sample name represented by the variant rod", required=false)
|
||||
protected String sampleName = null;
|
||||
|
||||
/**
|
||||
* This argument is useful for fixing input VCFs with bad reference bases (the output will be a fixed version of the VCF).
|
||||
*/
|
||||
@Argument(fullName="fixRef", shortName="fixRef", doc="Fix common reference base in case there's an indel without padding", required=false)
|
||||
protected boolean fixReferenceBase = false;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue