Skip to content

Instantly share code, notes, and snippets.

View bsmith89's full-sized avatar

Byron J. Smith bsmith89

View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bsmith89
bsmith89 / Makefile
Created February 5, 2016 19:21
Minorly redacted Makefile for a project using mothur to analyze 16S data.
# ====================
# Project Makefile
# ====================
# User Configuration {{{1
# ====================
# Major targets {{{2
.PHONY: figs res
figs:
# [Partially redacted]
@bsmith89
bsmith89 / gapminder-analysis.ipynb
Last active December 21, 2016 21:16
Example analysis notebook and (*very*) rudimentary notes for a customized python-novice-gapminder. http://blog.byronjsmith.com/python-lesson-balance.html
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bsmith89
bsmith89 / contaminant-removal.sh
Last active March 22, 2017 15:51
A boiled-down version of the commands I use to remove mouse sequence from my Illumina HiSeq reads.
#!/usr/bin/env bash
# Remove pairs which hit the mouse reference.
#
# I haven't tested this script, but you should be able to use the commands in it
# to do your contaminant filtering.
# It would probably be best to feed in fully trimmed reads. Otherwise you
# might want to use "local" mapping.
# See: http://bowtie-bio.sourceforge.net/bowtie2/manual.shtml#end-to-end-alignment-versus-local-alignment
# Adapter trim and quality trim your HiSeq reads
#!/usr/bin/env bash
remote='<PROJECT_PATH_HERE>'
for path in $@
do
dirname=$(dirname $path)
basename=$(basename $path)
mkdir -p "$dirname"
# Use rsync --partial for restartable transfers.
@bsmith89
bsmith89 / .gitattributes
Last active April 5, 2021 23:37
Example files for http://blog.byronjsmith.com/makefile-shortcuts.html, a default makefile for computational research projects
*.ipynb filter=dropoutput_jupyter
*.[tc]sv diff=daff-csv
*.[tc]sv merge=daff-csv
@bsmith89
bsmith89 / ipynb_output_filter.py
Last active August 24, 2022 07:00
Git clean/smudge filter for removing output and line numbers from IPython Notebooks.
#! /usr/bin/env python
"""From http://stackoverflow.com/a/20844506/1951857
To use::
# Add the script to your path
chmod +x path/to/this/ipynb_output_filter.py
echo "*.ipynb filter=dropoutput_ipynb" >> ~/.gitattributes
git config --global core.attributesfile ~/.gitattributes
git config --global filter.dropoutput_ipynb.clean ipynb_output_filter.py