I am conduced chip-seq for proteins that are part of a complex.
Peak1 - AR Peak2 - EZH2 Peak3 - pEZH2
From the chip seeker analysis pipeline PMID:28416945, I was able to get to a point in the pipeline that spits out a venn diagram showing common peaks between the 3 chip-seqs. Venn Diagram
I wanted to extract the ID of the genes in the overlapping regions. This I what I have so far:
files <- list(peak1 = "AR.bed", peak2 = "EZH2.bed", peak3 = "pEZH2.bed") peakAnnoList <- lapply(files, annotatePeak, TxDb=txdb, tssRegion=c(-5000, 5000), verbose=FALSE) genes = lapply(peakAnnoList, function(i) as.data.frame(i)$geneId) vennplot(genes)
Is there another way to export out the "genes" data as a excel or csv? It presents as a "Large list" in the environment. I tried the following command and it didn't work as the lengths of the 3 lists isn't the same.
df4 <- data.frame(as.data.frame(genes)) write.table(df4, "overlap.xls", quote=FALSE, row.names=TRUE, sep="\t")
Thanks in advance for any help!