Skip to content

Commit

Permalink
Updated header writing
Browse files Browse the repository at this point in the history
  • Loading branch information
kjaisingh committed Dec 13, 2024
1 parent 726144d commit 0ab56eb
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,8 @@ protected void afterNthPass(int n) {}

@Override
public void onTraversalStart() {
final VCFHeader header = getHeaderForVariants();
header.addMetaDataLine(new VCFFormatHeaderLine(GATKSVVCFConstants.EV, 1, VCFHeaderLineType.String, "Classes of evidence supporting final genotype"));
vcfWriter = createVCFWriter(outputVcf);
vcfWriter.writeHeader(header);
vcfWriter.writeHeader(getHeaderForVariants());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ public class SVReviseOverlappingCnvCns extends MultiplePassVariantWalker {
@Override
public void onTraversalStart() {
vcfWriter = createVCFWriter(outputVcf);
final VCFHeader header = getHeaderForVariants();
header.addMetaDataLine(new VCFInfoHeaderLine(GATKSVVCFConstants.MULTI_CNV, 0, VCFHeaderLineType.Flag, "Variant is a multiallelic CNV"));
vcfWriter.writeHeader(header);
vcfWriter.writeHeader(getHeaderForVariants());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,20 +282,6 @@ private void processCnvs(final VariantContextBuilder builder, final VariantConte
}
}

private Map<String, Set<String>> getSupportForVariant(final VariantContext variant) {
Map<String, Set<String>> supportMap = new HashMap<>();
for (String sample : variant.getSampleNames()) {
Genotype genotype = variant.getGenotype(sample);
String supportStr = genotype.hasExtendedAttribute(GATKSVVCFConstants.EV) ? genotype.getExtendedAttribute(GATKSVVCFConstants.EV).toString() : "";
Set<String> supportSet = new HashSet<>();
if (!supportStr.isEmpty()) {
supportSet.addAll(Arrays.asList(supportStr.split(",")));
}
supportMap.put(sample, supportSet);
}
return supportMap;
}

private boolean isDelDup(final VariantContext variant) {
String svType = variant.getAttributeAsString(GATKSVVCFConstants.SVTYPE, "");
return svType.equals(GATKSVVCFConstants.SYMB_ALT_STRING_DEL) || svType.equals(GATKSVVCFConstants.SYMB_ALT_STRING_DUP);
Expand Down

0 comments on commit 0ab56eb

Please sign in to comment.