使用pd.genomewidesnp.6为GenomeWideSNP_6做注释

代码如下:

> head(dat)
  Composite.Element.REF Call Confidence
1         SNP_A-2131660    2     0.0126
2         SNP_A-1967418    2     0.0029
3         SNP_A-1969580    2     0.0019
4         SNP_A-4263484    2     0.0043
5         SNP_A-1978185    0     0.0082
6         SNP_A-4264431    1     0.0088
> library(BiocInstaller)
Bioconductor version 2.13 (BiocInstaller 1.12.0), ?biocLite for help
> biocLite("pd.genomewidesnp.6")
> library(pd.genomewidesnp.6)
> con <- pd.genomewidesnp.6@getdb()
> dbListTables(con)
 [1] "featureSet"        "featureSetCNV"     "fragmentLength"    "fragmentLengthCNV" "pmfeature"         "pmfeatureCNV"     
 [7] "sequence"          "sequenceCNV"       "sqlite_stat1"      "table_info"       
> dbGetQuery(con, "select * from featureSet limit 3")[,1:10]
  fsetid    man_fsetid affy_snp_id dbsnp_rs_id chrom physical_pos strand cytoband allele_a allele_b
1      1 SNP_A-2131660          NA   rs2887286     1      1156131      0   p36.33        C        T
2      2 SNP_A-1967418          NA   rs1496555     1      2234251      0   p36.33        A        G
3      3 SNP_A-1969580          NA  rs41477744     1      2329564      0   p36.32        A        G
> dim(dat)
[1] 906600      3
> anno <- dbGetQuery(con, "select * from featureSet")
> dim(anno)
[1] 906600     13
> data <- cbind(dat, anno[match(dat[,1], anno[,2]),])
> dim(data)
[1] 906600     16
> miR146a <- data[grepl("miR146a", data[,"gene_assoc"], ignore.case=T), ]
> dim(miR146a)
[1] 49 16
> head(data[,1:13])
  Composite.Element.REF Call Confidence fsetid    man_fsetid affy_snp_id dbsnp_rs_id chrom physical_pos strand cytoband allele_a allele_b
1         SNP_A-2131660    2     0.0126      1 SNP_A-2131660          NA   rs2887286     1      1156131      0   p36.33        C        T
2         SNP_A-1967418    2     0.0029      2 SNP_A-1967418          NA   rs1496555     1      2234251      0   p36.33        A        G
3         SNP_A-1969580    2     0.0019      3 SNP_A-1969580          NA  rs41477744     1      2329564      0   p36.32        A        G
4         SNP_A-4263484    2     0.0043      4 SNP_A-4263484          NA   rs3890745     1      2553624      0   p36.32        C        T
5         SNP_A-1978185    0     0.0082      5 SNP_A-1978185          NA  rs10492936     1      2936870      1   p36.32        C        T
6         SNP_A-4264431    1     0.0088      6 SNP_A-4264431          NA  rs10489588     1      2951834      1   p36.32        C        T
> miR146a[miR146a$dbsnp_rs_id=="rs2910164",1:13]
       Composite.Element.REF Call Confidence fsetid    man_fsetid affy_snp_id dbsnp_rs_id chrom physical_pos strand cytoband allele_a allele_b
283011         SNP_A-2264525    0     0.0012 283011 SNP_A-2264525          NA   rs2910164     5    159912418      1      q34        C        G

发表评论

电子邮件地址不会被公开。 必填项已用*标注