Hi,
While mapping mutations to hg19 known genes using locateVariants, several coordinates should be around KRAS (GeneID: 3845), but were not annotated. Am I missing something?
KRAS (uc001rgr.3) chr12 25386768 25403863 transcript variant b
KRAS (uc001rgq.1) chr12 25358180 25403854 transcript variant b
KRAS (uc001rgp.1) chr12 25358180 25403854 transcript variant a
> table1
CHR STR END STRAND
1 chr12 25360414 25360414 +
2 chr12 25378561 25378561 +
3 chr12 25378647 25378647 +
4 chr12 25380275 25380275 +
5 chr12 25398284 25398284 +
6 chr12 25398285 25398285 +
Codes:
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene
MutC_GR = GRanges(seqnames = table1[,1], ranges = IRanges(start=table1[,2],end=table1[,3]),strand = table1[,4])
loc_all <- locateVariants(MutC_GR, txdb, AllVariants())
loc_all_table <- as.data.frame(loc_all)
> loc_all_table
seqnames start end width strand LOCATION LOCSTART LOCEND QUERYID TXID CDSID GENEID PRECEDEID FOLLOWID
1 chr12 25360414 25360414 1 + intergenic NA NA 1 NA NA <NA> 11228, 8082 10012632....
2 chr12 25378561 25378561 1 + intergenic NA NA 2 NA NA <NA> 11228, 8082 144363, 4033
3 chr12 25378647 25378647 1 + intergenic NA NA 3 NA NA <NA> 11228, 8082 144363, 4033
4 chr12 25380275 25380275 1 + intergenic NA NA 4 NA NA <NA> 11228, 8082 144363, 4033
5 chr12 25398284 25398284 1 + promoter NA NA 5 45946 NA <NA>
6 chr12 25398284 25398284 1 + intergenic NA NA 5 NA NA <NA> 11228, 8082 144363, 4033
7 chr12 25398285 25398285 1 + promoter NA NA 6 45946 NA <NA>
8 chr12 25398285 25398285 1 + intergenic NA NA 6 NA NA <NA> 11228, 8082 144363, 4033
Thank you, Hervé Pagès. The ignore.strand=TRUE worked perfectly.
Glad it worked. And as you can see, it worked for Val too because she didn't set the strand of her variants, which is the right thing to do. In your case you needed to use
ignore.strand=TRUE
because you set the strand of your variants to +, but the KRAS gene is on the minus strand. So maybe it's fine thatlocateVariants()
is strand specific by default after all. It assumes that, unless the user has a good reason to do otherwise, the query will be unstranded (i.e. strand set to"*"
).Cheers,
H.