Comments (5)
First create a script using usethis::use_data_raw()
. There you'll import any (large) file you want, then subset it to make it as small as possible such that your examples make sense but that your package is under the 5 mb limit. So like, you might make an rse
object that just has data for 100 genes across say 10 samples. Something like that. You can check the file size using lobstr::obj_size()
. If you want the size in Mb use lobstr::obj_size() / 1024^2
. Once you are happy with how small the data is, then save it using usethis::use_data()
inside the R script you generated with usethis::use_data_raw()
.
Here are two such examples:
- https://github.com/LieberInstitute/spatialLIBD/blob/master/data-raw/asd_sfari_geneList.R where I reshape some data, then even test that it works with my functions.
- https://github.com/LieberInstitute/spatialLIBD/blob/master/data-raw/create_sce_example.R where I subset an
sce
object. Back then,pryr::object_size()
used to be the function for check memory size, but now it'slobstr::obj_size()
.
In that last example, the final object was still quite big, but well, that's why I ended up sharing the data through ExperimentHub
http://bioconductor.org/packages/release/bioc/html/ExperimentHub.html. That's the solution if you need a large example file for your code to work. That route involves going through http://bioconductor.org/packages/release/bioc/vignettes/HubPub/inst/doc/CreateAHubPackage.html and you want to avoid this as much as possible. Another solution is to use some already publicly available data from AnnotationHub/ExperimentHub or other packages like http://bioconductor.org/packages/release/data/experiment/html/scRNAseq.html https://github.com/lmweber/STexampleData, https://github.com/helenalc/TENxVisiumData.
https://usethis.r-lib.org/reference/use_data.html
@lahuuki: this also applies to DeconvoBuddies
and other packages.
from qsvar.
See 20c39c0#r61118091 for some notes about the R script generated by use_data_raw()
.
from qsvar.
We can see at https://github.com/LieberInstitute/DeDHed/runs/4369810545?check_suite_focus=true#step:22:123 that we didn't document the actual data. To do so, we need a file like https://github.com/lcolladotor/derfinder/blob/master/R/genomeFstats-data.R that has the roxygen2
syntax for documenting the dataset we included.
See also https://r-pkgs.org/data.html#documenting-data
from qsvar.
have leo check
Line 14 in 30d00a0
from qsvar.
resolved line in comment above.
from qsvar.
Related Issues (20)
- Figure 3
- Figure 4
- Figure 5
- [BUG] Document when users need to specify set.seed() to ensure reproducibility of their results
- [BUG] Complete qSVA() wrapper HOT 2
- qsvaR workflow overview image
- Add a guide highlighting differences vs the qSVA 2017 method published in PNAS
- Provide access to all statistical model results
- Enhance flexibility of transcript selection
- Expand functionality for downstream analyses
- Guide for downstream analyses
- Helper functions for reproducing statistical modeling results that can be applied to subsets of the available data or new degradation datasets
- Guide for using helper functions to select transcripts associated with degradation in new subsets or new datasets
- Design a 2 day workshop / short course
- Translate course and intro documentation to Spanish
- Video guides for qsvaR
- Interactive tool for assessing confounding of DE results with RNA degradation
- Guide for evaluating confounding of DE results with RNA degradation
- Switch to using rlang and cli
- [Feature Request] Support ENSEMBL IDs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qsvar.