Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin-ebi committed Feb 26, 2024
1 parent 4bbf206 commit ecefe15
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ protected List<Variant> getVariants(Document deprecatedVariant) {
Document inactiveEntity = inactiveObjects.iterator().next();
String contig = inactiveEntity.getString(VariantMongoAggregationReader.CONTIG_FIELD);
long start = inactiveEntity.getLong(VariantMongoAggregationReader.START_FIELD);
// Since we only need evidence that at least one submitted variant agrees with the deprecated RS,
// we just return one variant record per RS
Collection<Document> inactiveEntitySubmittedVariant = (Collection<Document>) submittedVariantOperations
.iterator().next().get("inactiveObjects");
Document submittedVariant = inactiveEntitySubmittedVariant.iterator().next();
String reference = submittedVariant.getString("ref");
String alternate = submittedVariant.getString("alt");

// Since we only need evidence that at least one submitted variant agrees
// with the deprecated RS in locus, we just return one variant record per RS
Variant variantToReturn = new Variant(contig, start,
start + Math.max(reference.length(), alternate.length()) - 1,
reference, alternate);
Expand Down

0 comments on commit ecefe15

Please sign in to comment.