Hi Brad,

May I know what version of ChIPpeakAnno you are using? If you are using the released version 2.12.1, you can easily change the output filename by giving a filename for output, for example:

Library(ChIPpeakAnno)

peaks1 = RangedData(IRanges(start = c(967654, 2010897, 2496704),
         end = c(967754, 2010997, 2496804), names = c("Site1", "Site2", "Site3")),
         space = c("1", "2", "3"), strand=as.integer(1),feature=c("a","b","f"))
peaks2 = RangedData(IRanges(start = c(967659, 2010898,2496700,3075866,3123260),
        end = c(967869, 2011108, 2496920, 3076166, 3123470),
        names = c("t1", "t2", "t3", "t4", "t5")),
        space = c("1", "2", "3", "1", "2"), strand = c(1, 1, -1,-1,1), feature=c("a","b","c","d","a"))

pdf("path/to/AnyFileNameYouWant.pdf")
makeVennDiagram(RangedDataList(peaks1,peaks2), NameOfPeaks=c("TF1", "TF2"),
 totalTest=100,scaled=F, euler.d=F)

dev.off()

And because we already defined the the filename arguments to NULL when calls venn.diagram, you can not define the filename by directly input the filename to makeVennDiagram. Why we do this is because it can output other formats of figure other than tiff. I am sorry this is not clear in the documentation file. We will improve the documentation later. Thank you.

Yours Sincerely,

Jianhong Ou

LRB 670A
Program in Gene Function and Expression
364 Plantation Street Worcester,
MA 01605

From: <Zhu>, "Lihua (Julie)" <Julie.Zhu@umassmed.edu<mailto:Julie.Zhu@umassmed.edu>>
Date: Wednesday, July 2, 2014 8:10 PM
To: Brad Davis <bdavis@bcgsc.ca<mailto:bdavis@bcgsc.ca>>
Cc: Jianhong Ou <jianhong.ou@umassmed.edu<mailto:jianhong.ou@umassmed.edu>>, "<bioconductor@stat.math.ethz.ch<mailto:bioconductor@stat.math.ethz.ch>>" <bioconductor@stat.math.ethz.ch<mailto:bioconductor@stat.math.ethz.ch>>
Subject: Re: Suggestion for a small change to ChIPpeakAnno

Brad,

Thanks for the suggestion ! We will look into it.

Best regards,

Julie


On Jul 2, 2014, at 5:55 PM, Brad Davis <bdavis@bcgsc.ca<mailto:bdavis@bcgsc.ca>> wrote:

Hello Dr. Zhu,

I am working with your ChIPpeakAnno package for R and I find it very convenient, but I have a small suggestion to enhance it’s functionality, at least from the perspective of automating data processing.  At the moment your package creates the venn diagrams with a defined output filename “Rplots.pdf”, but it would be very helpful if the user could specify that file name in the command and overwrite the default filename.  I tried to do this by specifying filename= in the makeVennDiagram function, but it returns an error “Error in venn.diagram(x = vennx, filename = NULL, cat.cex = 1, cat.col = "black",  :
  formal argument "filename" matched by multiple actual arguments”.

Thanks,
Brad

	[[alternative HTML version deleted]]

