Skip to content

Instantly share code, notes, and snippets.

View BrunoGrandePhD's full-sized avatar

Bruno Grande BrunoGrandePhD

View GitHub Profile
gender eat_out weight
F 0 110
F 0 114
F 0 115
F 0 110
F 0 125
F 0 140
F 0 130
F 0 145
F 0 158
<html>
<head>
<title>Unix Lab Web Page Example</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="Bioinformatics, Fiona Brinkman, course">
<meta name="description" content="This is a template file to help you learn about HTML.">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p><b><font size="+2" color="#0000FF">
@BrunoGrandePhD
BrunoGrandePhD / multi-gather.md
Last active July 20, 2018 01:29
Gather (melt) on multiple columns at once
library(data.table)
library(tidyverse)

anscombe

#>    x1 x2 x3 x4    y1   y2    y3    y4
#> 1  10 10 10  8  8.04 9.14  7.46  6.58
#> 2   8  8  8  8  6.95 8.14  6.77  5.76
#> 3  13 13 13  8  7.58 8.74 12.74  7.71
@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))
@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)
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 / 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()
@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:
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/
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