Skip to content

Instantly share code, notes, and snippets.

Avatar

Byron Smith bsmith89

View GitHub Profile
View pull_from_remote.sh
#!/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 / contaminant-removal.sh
Last active Mar 22, 2017
A boiled-down version of the commands I use to remove mouse sequence from my Illumina HiSeq reads.
View contaminant-removal.sh
#!/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
View 2017-01-22_hplc_method_comparison.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bsmith89
bsmith89 / gapminder-analysis.ipynb
Last active Dec 21, 2016
Example analysis notebook and (*very*) rudimentary notes for a customized python-novice-gapminder. http://blog.byronjsmith.com/python-lesson-balance.html
View gapminder-analysis.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@bsmith89
bsmith89 / .gitattributes
Last active Apr 5, 2021
Example files for http://blog.byronjsmith.com/makefile-shortcuts.html, a default makefile for computational research projects
View .gitattributes
*.ipynb filter=dropoutput_jupyter
*.[tc]sv diff=daff-csv
*.[tc]sv merge=daff-csv
View python-day-2.ipynb
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 Feb 5, 2016
Minorly redacted Makefile for a project using mothur to analyze 16S data.
View Makefile
# ====================
# Project Makefile
# ====================
# User Configuration {{{1
# ====================
# Major targets {{{2
.PHONY: figs res
figs:
# [Partially redacted]
@bsmith89
bsmith89 / ipynb_output_filter.py
Last active Aug 29, 2015
Git clean/smudge filter for removing output and line numbers from IPython Notebooks.
View ipynb_output_filter.py
#! /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