Skip to content

Instantly share code, notes, and snippets.

View zmaas's full-sized avatar
🏡
science

Zachary Maas zmaas

🏡
science
  • BioFrontiers Institute
  • Boulder, CO
  • 04:38 (UTC -06:00)
View GitHub Profile
@zmaas
zmaas / .bashrc
Created February 8, 2022 16:21
Simple PS1
export PS1="\[\e[32;1m\]\u@\[\e[32;1m\]\h:\[\e[36;1m\]\w \[\e[37;0m\]:: \[\e[33;1m\]\A \[\e[37;0m\] \n\[\e[37;1m\]$ \[\e[0m\]"
# Necessary dependencies
import json
import pandas as pd # Not installed by default, might need to be pip
# installed.
# There are a few ways to do this, and this is certainly not the most
# efficient, but it will work.
with open('json_file_path.json', 'r') as json_file_handle:
df = pd.DataFrame( # Load the array into the dataframe
json.loads( # Load the array as JSON
def tpm_normalize_col(col, data):
"TPM normalize a column of our counts data"
rpk = np.divide(col, data["Length"])
scale_factor = np.divide(np.sum(rpk), 1e6)
tpm = np.divide(rpk, scale_factor)
return tpm
tpm_seqdata = seqdata.apply(
lambda x: tpm_normalize_col(x, seqdata)
@zmaas
zmaas / keybase.md
Created October 25, 2019 14:55
Keybase Verification

Keybase proof

I hereby claim:

  • I am zmaas on github.
  • I am zmaas (https://keybase.io/zmaas) on keybase.
  • I have a public key ASBXBOVAB7s76xOJS3VMdG5uBDO1OFIBqZdUyFcwunT18Qo

To claim this, I am signing this object:

#!/bin/bash
set -e
PWD=`pwd`
DD=$PWD/downloads/ # Download Directory
function download {
BASE=`basename $1`
mkdir -p $DD
" Input bar at bottom
let barposition="top"
" Link hints
set linkanimations
" Default paste behavior is unsettling...
unmap p
unmap P