Dear All,
I am a mathematician,
I work in SNPs data, I have the markers (A, B, H, A, ..., -, B, A, H) for p individuals, with its physical positions, I want to map these makers to gene position, how I can use that with R?
Regards
Dear All,
I am a mathematician,
I work in SNPs data, I have the markers (A, B, H, A, ..., -, B, A, H) for p individuals, with its physical positions, I want to map these makers to gene position, how I can use that with R?
Regards
Put the positions for your SNPs into a GRanges
object, generate a GRanges
for all the gene locations using, e.g., the TxDb.Hsapiens.UCSC.hg38.knownGene
package) and then use nearest
, or distanceToNearest
, depending on what you really want. This is somewhat automated in ChipPeakAnno, but isn't particularly difficult to do by hand using the GenomicRanges and GenomicFeatures packages, for which there are vignettes to help you get started.
No, centimorgans aren't unambiguous distances. The distances you (presumably) want are in nucleotides which aren't ambiguous.
As for what the TxDb package I mentioned is, I already told you what vignettes you need to read. You won't get anywhere with R or Bioc if you aren't willing to read documentation and learn for yourself, and the GenomicFeatures vignette is titled 'Making and utilizing TxDb objects', so let me reiterate. Read the vignettes for those two packages.
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
You need to better define what you mean by 'map these markers to gene position', which could mean any number of things. For example
So what exactly are you after?
Thanks for your repaly, I meant