[BioC] Chippeakanno venn

Zhu, Lihua (Julie) Julie.Zhu at umassmed.edu
Thu Jul 28 02:11:35 CEST 2011


Ying,

You could run findOverlappingPeaks function followed by annotatePeakInBatch.

Here is an example for getting annotated intersection between m1.r and m2.r.

m1m2.ann = annotatePeakInBatch(findOverlappingPeaks(m1.r, m2.r,
multiple=FALSE, maxgap=0, NameOfPeaks1 = "m1", NameOfPeaks2 =
"m2")$mergedPeaks, Annotation=yourAnnotationData)

Here is an example for getting annotated intersection between m1.r, m2.r and
m3.r.
m1m2m3.ann = annotatePeakInBatch(findOverlappingPeaks(
findOverlappingPeaks(m1.r, m2.r, multiple=FALSE, maxgap=0, NameOfPeaks1 =
"m1", NameOfPeaks2 = "m2")$mergedPeaks, m3.r, multiple=FALSE, maxgap=0,
NameOfPeaks1="m1m2", NameOfPeaks2="m3")$mergedPeaks,
Annotation=yourAnnotationData)

Best regards,

Julie


On 7/27/11 4:01 PM, "Ying W" <daiyingw at gmail.com> wrote:

>  Hi,
> I recently made venn diagrams from chip-seq data using the Chippeakanno
> library and I was wondering how to get the intersect of these venn diagrams
> and annotate them (closest gene, within intron/exon, distance from TSS)
> 
> Thanks,
> Ying Wu
> 
> m1 = read.table("./methyl1_peaks.bed", sep="\t")
> m2 = read.table("./methyl2_peaks.bed", sep="\t")
> m3 = read.table("./methyl3_peaks.bed", sep="\t")
> m4 = read.table("./methyl4_peaks.bed", sep="\t")
> 
> m1.r = BED2RangedData(m1)
> m2.r = BED2RangedData(m2)
> m3.r = BED2RangedData(m3)
> m4.r = BED2RangedData(m4)
> mkd = makeVennDiagram(RangedDataList(m1.r,m2.r,m3.r,m4.r),
> NameOfPeaks=c("M1", "M2", "M3", "M4"), totalTest=200000)
> 
>> sessionInfo()
> R version 2.13.0 (2011-04-13)
> Platform: x86_64-pc-linux-gnu (64-bit)
> 
> locale:
>  [1] LC_CTYPE=en_US.UTF-8       LC_NUMERIC=C
>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>  [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
> 
> attached base packages:
> [1] grid      stats     graphics  grDevices utils     datasets  methods
> [8] base
> 
> other attached packages:
>  [1] ChIPpeakAnno_1.9.5                  gplots_2.8.0
>  [3] caTools_1.12                        bitops_1.0-4.1
>  [5] gdata_2.8.2                         gtools_2.6.2
>  [7] limma_3.8.2                         org.Hs.eg.db_2.5.0
>  [9] GO.db_2.5.0                         RSQLite_0.9-4
> [11] DBI_0.2-5                           AnnotationDbi_1.14.1
> [13] BSgenome.Ecoli.NCBI.20080805_1.3.17 BSgenome_1.20.0
> [15] GenomicRanges_1.4.6                 Biostrings_2.20.1
> [17] IRanges_1.10.4                      multtest_2.8.0
> [19] Biobase_2.12.2                      biomaRt_2.8.1
> 
> loaded via a namespace (and not attached):
> [1] MASS_7.3-13     RCurl_1.6-6     splines_2.13.0  survival_2.36-9
> [5] tools_2.13.0    XML_3.4-0
> 
> [[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioconductor mailing list
> Bioconductor at r-project.org
> https://stat.ethz.ch/mailman/listinfo/bioconductor
> Search the archives:
> http://news.gmane.org/gmane.science.biology.informatics.conductor
> 



More information about the Bioconductor mailing list