Refactored the VCF codec classes to minimize code duplication (which happened during the VCF3/4 split). Now, both codecs extend the AbstractVCFCodec class and all shared functionality exists there. Only methods that differ between the various codecs (e.g. because FILTER strings are encoded differently) are defined in the actual codecs. While I was in there, I put in checks for invalid empty inputs in the ID, FILTER, and INFO fields.
git-svn-id: file:///humgen/gsa-scr1/gsa-engineering/svn_contents/trunk@5917 348d0f76-0448-11de-a6fe-93d51630548a
This commit is contained in:
parent
81d9808eea
commit
c7fe062cb7
|
|
@ -31,9 +31,9 @@ import net.sf.samtools.util.StringUtil;
|
|||
import org.apache.commons.jexl2.*;
|
||||
import org.broad.tribble.util.popgen.HardyWeinbergCalculation;
|
||||
import org.broad.tribble.util.variantcontext.*;
|
||||
import org.broad.tribble.vcf.AbstractVCFCodec;
|
||||
import org.broadinstitute.sting.gatk.walkers.phasing.ReadBackedPhasingWalker;
|
||||
import org.broadinstitute.sting.utils.*;
|
||||
import org.broad.tribble.vcf.VCFCodecUtils;
|
||||
import org.broad.tribble.vcf.VCFConstants;
|
||||
import org.broadinstitute.sting.utils.exceptions.ReviewedStingException;
|
||||
import org.broadinstitute.sting.utils.exceptions.UserException;
|
||||
|
|
@ -566,7 +566,7 @@ public class VariantContextUtils {
|
|||
|
||||
VariantContext merged = new VariantContext(name, loc.getContig(), loc.getStart(), loc.getStop(), alleles, genotypes, negLog10PError, filters, (mergeInfoWithMaxAC ? maxACAttributes : attributes) );
|
||||
// Trim the padded bases of all alleles if necessary
|
||||
merged = VCFCodecUtils.createVariantContextWithTrimmedAlleles(merged);
|
||||
merged = AbstractVCFCodec.createVariantContextWithTrimmedAlleles(merged);
|
||||
|
||||
if ( printMessages && remapped ) System.out.printf("Remapped => %s%n", merged);
|
||||
return merged;
|
||||
|
|
|
|||
Loading…
Reference in New Issue