Skip to content

Instantly share code, notes, and snippets.

View jerowe's full-sized avatar

Jillian Rowe jerowe

View GitHub Profile
@jerowe
jerowe / nginx_express_conf.md
Last active January 19, 2016 06:05
Nginx and Express Config with Base Url

#Nginx

    #nginx.conf
    location /foo {
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $http_host;
        proxy_set_header X-NginX-Proxy true;
 proxy_pass http://127.0.0.1:3000/foo;
---
global:
- indir: data/raw
- outdir: data/Analysis
- reference: /scratch/Reference_Genomes/Public/Vertebrate_other/Anolis_Carolinensis/AnoCar2.0/anoCar2.fa
- bowtie_tmp_dir: "data/Analysis/{$sample}/Bowtie2/tmp"
- file_rule: (Sample.*)$
- by_sample_outdir: 1
- find_by_dir: 1
rules:
---
use:
- Slurp
- Data::Dumper
global:
- indir: data/processed/rename
- outdir: data/processed
- PROCESSED: data/processed
- ROOT: data/processed
- file_rule: (Sample.*)$
@jerowe
jerowe / find_refs.sh
Last active March 16, 2016 06:22
Reference genomes with lots of things
#!/bin/bash
DATE=`date +%Y-%m-%d--%H-%M-%S`
export RefGenDir="/scratch/Reference_Genomes/Public"
export SoftwareDir="/scratch/gencore/software/bin/build_indices"
read -r -d '' TEMPLATE <<EOF
#HPC queue=adserial
#HPC commands_per_node=12
# loading raw data
gunzip lane1_NoIndex_L001_R1_001.fastq.gz
gunzip lane1_NoIndex_L001_R2_001.fastq.gz
gunzip lane1_NoIndex_L001_R3_001.fastq.gz
# fix barcode headers to match R1 headers
cat lane1_NoIndex_L001_R2_001.fastq | sed 's/2:N:[0-9]\+:/1:N:0:/g' > barcodes.fixed.fastq
# validate mapping file
validate_mapping_file.py -m CDC1_MAP.txt -o corrected_map
#!/usr/bin/env python2
import argparse
import subprocess
import os
parser = argparse.ArgumentParser(description='Install things')
parser.add_argument('--instdir', help='you must supply an installdir')
parser.add_argument('--requirements', nargs='?', help='optionally supply a list of packages to install', required=False)
parser.add_argument('--channels', nargs='+', help='optionally supply a list of channels to search', required=False)
@jerowe
jerowe / Build.PL
Last active July 1, 2016 04:42
perl Build script for conda packages.
use strict;
use warnings;
use Module::Build 0.28;
use File::Find;
our @files = ();
find( \&wanted, ".");
sub wanted {
@jerowe
jerowe / discovar-schema.js
Last active July 23, 2016 12:23
Use loopback to discovar a schema from a datasource
var path = require('path');
var Promise = require('bluebird');
var fs = require('fs');
var app = require(path.resolve(__dirname, '../server/server'));
// Add your datasource here
var ds = app.datasources.chemgenDS;
//Write out your models here
@jerowe
jerowe / init.vim
Created October 27, 2016 08:00
My neovim settings
let mapleader="\\"
syntax on
filetype plugin indent on
call plug#begin('~/.vim/plugged')
Plug 'noahfrederick/vim-neovim-defaults'
Plug 'junegunn/vim-easy-align'
Plug 'SirVer/ultisnips' | Plug 'honza/vim-snippets'
@jerowe
jerowe / gencore_variant_detection_1.0.yml
Created November 8, 2016 06:51
Gencore Variant Detection 1.0 Conda Env Config File
name: gencore_variant_detection_1.0
channels:
- bioconda
- r
- nyuad-cgsb
dependencies:
- perl-hpc-runner-slurm=2.58
- perl-biox-workflow=1.10
- perl-biox-workflow-plugin-fileexists=0.13
- perl-biox-workflow-plugin-filedetails=0.11