This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate data dictionary | |
DESCRIPTIONS <- list(mpg = "Miles Per Gallon") | |
# data dict function | |
data_dict <- function(data, descriptions = NA, print_table = FALSE){ | |
# Adapted from https://github.com/pw2/Data-Dictionary-Function/blob/master/Data%20Dictionary%20Function.R | |
if(!require(pacman)) install.packages("pacman") | |
pacman::p_load('tidyverse', 'psych', 'ggpubr', 'gridExtra', 'knitr', 'data.table') | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ipinfo.io | |
# Retrieve information on your IP address | |
# JSON response | |
curl ipinfo.io | |
# Retrieve just the IP address | |
curl ipinfo.io/ip | |
# Retrieve the hostname |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
for i in `seq 1 22`; | |
do echo ${i}; | |
done; | |
echo "X"; | |
echo "Y"; | |
echo "MT"; | |
} > names.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import groovy.json.JsonOutput | |
json_param_file = "${workflow.projectDir}/pipeline_info/params.json" | |
new File(json_param_file).withWriter('utf-8') { | |
writer -> | |
def json_params = JsonOutput.prettyPrint(JsonOutput.toJson(params)); | |
writer.write(json_params); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# docker build --file manta.Dockerfile -t swantonlab/manta . | |
FROM continuumio/miniconda3 | |
RUN apt-get update && apt-get install -y procps | |
RUN conda config --add channels defaults && \ | |
conda config --add channels bioconda && \ | |
conda config --add channels conda-forge | |
RUN conda create -n manta bioconda::manta=1.6.0 && conda clean -a | |
ENV PATH /opt/conda/envs/manta/bin:$PATH | |
RUN conda env export --name manta > manta.yml |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fd --extension bam --change-older-than "2020-02-26 00:00:00" | head -n 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script will download, index, and prep reference genomes. | |
# Prep N2 reference genome | |
RELEASE=WS274 | |
PROJECT=PRJNA13758 | |
mkdir -p "${PROJECT}.${RELEASE}" && cd "${PROJECT}.${RELEASE}" | |
# Annotation file | |
wget ftp://ftp.ensembl.org/pub/current_gff3/caenorhabditis_elegans/Caenorhabditis_elegans.WBcel235.99.gff3.gz |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ag -o params\\.[A-Za-z\_0-9]+ *.nf | sort | uniq |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function test_igv { | |
cat - > test.${1} | |
igvtools index test.${1} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://stackoverflow.com/questions/10312521/how-to-fetch-all-git-branches | |
git branch -r | grep -v '\->' | while read remote; do git branch --track "${remote#origin/}" "$remote"; done | |
git fetch --all | |
git pull --all |