GoogleSearch
이 블로그 검색
[CookBook] BioC annotation package
라벨:
Informatics
이메일로 전송BlogThis!X에 공유Facebook에서 공유
작성
© 최광민 2011-04-06
제목
블로그 운영원칙
순서
- Using org.Hs.eg.db
- Using biomaRt
- Making xref db
# Using org.Hs.eg.db
columns(org.Hs.eg.db)
[1] "ENTREZID" "PFAM" "IPI" "PROSITE"
[5] "ACCNUM" "ALIAS" "CHR" "CHRLOC"
[9] "CHRLOCEND" "ENZYME" "MAP" "PATH"
[13] "PMID" "REFSEQ" "SYMBOL" "UNIGENE"
[17] "ENSEMBL" "ENSEMBLPROT" "ENSEMBLTRANS" "GENENAME"
[21] "UNIPROT" "GO" "EVIDENCE" "ONTOLOGY"
[25] "GOALL" "EVIDENCEALL" "ONTOLOGYALL" "OMIM"
[29] "UCSCKG"
select(org.Hs.eg.db, keys="AB371497", keytype="ACCNUM", columns=c("PFAM", "SYMBOL"))
ACCNUM PFAM SYMBOL
1 AB371497 <NA> USP30-AS1
select(org.Hs.eg.db, keys= "SNX13",keytype = "SYMBOL", columns=c("REFSEQ", "ENSEMBL", "PFAM", "SYMBOL"))
SYMBOL REFSEQ ENSEMBL PFAM
1 SNX13 NM_015132 ENSG00000071189 PF02194
2 SNX13 NM_015132 ENSG00000071189 PF00615
3 SNX13 NM_015132 ENSG00000071189 PF08628
4 SNX13 NM_015132 ENSG00000071189 PF00787
5 SNX13 NP_055947 ENSG00000071189 PF02194
6 SNX13 NP_055947 ENSG00000071189 PF00615
7 SNX13 NP_055947 ENSG00000071189 PF08628
8 SNX13 NP_055947 ENSG00000071189 PF00787
9 SNX13 XM_005249672 ENSG00000071189 PF02194
10 SNX13 XM_005249672 ENSG00000071189 PF00615
11 SNX13 XM_005249672 ENSG00000071189 PF08628
12 SNX13 XM_005249672 ENSG00000071189 PF00787
# Using biomaRt
library("biomaRt")
###
### gene start
###
ensembl <- useMart("ensembl", dataset="hsapiens_gene_ensembl")
getBM(attributes=c('refseq_mrna','chromosome_name','start_position','end_position','strand'),
filters = 'refseq_mrna', values = 'NM_033453', mart = ensembl)
refseq_mrna chromosome_name start_position
1 NM_033453 20 3189514
end_position strand
1 3204516 1
###
### transcript_start
###
library("biomaRt")
ensembl <- useMart("ensembl", dataset="hsapiens_gene_ensembl")
getBM(attributes=c('refseq_mrna','chromosome_name','transcript_start_position','transcript_end_position','strand'),
filters = 'refseq_mrna', values = 'NM_033453', mart = ensembl)
refseq_mrna chromosome_name transcript_start
1 NM_033453 20 3190006
transcript_end strand
1 3204516 1
library("biomaRt")
ensembl <- useMart("ensembl",dataset="hsapiens_gene_ensembl")
#ENST00000398344 is on chr22:24,313,554-24,316,773
getBM(attributes = c('chromosome_name',
'start_position',
'end_position',
'strand'
),
filters = 'ensembl_transcript_id',
values = 'ENST00000398344',
mart = ensembl)
chromosome_name start_position end_position strand
1 22 24313554 24322660 -1
# Make xref db
library(og.s.eg.db)
select( org.Hs.eg.db, keys=symbols, keytype="SYMBOL", column=c("SYMBOL", "REFSEQ") )
select( org.Hs.eg.db, keys=refseqs, keytype="REFSEQ", column=c("REFSEQ", "SYMBOL") )
library(biomaRt)
ensembl = useMart( "ensembl", dataset="hsapiens_gene_ensembl")
###-----------------------------------------------------------------------------
### gene start
###-----------------------------------------------------------------------------
geneCoord = getBM(attributes=c('hgnc_symbol', 'external_gene_id', 'chromosome_name','start_position','end_position','strand'), filters='hgnc_symbol', values=symbols, mart = ensembl)
geneCoord = geneCoord[ grep( "^[0-9]|^X|^Y", geneCoord$chromosome_name ), ]
###-----------------------------------------------------------------------------
### transcript_start
###----------------------------------------------------------------------------
txCoord = getBM(attributes=c('refseq_mrna', 'hgnc_symbol', 'chromosome_name','transcript_start','transcript_end','strand'), filters='refseq_mrna', values=refseqs, mart = ensembl)
txCoord = txCoord[ grep( "^[0-9]|^X|^Y", txCoord$chromosome_name ), ]
이메일로 전송BlogThis!X에 공유Facebook에서 공유
라벨:
Informatics
© 최광민 2011-04-06
제목
블로그 운영원칙
순서
- Using org.Hs.eg.db
- Using biomaRt
- Making xref db
Scientist. Husband. Daddy. --- TOLLE. LEGE
외부자료의 인용에 있어 대한민국 저작권법(28조)과 U.S. Copyright Act (17 USC. §107)에 정의된 "저작권물의 공정한 이용원칙 | the U.S. fair use doctrine" 을 따릅니다. 저작권(© 최광민)이 명시된 모든 글과 번역문들에 대해 (1) 복제-배포, (2) 임의수정 및 자의적 본문 발췌, (3) 무단배포를 위한 화면캡처를 금하며, (4) 인용 시 URL 주소 만을 사용할 수 있습니다. [후원 | 운영] [대문으로] [방명록] [옛 방명록] [티스토리 (백업)] [신시내티]
-