Here we provide the steps for running the Phase2.1 Neuro R package. This package specifically requires Phase2.1 data and memebership within the 4CE Consortium.
4CE analysts at each participating healthcare system can follow the below steps to locally run the Phase2.1 Neuro R Package on their healthcare system's data.
-
See the latest release notes
-
Review & download the data dictionary
Before going into any coding, please confirm your site parameters on this google sheet. If anything is incorrect or if your site is not there, please notify @meghutch via Slack to make correction.
Note: icd_version = 9
when the site’s ICD codes are primarily of
version 9, and include_race = FALSE
when site does not have race
information.
Now that you have verified your site specifics, on the command line,
open the Docker container, replacing your_path_here
with the path to
the directory containing folder Input
(where your site-specific
datasets are stored):
docker run \
--name neuro4ce \
--volume your_path_here:/4ceData \
--rm -it \
dbmi/4ce-analysis:version-2.1.0 R
The above lines should open up the interactive R environment on your terminal. Now, while in R, install the development version of Phase2.1NeuroRPackage from GitHub with remotes and run:
remotes::install_github('covidclinical/Phase2.1NeuroRPackage',
subdir = 'FourCePhase2.1Neuro',
upgrade = FALSE)
library(Phase2.1NeuroRPackage)
runAnalysis()
Finally, please submit the results to Phase2.1NeuroRSummariesPublic:
- Share with @meghutch your GitHub handle via direct message or the #neuro Slack channel so you can be added as contributor to the repository.
- Note that you would need to use a token to access private repos, see here. Briefly, to generate a new token, go to your GitHub settings -> Developer settings -> Personal access tokens -> Generate.
submitAnalysis()
If everything runs smoothly, your results would also be saved under
your_path_here
(where you specified the Input
folder earlier). For
example, for me, it’s /data2/home/ttle/4ce/UPENN_results.rda
. If
somehow submitAnalysis()
didn’t allow you to upload the results to
Phase2.1NeuroRSummariesPublic,
you can share the results file with us (@meghutch and @trang) via the
#neuro Slack channel.
As reference, site obfuscation parameters (mask_thres
and blur_abs
)
are
here.
To get back to the command line at any point, type quit()
in the R
environment. Note that this will exit the container, and you would have
to open another one and reinstall the package if you want to rerun.
If you run into any problem adapting this code to your data, let us know via Slack or submit an issue.
Thank you very much for your contribution!