Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update conda environment to R 4.2 #183

Closed
jashapiro opened this issue Aug 2, 2022 · 3 comments
Closed

Update conda environment to R 4.2 #183

jashapiro opened this issue Aug 2, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@jashapiro
Copy link
Member

Please provide some background on the proposed additions or changes.

For consistency with AlexsLemonade/sc-data-integration#73, we will probably want to update the R version to 4.2 & Bioconductor to 3.15

What are the changes that you are proposing?

Update scpca-renv.yaml to install R 4.2 , which will also require updating the renv.lock file with the associated packages.

What potential "gotchas" do we know of?

If we update the conda environment without simultaneously updating the renv.lock file, the automatic snakemake install will fail.

Note also that users will have to reinstall the conda environment by rerunning

[CONDA_SUBDIR=osx-64] snakemake --use-conda --conda-create-envs-only -c4 build_renv

(with the CONDA_SUBDIR=osx-64 prefix only for Mac M1 computers)

Additional context or questions

This will be on hold for a bit, as R 4.2 has not quite made it into conda-forge, see conda-forge/r-base-feedstock#205

@jashapiro jashapiro added the enhancement New feature or request label Aug 2, 2022
@sjspielman
Copy link
Member

I had a thought related to this, incidentally while reviewing #191. In many scripts throughout this repo, we have code like:

# Check that R version us at least 4.1
if (! (R.version$major == 4 && R.version$minor >= 1)){
  stop("R version must be at least 4.1")
}

# Check that Bioconductor version is 3.14
if (packageVersion("BiocVersion") < 3.14){
  stop("Bioconductor version is less than 3.14")
}

I wonder if re-factoring the codebase such that these checks are moved into a function, like check_r_bioc_versions()., might be helpful long term? Updating to R 4.2 won't cause any of that code to fail, but if other kinds of version bumps might cause those checks to fail one day, it would save a lot of pain to have a function handling version checks.

@jashapiro
Copy link
Member Author

I wonder if re-factoring the codebase such that these checks are moved into a function, like check_r_bioc_versions()., might be helpful long term? Updating to R 4.2 won't cause any of that code to fail, but if other kinds of version bumps might cause those checks to fail one day, it would save a lot of pain to have a function handling version checks.

Seems reasonable. Feel free to file as a separate issue.

Also, an update: R 4.2.1 is now available through conda-forge, so we can try to work on this issue, if desired. (I might try it as a branch off #188, to see if I can happen to get a fix of the strange issue there for some reason)

@jashapiro
Copy link
Member Author

Closed by #202

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants