I just figure out the way to query UTR sequences from ensembl by biomart tool.
It is very simple compared with using bioperl to parse gbk files to extract UTR sequences.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | require(biomaRt) require(org.Hs.eg.db) ensembl = useMart("ensembl", dataset = "hsapiens_gene_ensembl") eg <- mappedkeys(org.Hs.egGO) utr <- getSequence(id=eg, type="entrezgene", seqType="3utr", mart=ensembl) outfile <- file("human-3utr.fa", "w") for (i in 1:nrow(utr)) { h = paste(c(">", utr[i,2]), collapse="") writeLines(h, outfile) writeLines(utr[i,1], outfile) } close(outfile) |

挑个错,应是"compared with"哟~
Reply
ygc
Reply:
March 3rd, 2011 at 10:21 am
那我改过来
thanks!
Reply