Noted in comment that using a single sample in MergePhasedSegregatingAlternateAllelesVCFWriter does NOT update any of the INFO fields, though this could be changed in the future...
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@4604 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
8439f0aa61
commit
639ecdc931
|
|
@ -818,9 +818,6 @@ public class VariantContextUtils {
|
||||||
|
|
||||||
VariantContext mergedVc = new VariantContext(mergedName, vc1.getChr(), vc1.getStart(), vc2.getEnd(), mergeData.getAllMergedAlleles(), mergedGenotypes, mergedNegLog10PError, mergedFilters, mergedAttribs);
|
VariantContext mergedVc = new VariantContext(mergedName, vc1.getChr(), vc1.getStart(), vc2.getEnd(), mergeData.getAllMergedAlleles(), mergedGenotypes, mergedNegLog10PError, mergedFilters, mergedAttribs);
|
||||||
|
|
||||||
/* Calculate VCFConstants.ALLELE_NUMBER_KEY, VCFConstants.ALLELE_COUNT_KEY, VCFConstants.ALLELE_FREQUENCY_KEY from scratch
|
|
||||||
[though technically they should already be consistent with each of vc1 and vc2's respective alleles]:
|
|
||||||
*/
|
|
||||||
mergedAttribs = new HashMap<String, Object>(mergedVc.getAttributes());
|
mergedAttribs = new HashMap<String, Object>(mergedVc.getAttributes());
|
||||||
VariantContextUtils.calculateChromosomeCounts(mergedVc, mergedAttribs, true);
|
VariantContextUtils.calculateChromosomeCounts(mergedVc, mergedAttribs, true);
|
||||||
mergedVc = VariantContext.modifyAttributes(mergedVc, mergedAttribs);
|
mergedVc = VariantContext.modifyAttributes(mergedVc, mergedAttribs);
|
||||||
|
|
|
||||||
|
|
@ -107,7 +107,7 @@ public class MergePhasedSegregatingAlternateAllelesVCFWriter implements VCFWrite
|
||||||
public void add(VariantContext vc, byte refBase) {
|
public void add(VariantContext vc, byte refBase) {
|
||||||
if (useSingleSample != null) { // only want to output context for one sample
|
if (useSingleSample != null) { // only want to output context for one sample
|
||||||
Genotype sampGt = vc.getGenotype(useSingleSample);
|
Genotype sampGt = vc.getGenotype(useSingleSample);
|
||||||
if (sampGt != null)
|
if (sampGt != null) // TODO: subContextFromGenotypes() does not handle any INFO fields [AB, HaplotypeScore, MQ, etc.]. Note that even SelectVariants.subsetRecord() only handles AC,AN,AF, and DP!
|
||||||
vc = vc.subContextFromGenotypes(sampGt);
|
vc = vc.subContextFromGenotypes(sampGt);
|
||||||
else // asked for a sample that this vc does not contain, so ignore this vc:
|
else // asked for a sample that this vc does not contain, so ignore this vc:
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue