Hi, I'm trying to follow the ATAC-seq Bioconductor tutorial from Rockefeller University here. I'm stuck at the section "Export annotated, differential ATAC-seq" where I'm trying to write out a table of annotated differentiated ATAC-seq peaks. Below is the code. For context, the class of LiverMinusHindbrain is GenomicRanges.
anno_LiverMinusHindbrain <- annotatePeak(LiverMinusHindbrain, TxDb = TxDb.Mmusculus.UCSC.mm10.knownGene)
anno_LiverMinusHindbrain_GRanges <- as.GRanges(anno_LiverMinusHindbrain)
anno_LiverMinusHindbrain_GRanges_Up <- anno_LiverMinusHindbrain[elementMetadata(anno_LiverMinusHindbrain)$log2FoldChange >
0]
I'm getting the following error after the last line described above:
Error in h(simpleError(msg, call)) : error in evaluating the argument 'i' in selecting a method for function '[': unable to find an inherited method for function ‘elementMetadata’ for signature ‘"csAnno"’
I understand that it's saying the function elementMetadata() doesn't work if the class of anno_LiverMinusHindbrain is "csanno", but this seems to be the what the first line of code mention above is intentionally doing. I am quite new to R and this sort of analysis so any help at all would be greatly appreciated.