Skip to content

Commit

Permalink
Update VariantContextConverter to replace VCF empty character with an…
Browse files Browse the repository at this point in the history
… empty string and remove this from VariantFactoryImpl
  • Loading branch information
julesjacobsen committed Jan 18, 2024
1 parent 7ffa16d commit 977133f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public GenomicVariant convertToVariant(@Nonnull VariantContext variantContext, @
logger.debug("Unknown contig for {} unable to convert to variant", variantContext);
return null;
}
String id = variantContext.getID();
String id = variantContext.hasID() ? variantContext.getID() : "";
int start = variantContext.getStart();
String ref = getBaseString(variantContext.getReference().getBases());
// Symbolic variants are 'symbolic' in that they have no reported bases and/or contain non-base characters '<>[].'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ private VariantEvaluation.Builder createVariantBuilder(VariantContext variantCon
.genomeAssembly(genomeAssembly)
.variantContext(variantContext)
.altAlleleId(altAlleleId)
.id((".".equals(variantContext.getID())) ? "" : variantContext.getID())
.sampleGenotypes(sampleGenotypes)
//quality is the only value from the VCF file directly required for analysis
.quality(variantContext.getPhredScaledQual());
Expand Down

0 comments on commit 977133f

Please sign in to comment.