Added docs while I was reading through the code to understand it

This commit is contained in:
Eric Banks 2011-07-18 12:25:54 -04:00
parent d8517a000a
commit bc8b5da698
2 changed files with 36 additions and 13 deletions

View File

@ -149,7 +149,7 @@ public class CombineVariants extends RodWalker<Integer, Integer> {
// get all of the vcf rods at this locus // get all of the vcf rods at this locus
// Need to provide reference bases to simpleMerge starting at current locus // Need to provide reference bases to simpleMerge starting at current locus
Collection<VariantContext> vcs = tracker.getAllVariantContexts(ref, null,context.getLocation(), true, false); Collection<VariantContext> vcs = tracker.getAllVariantContexts(ref, null, context.getLocation(), true, false);
if ( sitesOnlyVCF ) { if ( sitesOnlyVCF ) {
vcs = VariantContextUtils.sitesOnlyVariantContexts(vcs); vcs = VariantContextUtils.sitesOnlyVariantContexts(vcs);

View File

@ -289,8 +289,8 @@ public class VariantContextUtils {
/** /**
* Returns a newly allocated VC that is the same as VC, but without genotypes * Returns a newly allocated VC that is the same as VC, but without genotypes
* @param vc * @param vc variant context
* @return * @return new VC without genotypes
*/ */
@Requires("vc != null") @Requires("vc != null")
@Ensures("result != null") @Ensures("result != null")
@ -303,8 +303,8 @@ public class VariantContextUtils {
/** /**
* Returns a newly allocated list of VC, where each VC is the same as the input VCs, but without genotypes * Returns a newly allocated list of VC, where each VC is the same as the input VCs, but without genotypes
* @param vcs * @param vcs collection of VCs
* @return * @return new VCs without genotypes
*/ */
@Requires("vcs != null") @Requires("vcs != null")
@Ensures("result != null") @Ensures("result != null")
@ -362,9 +362,9 @@ public class VariantContextUtils {
* information per genotype. The master merge will add the PQ information from each genotype record, where * information per genotype. The master merge will add the PQ information from each genotype record, where
* appropriate, to the master VC. * appropriate, to the master VC.
* *
* @param unsortedVCs * @param unsortedVCs collection of VCs
* @param masterName * @param masterName name of master VC
* @return * @return master-merged VC
*/ */
public static VariantContext masterMerge(Collection<VariantContext> unsortedVCs, String masterName) { public static VariantContext masterMerge(Collection<VariantContext> unsortedVCs, String masterName) {
VariantContext master = findMaster(unsortedVCs, masterName); VariantContext master = findMaster(unsortedVCs, masterName);
@ -435,11 +435,15 @@ public class VariantContextUtils {
* If uniqifySamples is true, the priority order is ignored and names are created by concatenating the VC name with * If uniqifySamples is true, the priority order is ignored and names are created by concatenating the VC name with
* the sample name * the sample name
* *
* @param unsortedVCs * @param genomeLocParser loc parser
* @param priorityListOfVCs * @param unsortedVCs collection of unsorted VCs
* @param filteredRecordMergeType * @param priorityListOfVCs priority list detailing the order in which we should grab the VCs
* @param genotypeMergeOptions * @param filteredRecordMergeType merge type for filtered records
* @return * @param genotypeMergeOptions merge option for genotypes
* @param annotateOrigin should we annotate the set it came from?
* @param printMessages should we print messages?
* @param inputRefBase the ref base
* @return new VariantContext
*/ */
public static VariantContext simpleMerge(GenomeLocParser genomeLocParser, Collection<VariantContext> unsortedVCs, List<String> priorityListOfVCs, public static VariantContext simpleMerge(GenomeLocParser genomeLocParser, Collection<VariantContext> unsortedVCs, List<String> priorityListOfVCs,
FilteredRecordMergeType filteredRecordMergeType, GenotypeMergeType genotypeMergeOptions, FilteredRecordMergeType filteredRecordMergeType, GenotypeMergeType genotypeMergeOptions,
@ -448,6 +452,24 @@ public class VariantContextUtils {
return simpleMerge(genomeLocParser, unsortedVCs, priorityListOfVCs, filteredRecordMergeType, genotypeMergeOptions, annotateOrigin, printMessages, inputRefBase, "set", false, false); return simpleMerge(genomeLocParser, unsortedVCs, priorityListOfVCs, filteredRecordMergeType, genotypeMergeOptions, annotateOrigin, printMessages, inputRefBase, "set", false, false);
} }
/**
* Merges VariantContexts into a single hybrid. Takes genotypes for common samples in priority order, if provided.
* If uniqifySamples is true, the priority order is ignored and names are created by concatenating the VC name with
* the sample name
*
* @param genomeLocParser loc parser
* @param unsortedVCs collection of unsorted VCs
* @param priorityListOfVCs priority list detailing the order in which we should grab the VCs
* @param filteredRecordMergeType merge type for filtered records
* @param genotypeMergeOptions merge option for genotypes
* @param annotateOrigin should we annotate the set it came from?
* @param printMessages should we print messages?
* @param inputRefBase the ref base
* @param setKey the key name of the set
* @param filteredAreUncalled are filtered records uncalled?
* @param mergeInfoWithMaxAC should we merge in info from the VC with maximum allele count?
* @return new VariantContext
*/
public static VariantContext simpleMerge(GenomeLocParser genomeLocParser, Collection<VariantContext> unsortedVCs, List<String> priorityListOfVCs, public static VariantContext simpleMerge(GenomeLocParser genomeLocParser, Collection<VariantContext> unsortedVCs, List<String> priorityListOfVCs,
FilteredRecordMergeType filteredRecordMergeType, GenotypeMergeType genotypeMergeOptions, FilteredRecordMergeType filteredRecordMergeType, GenotypeMergeType genotypeMergeOptions,
boolean annotateOrigin, boolean printMessages, byte inputRefBase, String setKey, boolean annotateOrigin, boolean printMessages, byte inputRefBase, String setKey,
@ -834,6 +856,7 @@ public class VariantContextUtils {
/** /**
* create a genome location, given a variant context * create a genome location, given a variant context
* @param genomeLocParser parser
* @param vc the variant context * @param vc the variant context
* @return the genomeLoc * @return the genomeLoc
*/ */