Last active
April 16, 2016 15:40
-
-
Save mikelove/ada6951811b8b17b8bd99f0b99877416 to your computer and use it in GitHub Desktop.
getting GC content
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(Homo.sapiens) | |
library(TxDb.Hsapiens.UCSC.hg19.knownGene) | |
library(BSgenome.Hsapiens.UCSC.hg19) | |
txdb <- TxDb.Hsapiens.UCSC.hg19.knownGene | |
e <- exonsBy(txdb, "gene") | |
mapIds(Homo.sapiens, "AFTPH", "ENTREZID", "SYMBOL") | |
ee <- e[["54812"]] | |
dna <- getSeq(Hsapiens, ee) | |
mcols(ee)$gc <- letterFrequency(dna, "GC", as.prob=TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment