Skip to content

Instantly share code, notes, and snippets.

View BrunoGrandePhD's full-sized avatar

Bruno Grande BrunoGrandePhD

View GitHub Profile
@tthyer
tthyer / query-aurora.sh
Created February 18, 2022 21:53
query-aurora.sh
#! /bin/bash
# Script to execute a SQL query through awscli
set -ex
CLUSTER_ARN='arn:aws:rds:us-east-1:035458030717:cluster:tower'
SECRET_ARN=$(aws secretsmanager describe-secret \
--secret-id nextflow-aurora-mysql-MasterSecret | jq -r .ARN)
QUERY="${1}"
@ckandoth
ckandoth / ensembl_vep_102_with_offline_cache.md
Last active February 8, 2025 04:16
Install Ensembl's VEP v102 with local cache for running offline

Ensembl's VEP (Variant Effect Predictor) is popular for how it picks a single effect per gene as detailed here, its CLIA-compliant HGVS variant format, and Sequence Ontology nomenclature for variant effects.

Instead of the official instructions, we will use conda to install VEP and its dependencies. If you don't already have conda, install it into $HOME/miniconda3 as follows:

curl -sL https://repo.anaconda.com/miniconda/Miniconda3-py37_4.9.2-Linux-x86_64.sh -o /tmp/miniconda.sh
sh /tmp/miniconda.sh -bfp $HOME/miniconda3

Add the conda bin folder into your $PATH so that all installed tools are accessible via command-line. You can also add this to your ~/.bashrc

@mrecos
mrecos / stratifiedCV.r
Last active August 14, 2020 17:50
Stratified K-folds Cross-Validation with Caret
require(caret)
#load some data
data(USArrests)
### Prepare Data (postive observations)
# add a column to be the strata. In this case it is states, it can be sites, or other locations
# the original data has 50 rows, so this adds a state label to 10 consecutive observations
USArrests$state <- c(rep(c("PA","MD","DE","NY","NJ"), each = 5))
# this replaces the existing rownames (states) with a simple numerical index