Skip to content

Instantly share code, notes, and snippets.

View BrunoGrandePhD's full-sized avatar

Bruno Grande BrunoGrandePhD

View GitHub Profile
@BrunoGrandePhD
BrunoGrandePhD / setup-ssh-via-ssm.sh
Created July 25, 2023 02:49
A shell script for setting up an EC2 instance with SSH keys via AWS Session Manager
#!/bin/bash
#
# This script uploads your public SSH key ('id_ed25519' by default)
# to the home directories of 'ec2-user' and 'ssm-user'. While both
# users are configured, it's recommended to use 'ec2-user' for SSH.
# Written by Bruno Grande.
#
# Script usage:
#
name: docker-ci
on:
push:
branches: [main]
tags: ['v[0-9]*', '[0-9]+.[0-9]+*'] # Match tags that resemble a version
workflow_dispatch: # Allow manually triggering the workflow
jobs:
docker-build:
We can make this file beautiful and searchable if this error is corrected: It looks like row 5 should actually have 7 columns, instead of 6. in line 4.
patient,gender,status,sample,lane,fastq_1,fastq_2
S000,XX,0,S000-1234N,S000-1234N_M1,https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.1.AGTTGCTT_R1_xxx.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.1.AGTTGCTT_R2_xxx.fastq.gz
S001,XX,0,S001-1234N,S001-1234N_M2,https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.2.AGTTGCTT_R1_xxx.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.2.AGTTGCTT_R2_xxx.fastq.gz
S002,XX,0,S002-1234N,S002-1234N_M4,https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C09DF_N_111207.4.AGTTGCTT_R1_xxx.fastq.gz,https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C09DF_N_111207.4.AGTTGCTT_R2_xxx.fastq.gz
S003,XX,0,S003-1234N,S003-1234N_M5,https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/n
S000 XX 0 S000-1234N S000-1234N_M1 https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.1.AGTTGCTT_R1_xxx.fastq.gz https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.1.AGTTGCTT_R2_xxx.fastq.gz
S001 XX 0 S001-1234N S001-1234N_M2 https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.2.AGTTGCTT_R1_xxx.fastq.gz https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.2.AGTTGCTT_R2_xxx.fastq.gz
S002 XX 0 S002-1234N S002-1234N_M4 https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C09DF_N_111207.4.AGTTGCTT_R1_xxx.fastq.gz https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C09DF_N_111207.4.AGTTGCTT_R2_xxx.fastq.gz
S003 XX 0 S003-1234N S003-1234N_M5 https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/D0F23_N_111212.1.AGTTGCTT_R1_xxx.fastq.gz ht
S000 XX 0 1234N 1234N_M1 https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.1.AGTTGCTT_R1_xxx.fastq.gz https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.1.AGTTGCTT_R2_xxx.fastq.gz
S002 XX 0 1234N 1234N_M2 https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.2.AGTTGCTT_R1_xxx.fastq.gz https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C097F_N_111207.2.AGTTGCTT_R2_xxx.fastq.gz
S002 XX 0 1234N 1234N_M4 https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C09DF_N_111207.4.AGTTGCTT_R1_xxx.fastq.gz https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/C09DF_N_111207.4.AGTTGCTT_R2_xxx.fastq.gz
S003 XX 0 1234N 1234N_M5 https://raw.githubusercontent.com/nf-core/test-datasets/sarek/testdata/manta/normal/D0F23_N_111212.1.AGTTGCTT_R1_xxx.fastq.gz https://raw.githubusercontent.com/nf-core/
@BrunoGrandePhD
BrunoGrandePhD / README.md
Created January 12, 2022 21:06
Installing and running Ensembl VEP via vcf2maf

Instructions

These instructions are intended for Linux.

  1. Install Miniconda 3.
  2. Create conda environment using the attached environment.yml file:
    conda env create -n vep -f environment.yml
  3. Download VEP cache and decompress the TAR archive:
@BrunoGrandePhD
BrunoGrandePhD / json_schema.py
Last active February 8, 2022 22:42
Python API for JSON Schema Services on Synapse
# Set up Synapse client and JSON Schema service
import synapseclient
syn = synapseclient.login()
syn.get_available_services() # Output: ['json_schema']
js = syn.service("json_schema")
# Create, manage, and delete a JSON Schema organization
my_org = js.JsonSchemaOrganization("bgrande.test.new")
my_org # Output: JsonSchemaOrganization(name='bgrande.test.new')
my_org.create()
Variable Level
Something Lorem ipsum dolor
Something Lorem ipsum dolor sit
Something Lorem ipsum dolor sit amet
Something Lorem ipsum dolor sit amet consectetur
Something Lorem ipsum dolor sit amet consectetur adipiscing
@BrunoGrandePhD
BrunoGrandePhD / auto-symmetry.md
Last active November 2, 2018 02:48
How to dynamically make a plot symmetrical around 0 in ggplot2
library(ggplot2)

data <- data.frame(x = rnorm(1000, 1))

ggplot(data, aes(x)) + 
  geom_histogram(binwidth = 0.3, boundary = 0) + 
  geom_vline(xintercept = 0)
@BrunoGrandePhD
BrunoGrandePhD / plot_dist.R
Last active October 17, 2018 22:17
Comparison of various ggplot2 geoms for visualizing distributions
library(ggplot2)
library(cowplot) # For better ggplot2 theme
library(ggbeeswarm) # For geom_quasirandom()
set.seed(1)
data <- data.frame(value = c(rnorm(100, -1.8), rnorm(100, 1.8)))
extra <- list(scale_x_discrete(labels = NULL, name = NULL),
scale_y_continuous(name = NULL))