Skip to content

Instantly share code, notes, and snippets.

View bschilder's full-sized avatar

Brian M. Schilder bschilder

View GitHub Profile
@bschilder
bschilder / merge_forked.md
Last active December 5, 2023 15:58
Merge changes from upstream repo when on a forked repo
# Add the remote, call it "upstream":
git remote add upstream https://github.com/scverse/anndataR.git

# Fetch all the branches of that remote into remote-tracking branches
git fetch upstream

# Make sure that you're on your master branch:
git checkout upstream/main
@bschilder
bschilder / install_vep.md
Last active November 23, 2023 03:08
install_vep

The Variant Effect Predictor (VEP) is a super useful tool for extracting many kinds of variant-level annotations from Ensembl. Unfortunately, they make it extremely difficult to install. Here are my attempts to install it via every method I could find (none of them worked...).

See here for more help on the VEP GitHub repo.

Method 1: no environment

On Mac:

@bschilder
bschilder / singularity_troubleshooting.md
Last active October 27, 2023 17:47
Singularity Troubleshooting

Install Docker

Make sure you have a working version of Docker Desktop installed. You can check by trying to open the app "Docker" first. If you get an error, or can't find it, install it from here: https://www.docker.com/products/docker-desktop/

Then make sure you're logged into Docker with your account. If you don't have an account already, you can make one here: https://hub.docker.com/login

Use Singularity despite Zscalar issues

The Problem

Introduction

So I've run into an issue where I need to use the development version of an R package (MungeSumstats) to process files for a certain project. But this version requires rtracklayer >=1.59.1, which in turn requires R >=4.3 (which is currently the development version of R).

Normally, I'd simply upgrade my version of R, or create a new Docker container with the devel version of R. However, I'm using Imperial On Demand Rstudio server because it provides a RStudio GUI for interacting with files that are stored directly on my HPC project folder. This is far faster than trying to access them from my local computer when my HPC folder is mounted to it. However it also comes with several big limitations:

  • You must used conda environments to install any software. Meaning if it's not on any standard conda repos like Anaconda.org , you're out of luck.
  • You do not have sudo permissions, which just solidifies point #1.

Here are some approaches I've tried to get aroun

Installing the XML R package can be tricky if you don't have the right systems depdencies. If these are set up right, you'll get a zero-exit status when trying to install XML from source.

The system dependency libxml2 is the main one you need to worry about. Here are a variety of solutions for installing this.

1. Install libxml2

With apt-get:

Function to check whether the user-supplied argument is the default.

is_default <- function(fun,
                       arg,
                       arg_value,
                       use_names=TRUE){
  fmls <- formals(get(fun))
  if(arg %in% names(fmls)){
 is_def &lt;- if(use_names){
@bschilder
bschilder / gist:af3960b7d7b911274198e3febae535a9
Last active August 28, 2022 21:21
`devtools::build_man`

devtools::build_man

devtools::build_manual()
Error in `value[[3L]]()`:
! Failed to build manual
Run `rlang::last_error()` to see where the error occurred.