Dear All,
I have the following code....
library(ChIPpeakAnno)
peak.file =read.table ("D:\\Analysis\\peak.target.genes.list.txt", header=T, sep='\t')
pr <- RangedData(IRanges(peak.file$peak.location.new, width=1), space=peak.file$chromosome, idx=1:nrow(peak.file))
My first question is....is the way that I am making the IRANGE correct? the file that I am using has the following format
chromosome start end peak.location.new chip.value target.gene.name distance.to.gene
chr1 162990333 162990703 162990519 33 RP11-331H2.3.1 136
then i continue with the following
if (interactive())
{
mart<-useMart(biomart="ensembl",dataset="mmusculus_gene_ensembl")
Annotation = getAnnotation(mart, featureType=c("TSS","miRNA", "Exon", "5utr", "3utr", "ExonPlusUtr", "transcript"))
}
data(pr)
data(Annotation)
annotatedPeak = annotatePeakInBatch(pr, AnnotationData=Annotation)
pk= as.data.frame( annotatedPeak)
write.table (pk, file="D:\\Analysis\\peak.target.genes.list4.txt",quote = FALSE,col.names =TRUE,row.names=FALSE, sep="\t")
what should I do in order to identify if peaks are in intron exon promoter and 3'utr?
What am I doing wrong here?
Because right now in the output data frame it only gives me only information about if the peak is upstream, downstream or inside.
How can I define if a peak is in promoter, exon or intron?
This is the output that I get
start end width start_position end_position insideFeature distancetoFeature
120301248 120301248 1 120285635 120506009 inside 15613
243680061 243680061 1 197054472 197054592 downstream 46625589
Could you please help me???
Thank you in advance
best regards Lena
Can you paste some lines from your output (pk)?