Is there any way to preserve the metadata in the query GRanges object when using locateVariants(query, subject, AllVariants()) from VariantAnnotation?
Or is it possible to add the query metadata to the resulting GRanges?
When calculating overlaps between two GRanges object I usually use findOverlaps() so that I can easily access and combine the metadata for both objects, but I don't understand how to achieve the same goal when using locateVariants().
From the documentation:
query: A Ranges, GRanges or VCF object containing the variants. Metadata columns are allowed but ignored. [...] asHits: A logical indicating if the results should be returned as a Hits object. Not applicable when region is AllVariants or IntergenicVariants.
Thanks!

Thanks Valerie, it works perfectly - not sure how I missed that column in the results object!