elimuinformatics/vcf2fhir

query liftover

rhdolin opened this issue · 2 comments

Use case: If, for instance, a query comes in with Build37 ranges, but the VCF in question is based on Build38, then translate the query into Build38 ranges and continue to perform the query.

From HL7 $find-subject-variants: [where a server is storing variants aligned to a build that differs from the build implied by the query range] it will be necessary for the server to lift over the query region into corresponding regions in other builds. For example, a query for variants in NC_000001.11:145507556-145513536 (build 38 range) will also need to query for variants in NC_000001.10:145921556-145927537 (build 37 range) in order to gather variants expressed against build 38 and build 37, respectively...In the (very uncommon) case of a failed lift over, a server should widen the query region as necessary in order to have a successful lift over. For example, the widened build 38 range NC_000001.11:145923285-145923306 will successfully translate into the build 37 range NC_000001.10:145511787-145511807.

@rhdolin, I have been working on this issue but I'm not sure whether my approach is correct or not.
Let's say the build passed by the user is '37', but the build of the file is '38'. In this case, we will change the value of the build from '37' to '38'. The 'Gene Reference Sequence' values for both the builds are different which will cause the test cases to fail. To resolve this failure, we need to update the test cases with correct 'Gene Reference Sequence' values in the output file.
Is my approach correct or I'm making a mistake in understanding the issue?

@Rohan-cod I think we should remove this issue - it was conceived based on a different workflow (shown here), where you have a server storing VCF files and VCF file metadata (including the VCF's build), and where the server receives a query containing reference sequences in a different build. But in our case, we assume that the conversion region is the same build as the VCF, so there's no way to know when a liftOver is required.
Sorry for the confusion.