Skip to content

Instantly share code, notes, and snippets.

View scienceystuff's full-sized avatar

Bio Informatician scienceystuff

  • Cyberspace
View GitHub Profile
@scienceystuff
scienceystuff / ipa_whitepaper_reg.md
Created February 15, 2019 02:49
IPA White Paper on upstream regulators

See attached

@scienceystuff
scienceystuff / timestamp-bash.sh
Created January 25, 2019 18:17
timestamp in bash
#!/bin/sh
date
# outputs Fri Jan 25 12:10:33 CST 2019
# alternative: add to bash_profile
timestamp() {
date +"%T"
}
@scienceystuff
scienceystuff / timestamp-py.py
Created January 25, 2019 18:09
timestamp in python
import time
import datetime
# credit: squiguy https://stackoverflow.com/a/13891070
t_stamp = time.time()
t_stamp_string = datetime.datetime.fromtimestamp(t_stamp).strftime('%Y-%m-%d %H:%M:%S')
# output: 2019-01-25 12:06:02
t_stamp_string = datetime.datetime.fromtimestamp(t_stamp).strftime('%Y.%m.%d.%H.%M.%S')
# output: 2019.01.25.12.07.16
@scienceystuff
scienceystuff / samtools_tags.py
Created December 17, 2018 18:55
Samtools Tags in a python script, this will be updated as needed
# standard tags for samtools
# format is {name : (type, description)}
# where type is one of: character (A), array-nonspecific (B), real-number (f), hexadecimal-array (H), integer (i), string (Z), reserved (X)
# example usage:
# samtools_tags['BC']
# # outputs 'Barcode sequence identifying the sample'
# samtools_tags_examples['BC']
# # outputs 'ATCACG'
sm_type = {
'i' : 'integer',