statOmics/stageR

warning?

Closed this issue · 1 comments

this section produces a warning:

https://github.com/statOmics/stageR/blob/master/R/accessors.R#L195-L200

I'm not sure if a warning() is better than a message(), given that the user has done everything correctly. I'd go with message() so that users can suppress with suppressMessages() and still get important warnings. Just my opinion. Also it prints out a bit funny in the console:

 > padj <- getAdjustedPValues(stageRObj, order=FALSE, onlySignificantGenes=TRUE)
 Warning message:
 The returned adjusted p-values are based on a
                  stage-wise testing approach and are only valid for
                  the provided target OFDR level of 5%. If a different target OFDR level is of interest,
                  the entire adjustment should be re-run.

Maybe instead:

> padj <- getAdjustedPValues(stageRObj, order=FALSE, onlySignificantGenes=TRUE)
*** The returned adjusted p-values are based on a stage-wise testing approach
*** and are only valid for the provided target OFDR level of 5%. If a different
*** target OFDR level is of interest, the entire adjustment should be re-run.

Thank you for the advice, Mike, I appreciate it.
The weird printing was because of Bioconductor 80 character limit and me not being creative enough.
I have changed the warning to a message and the printing should now be nicer in commit 3dd12cc

Koen