Hello,
I should preface this with the general, "I'm new and don't know what I'm doing, but I'm trying to learn" message. I've just started to learn R (using 3.4) and am trying to use ChIPPeakAnno to 1) annotate my peaks 2) compare 3 datasets for TSS, TSS+200bp, etc.
Using the following script:
library(biomaRt)
library(org.Mm.eg.db)
mart <- useMart("ensembl", "mmusculus_gene_ensembl")
AnnotationData <- getAnnotation(mart, featureType="TSS")
data("TSS.mouse.NCBIM37")
d3.k4m1 <- import.bed("d3_TCR_k4m1_summits.bed")
d3.k4m1.RD <- RangedData(d3.k4m1)
d3.k4m1.TGR <- toGRanges(d3.k4m1.RD)
I get this error and am unable to procede with anything:
> d3.k4m1.anno <- annotatePeakInBatch(d3.k4m1.TGR, mart, featureType="TSS", AnnotationData = TSS.mouse.NCBIM37, output = "both", mutliple=FALSE, maxgap = 0L, PeakLocForDistance = "middle", FeatureLocForDistance = "TSS", select="all", ignore.strand = FALSE, bindingRegion = NULL)
There were 37 warnings (use warnings() to see them)
> d3.k4m1.fullanno <- addGeneIDs(d3.k4m1.TGR, mart=mart, feature_id_type="ensembl_gene_id", IDs2Add= c("ensembl_gene_id","description", "chromosome_name", "start_position", "end_position", "external_gene_name", "go_id", "name_1006"), silence=TRUE)
Error: There is no feature column in annotatedPeak or
annotatedPeak has size 0!
In addition: Warning message:
In is.na(feature_ids) :
is.na() applied to non-(list or vector) of type 'NULL'
This error is on a dataset with 57,000 peaks but when I use a dataset with only 5000 peaks or so, I have no problems so I get that the file size is maybe an issue but I'm unsure how to fix it. I would appreciate any assistance.
Many thanks.