Skip to content

Instantly share code, notes, and snippets.

View jrhawley's full-sized avatar

James Hawley jrhawley

View GitHub Profile
@jrhawley
jrhawley / gene.awk
Created June 19, 2020 16:01
Awk scripts for filtering gene and transcript annotations from GTF files
BEGIN{
# column separated by tabs or `; `
FS="(\\t|; )";
# write output separated by tabs
OFS="\t";
}
{
# only select genes
if (NR > 5 && $3 == "gene") {
# clean gene_id
@jrhawley
jrhawley / README.MD
Created October 4, 2019 18:01 — forked from RichardBronosky/README.MD
cb - A leak-proof tee to the clipboard - Unify the copy and paste commands into one intelligent chainable command.

cb

A leak-proof tee to the clipboard

This script is modeled after tee (see [man tee][2]).

It's like your normal copy and paste commands, but unified and able to sense when you want it to be chainable

Examples

@jrhawley
jrhawley / perl_build_tool.sh
Last active May 27, 2019 17:13
Conda templates
# this is the build file for a set of Perl scripts meant to be used as command line utilities, and not loaded as an explicit module
# this is modelled after HiCUP, a set of Perl scripts that also depend on R scripts and a local module
#!/bin/bash
set -eu -o pipefail
# We copy the tarball's contents (which also includes docs and config files) to $PREFIX/share.
# Then just the Perl scripts are symlinked to $PREFIX/bin.
# There are some additional fixes to the Perl scripts to make them run in the conda environment.
outdir=$PREFIX/share/$PKG_NAME-$PKG_VERSION-$PKG_BUILDNUM
%---Packages
\usepackage[backend=bibtex, citestyle=authoryear, bibstyle=authortitle, dashed=false, maxcitenames=1]{biblatex}
\usepackage[T1]{fontenc}
\usepackage[margin=2.5cm]{geometry}
\usepackage{tocloft}
\usepackage{setspace}
\usepackage{tabularx, threeparttable, etoolbox, sectsty, dsfont, subfiles}
\usepackage{flafter, wrapfig, subfig, float}
\usepackage{pdfpages}
\usepackage[compact,explicit]{titlesec}