Question: Physical position to gene positions
0
3 months ago by
jebreen200 wrote:

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

modified 3 months ago by James W. MacDonald49k • written 3 months ago by jebreen200

You need to better define what you mean by 'map these markers to gene position', which could mean any number of things. For example

1. SNPs that overlap exons
2. SNPs that overlap any part of a gene
3. Genes that are nearest to the SNP

So what exactly are you after?

Thanks for your repaly, I meant

1. Genes that are nearest to the SNP
Answer: Physical position to gene positions
0
3 months ago by
United States
James W. MacDonald49k wrote:

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.

This will give me the gen positions in cM?

and what is TxDb.Hsapiens.UCSC.hg38.knownGene ? I do not get that reall.

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.

many Thanks, but not this is what I want,

maybe my question not clear, I have the genetic map and the physical positions of these markers, I want to find the gene position in cM for these markers.