slowkow / proxysnps

:bookmark: Get SNP proxies from the 1000 Genomes Project.
MIT License
28 stars 9 forks source link

Selecting correct query info when multiple hits returned #3

Open mreppell opened 6 years ago

mreppell commented 6 years ago

In main function:

v <- myvariant::queryVariant(query)
if (v$total > 0) {
  chrom <- v$hits$dbsnp$chrom[1]
  pos <- v$hits$dbsnp$hg19$start[1]
}

query SNP 'rs6025' returns 4 results, the first of which is "NA" in all fields, and the third entry which is correct. Instead of selecting 'v$hits$dpsnp$chrom[1] it would probably be better to select first entry that is not "NA", because otherwise program is unable to return correct information.

slowkow commented 6 years ago

Thanks for reporting this issue! You're totally right.