[Bioc-devel] topGO and cat() and print() statements in program code

Dan Tenenbaum dtenenba at fredhutch.org
Thu Feb 4 00:56:27 CET 2016


Another dirty hack is to redefine cat() in your own code to do nothing:

cat <- function(....) {}

Dan


----- Original Message -----
> From: "James W. MacDonald" <jmacdon at uw.edu>
> To: "Witold E Wolski" <wewolski at gmail.com>
> Cc: "bioc-devel" <bioc-devel at r-project.org>
> Sent: Tuesday, February 2, 2016 6:50:21 AM
> Subject: Re: [Bioc-devel] topGO and cat() and print() statements in program	code

> I can't speak to the issue of changing somebody else's code without forking
> (which you are free to do), or getting their OK. But do note that there are
> usually ways around this. First, you can use include = FALSE in your chunk
> options statement, which will run all the code, but silence everything.
> This isn't a good use case if you need to print, but that can usually be
> split out. Something like
> 
> ```r{noisypart, include = FALSE}
> 
> noisy code goes here
> 
> ```
> 
> ```r{quietpart, echo = FALSE, fig.cap = ""}
> 
> plots go here
> 
> ```
> 
> An alternative is to use GOstats, which may be less noisy, but which still
> has 18 calls to cat() (vs 121 for topGO) and 2 calls to print() (vs 29 for
> topGO).
> 
> Best,
> 
> Jim
> 
> 
> 
> On Tue, Feb 2, 2016 at 5:19 AM, Witold E Wolski <wewolski at gmail.com> wrote:
> 
>> Hi,
>>
>> I am using the very usefull package topGO to generate a report (R
>> markdown). There is not much to complain about topGO (on the contrary)
>> except that the package uses cat instead of message to display
>> progress information. which ruins the report.
>>
>> Also the bioconductor package guidelines state:
>> cat() or print() are used only when displaying an object to the user,
>> e.g., in a show method.
>>
>> This makes it difficult to integrate topGO.
>>
>> I did contact the maintainer asking to update topGO. However I did not
>> get an reply. It seems that the maintainer is occupied with other
>> problems. I did offer to replace the cat with message for these
>> functions I am using myself. No reply.
>>
>> So what I am wondering is... If I do the corrections, and would like
>> to commit the code... Sure I could create a branch but since I do not
>> have write access to svn no chance to push (commit) it for review.
>> And who is going to review it if the maintainer does not have time?
>>
>> best
>> Witold
>>
>>
>>
>>
>>
>> --
>> Witold Eryk Wolski
>>
>> _______________________________________________
>> Bioc-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>>
> 
> 
> 
> --
> James W. MacDonald, M.S.
> Biostatistician
> University of Washington
> Environmental and Occupational Health Sciences
> 4225 Roosevelt Way NE, # 100
> Seattle WA 98105-6099
> 
>	[[alternative HTML version deleted]]
> 
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel



More information about the Bioc-devel mailing list