Skip to content
Prev 14775 / 21318 Next

[Bioc-devel] What is Bioconductor's position on allowing users to create files in the working directory without an explicit path definition in the filename

To chime and expand a bit on Vince's comments:


I feel Bioconductor's position when accepting packages , with few exceptions,  is that nothing should be written or saved to a users directory without the expressed permission of the user for fear of overwriting a users own directory or files previous to the packages intended use.  As Vince explained

For this reason we recommend that the defaults to all function and usage in man/vignettes/tests be written to the tempdir()/tempfile() options.  If the package documentation is clear,  than it should be known in practical use the user should specify a more permanent location for the file creation rather than a temporary location.

If a file is suppose to persist, BiocFileCache is an option for monitoring and storing files and is becoming a more standard way of organizing files.    There is the idea of saving objects to the cache with a given "rname" that would be a unique identifier.  Using that identifier, your package or the users should be able to use bfcquery  to query the cache and retrieve the file path.  As Vince said, this should then be documented in your package.   Without thoroughly understanding the implementation of your package this might be of use to you.


Less likely:  Depending on its implementation in your package, you may also find the bfcadd function has an option of  action = c("copy", "move", "asis")   which controls if the file is moved into the BiocFileCache default directory, copied from the location,  or left in the original location.


Cheers,


Lori Shepherd

Bioconductor Core Team

Roswell Park Cancer Institute

Department of Biostatistics & Bioinformatics

Elm & Carlton Streets

Buffalo, New York 14263
Message-ID: <BN8PR12MB3188CE36A525EABEF45EC239F9430@BN8PR12MB3188.namprd12.prod.outlook.com>
In-Reply-To: <CAANT7+VrGfxjCmZ2=bMHoW3fMGbkOmV0_XU4wdhCr0mVAF8X4g@mail.gmail.com>