#########################################
###chip-seq in plant
###kuangchen 2018.9.13
###Email:82101181029@caas.cn
#installation
source("https://bioconductor.org/biocLite.R")
biocLite("org.At.tair.db")
source("https://bioconductor.org/biocLite.R")
biocLite("TxDb.Athaliana.BioMart.plantsmart28")
library("ChIPseeker")
library("org.At.tair.db")
library("TxDb.Athaliana.BioMart.plantsmart28")
library("VennDiagram")
library("clusterProfiler")
#输入peak.bed文件
FHY1 <- readPeakFile("F:\\研究僧\\实验研究\\CHIP\\chip-plant\\GSM1400501_FHY1_FR1.bed")
FHY2 <- readPeakFile("F:\\研究僧\\实验研究\\CHIP\\chip-plant\\GSM1400502_FHY2_FR2.bed")
FHY3 <- readPeakFile("F:\\研究僧\\实验研究\\CHIP\\chip-plant\\GSM1400503_FHY3_FR3.bed")
print(FHY1)
print(FHY2)
print(FHY3)
FHY1_peak <- readPeakFile(FHY1[[4]])
FHY1_peak <-readPeakFile(FHY1[[4]])
FHY2_peak <-readPeakFile(FHY2[[4]])
FHY3_peak <-readPeakFile(FHY3[[4]])
#注释
FHY1_peakAnno <-annotatePeak(FHY1,tssRegion = c(-2500,2499),TxDb = "TxDb.Athaliana.BioMart.plantsmart28", annoDb = "org.At.tair.db")
FHY2_peakAnno <-annotatePeak(FHY2,tssRegion = c(-2500,2500),TxDb = "TxDb.Athaliana.BioMart.plantsmart28", annoDb = "org.At.tair.db")
FHY3_peakAnno <-annotatePeak(FHY3,tssRegion = c(-2500,2500),TxDb = "TxDb.Athaliana.BioMart.plantsmart28", annoDb = "org.At.tair.db")
covplot(FHY1, weightCol="V5")
covplot(FHY2, weightCol="V5")
covplot(FHY3, weightCol="V5")
在运行print(FHY1),显示文件如下:
> print(FHY1) GRanges object with 8423 ranges and 7 metadata columns:
         seqnames            ranges strand |        V4        V5        V6        V7        V8        V9
                        |      
     [1]     Chr3 14202686-14202943      * |       259       129      2340      3100     86.01         0
     [2]     Chr3 14200932-14201189      * |       259       129      2275      3100     83.62         0
     [3]     Chr2   3239786-3240043      * |       259       129      2225      3100     81.78         0
     [4]     Chr3 14199470-14200210      * |       742       183      5379      3100     79.19         0
     [5]     Chr2   3241105-3241362      * |       259       129      1925      3100     70.76         0
     ...      ...               ...    ... .       ...       ...       ...       ...       ...       ...
  [8419]     Chr4 10780103-10781397      * |      1296       307       436     51.34      3.04      0.76
  [8420]     Chr5   4464031-4465049      * |      1020       723       301     52.07      3.04      0.76
  [8421]     Chr4 14597219-14598374      * |      1157       345       512     54.17      3.04      0.77
  [8422]     Chr3     359985-361663      * |      1680      1058       596     50.08      3.04      0.78
  [8423]     Chr5 26250587-26251913      * |      1328       331       418     50.53      3.04      0.78
               V10
         
     [1]        86
     [2]      83.6
     [3]      81.8
     [4]      79.2
     [5]      70.8
     ...       ...
  [8419]         3
  [8420]         3
  [8421]         3
  [8422]         3
  [8423]         3
  -------
在运行FHY1_peak <-readPeakFile(FHY1[[4]])出现报错:如下:
> FHY1_peak <- readPeakFile(FHY1[[4]]) Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘getListElement’ for signature ‘"GRanges"’
在运行FHY1_peakAnno <-annotatePeak(FHY1,tssRegion = c(-2500,2499),TxDb = "TxDb.Athaliana.BioMart.plantsmart28", annoDb = "org.At.tair.db")
,出现如下报错:
>> preparing features information...		 2018-09-13 23:19:25 Error in (function (classes, fdef, mtable)  : 
  unable to find an inherited method for function ‘metadata’ for signature ‘"character"’
请问如何解决报错,谢谢指导 
                                                                
                                     阅读全文
                                
                                
                                     收起全文