Dear Paola,
To get the exon annotation, please set featureType to "Exon" as follows.
x<-getAnnotation(mart, featureType= "Exon")
To find out more about this function, please type help(getAnnotation) in a R session. Thanks!
Best regards,
Julie
On 3/20/15 5:46 AM, "paola.orsini-@libero.it" <paola.orsini-@libero.it> wrote:
Dear doctor,
I'm Paola Orsini, I'm a biologist and bioinformatician from the university of Bari (Italy). I'm analyzing ChIP-seq data and I'm using your package ChipPeakanno to annotate my peaks. I would like to kindly ask you some information about it. In details, in chippeakanno manual I read that you can annotate peaks using the annotatePeakInBatch function directly by using some annotation data packages (such as TSS.human.GRCh37) to annotate peaks with TSS, if we want to annotate them with other genomic features (such as exon, mirna or utr), we have to use getAnnotation function. I tried to annotate my peaks in both ways here the script I wrote:
data(TSS.human.GRCh37)
annotatedPeak1 = annotatePeakInBatch(peaks, AnnotationData=TSS.human.GRCh37)
listMarts()
mart = useMart('ensembl',dataset="hsapiens_gene_ensembl")
x<-getAnnotation(mart,
featureType=c("TSS","miRNA", "Exon", "5utr", "3utr", "ExonPlusUtr", "transcript"))
class(x) #RangedData
annotatedPeak2<-annotatePeakInBatch(peaks,AnnotationData=x)
I saw that the two annotation files are the same, in that the second file doesn't include the additional information I expected. I don't know if I'm making some errors, unfortunately I've not experience in this kind of analysis.
I also used the addGeneIDs function to add other IDs to annotated peaks, and I observed that for some ENSG Id, the associated gene symbol and entrez ID are not in the output (most of them areNA), even if for some of them there is a gene symbol in Ensembl database (for example ENS0000023176).
I would also like to ask you if with the assignChromosomeRegion function we can retrieve which are the peaks associated with each region or only their percentage.
Thank you very much for your time and kind attention.
Best regards,
Paola