How can I find the location of a gene based on cytogenetic bands (e.g. 7q31.2)? Is there any package(s) that lets me convert the gene symbol to cytogenetic bands?
The biovizBase package has a GRanges of the hg19 cytogenetic bands, so you could use that. There is also a GRanges with gene symbols in that package which makes it super convenient. Let's say we want the cytoband for BRCA2:
> library(biovizBase)
> data(hg19IdeogramCyto)
> data(genesymbol)
> subsetByOverlaps(hg19IdeogramCyto, genesymbol["BRCA2",])
GRanges object with 1 range and 2 metadata columns:
seqnames ranges strand | name gieStain
<Rle> <IRanges> <Rle> | <factor> <factor>
[1] chr13 [32200000, 34000000] * | q13.1 gpos50
-------
seqinfo: 24 sequences from an unspecified genome; no seqlengths
So BRCA2 is in 13q13.1. Is that what you are after?
I forgot about the MAP column. You can get this directly without having to engage with any of that tidyverse nonsense <shakes cane at kids on lawn>.