Re: [Bioc-devel] Use set.seed inside function
Check out grDevices::hcl.pals (also https://www.zeileis.org/papers/Zeileis+Hornik+Murrell-2009.pdf) or the RColorBrewer package (also https://colorbrewer2.org) for principled selection of colors. Sounds like you're interested in 'qualitative' color palletes. Martin Morgan On 11/29/21, 4:23 PM, "Bioc-devel on behalf of Meng Chen" wrote: Thanks. I think it may work in theory, generating "enough" distinct colors is fairly easy. Then the problem will be how to find a subset of colors of size n, and the selected colors are still most distinguishable. I think I will do this with my eyes if no other methods, a tedious job. But at least for my curiosity, I still want to know if there are other ways to achieve this. I feel like 80% of people who use the distinctColorPallete function actually don't need the "random" feature :) Thanks. On Mon, Nov 29, 2021 at 9:39 PM James W. MacDonald wrote: > It appears that you don't actually want random colors, but instead you > want the same colors each time. Why not just generate the vector of 'random > distinct colors' one time and save the vector of colors? > > -Original Message- > From: Bioc-devel On Behalf Of Meng Chen > Sent: Monday, November 29, 2021 3:21 PM > To: bioc-devel@r-project.org > Subject: [Bioc-devel] Use set.seed inside function > > Dear BioC team and developers, > > I am using BiocCheck to check my package, it returns a warning: > " Remove set.seed usage in R code" > > I am using "set.seed" inside my functions, before calling function > distinctColorPalette (randomcoloR package) in order to generate > reproducible "random distinct colors". So what would be the best practice > to solve this warning? I think 1. use set.seed and don't change anything. > 2. use the set.seed function, but include something like below inside the > function *gl.seed <- .Random.seed* *on.exit(assign(".Random.seed", gl.seed, > envir = .GlobalEnv))* 3. use some other functions for the purpose > > Any suggestions will be appreciated. Thanks. > -- > Best Regards, > Chen > > [[alternative HTML version deleted]] > > ___ > Bioc-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/bioc-devel > -- Best Regards, Chen [[alternative HTML version deleted]] ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Re: [Bioc-devel] Use set.seed inside function
Martin's suggestion is the way to go. For display purposes, you basically never want random colors, you almost always want to select distinct colors and there are principled ways of doing that. Best, Kasper On Tue, Nov 30, 2021 at 6:59 AM Martin Morgan wrote: > Check out grDevices::hcl.pals (also > https://www.zeileis.org/papers/Zeileis+Hornik+Murrell-2009.pdf) or the > RColorBrewer package (also https://colorbrewer2.org) for principled > selection of colors. Sounds like you're interested in 'qualitative' color > palletes. > > Martin Morgan > > On 11/29/21, 4:23 PM, "Bioc-devel on behalf of Meng Chen" < > bioc-devel-boun...@r-project.org on behalf of mengche...@gmail.com> wrote: > > Thanks. I think it may work in theory, generating "enough" distinct > colors > is fairly easy. Then the problem will be how to find a subset of > colors of > size n, and the selected colors are still most distinguishable. I > think I > will do this with my eyes if no other methods, a tedious job. > But at least for my curiosity, I still want to know if there are other > ways > to achieve this. I feel like 80% of people who use the > distinctColorPallete > function actually don't need the "random" feature :) Thanks. > > On Mon, Nov 29, 2021 at 9:39 PM James W. MacDonald > wrote: > > > It appears that you don't actually want random colors, but instead > you > > want the same colors each time. Why not just generate the vector of > 'random > > distinct colors' one time and save the vector of colors? > > > > -Original Message- > > From: Bioc-devel On Behalf Of > Meng Chen > > Sent: Monday, November 29, 2021 3:21 PM > > To: bioc-devel@r-project.org > > Subject: [Bioc-devel] Use set.seed inside function > > > > Dear BioC team and developers, > > > > I am using BiocCheck to check my package, it returns a warning: > > " Remove set.seed usage in R code" > > > > I am using "set.seed" inside my functions, before calling function > > distinctColorPalette (randomcoloR package) in order to generate > > reproducible "random distinct colors". So what would be the best > practice > > to solve this warning? I think 1. use set.seed and don't change > anything. > > 2. use the set.seed function, but include something like below > inside the > > function *gl.seed <- .Random.seed* *on.exit(assign(".Random.seed", > gl.seed, > > envir = .GlobalEnv))* 3. use some other functions for the purpose > > > > Any suggestions will be appreciated. Thanks. > > -- > > Best Regards, > > Chen > > > > [[alternative HTML version deleted]] > > > > ___ > > Bioc-devel@r-project.org mailing list > > https://stat.ethz.ch/mailman/listinfo/bioc-devel > > > > > -- > Best Regards, > Chen > > [[alternative HTML version deleted]] > > ___ > Bioc-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/bioc-devel > ___ > Bioc-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/bioc-devel > -- Best, Kasper [[alternative HTML version deleted]] ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
[Bioc-devel] version bump
Dear Bioconductor community members, I have pushed some changes to the HPiP package, but I mistakenly changed the version bump from 0.99.19 to 1.99.1, and therefore I am getting the following error: (Illegal version bump from '1.99.1' to '0.99.19') May you please help me with this issue? I really want the changes to appear in both the devel and release versions. thank you, Matineh [[alternative HTML version deleted]] ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Re: [Bioc-devel] version bump
Hi, We've set HPiP's version to 1.1.1 in devel (master branch, BioC 3.15). The version that is currently published in BioC 3.15 is 1.1.0. See: https://bioconductor.org/packages/3.15/HPiP Make sure to re-sync your GitHub repo with your package at git.bioconductor.org before doing any further work on the package. It doesn't seem that you've touched the RELEASE_3_14 branch of the package yet. The version is still at 1.0.0 there. When you port your changes from master to this branch, make sure to bump the version to 1.0.1. Please remember that only bug fixes and documentation improvements should be ported to release. No new features or changes that could hurt reproducibility there. Thanks! Best, H. On 30/11/2021 10:18, matine rb wrote: Dear Bioconductor community members, I have pushed some changes to the HPiP package, but I mistakenly changed the version bump from 0.99.19 to 1.99.1, and therefore I am getting the following error: (Illegal version bump from '1.99.1' to '0.99.19') May you please help me with this issue? I really want the changes to appear in both the devel and release versions. thank you, Matineh [[alternative HTML version deleted]] ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel -- Hervé Pagès Bioconductor Core Team hpages.on.git...@gmail.com ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel
Re: [Bioc-devel] Change bioconductor maintainer
In order for the maintainer email to change on the package landing pages, you will need to update in the DESCRIPTION of your package on git.bioconductor.org. The GitCredentials app that manages package access ssh keys is already using zl...@mdanderson.org. Please see git help pages for pushing changes to release (RELEASE_3_14) and devel (master) branches http://bioconductor.org/developers/how-to/git/bug-fix-in-release-and-devel/ On Mon, Nov 29, 2021 at 4:11 PM Li, Ziyi wrote: > Hello, > > I recently changed my institution and my email address. Could you update > the maintainer email address of TOAST ( > https://bioconductor.org/packages/release/bioc/html/TOAST.html) to > zl...@mdanderson.org? > > > Thank you! > > Ziyi > [[alternative HTML version deleted]] ___ Bioc-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/bioc-devel