Skip to content

Instantly share code, notes, and snippets.

View steve-federowicz's full-sized avatar

Steve Federowicz steve-federowicz

  • UCSD SBRG
  • San Diego, CA
View GitHub Profile
@steve-federowicz
steve-federowicz / gist:f81d88f15c93d88fe628
Last active August 29, 2015 14:08
Bash one-liner for getting total reads of all bam files in a folder with samtools
for i in *.bam; do echo -n -e $i'\t'; samtools flagstat $i | head -n1 | cut -c 1-8; done
@steve-federowicz
steve-federowicz / misfolding.ipynb
Last active August 29, 2015 14:00
quick_protein_folding_analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@steve-federowicz
steve-federowicz / demo
Created April 28, 2014 18:34
om example
{
"metadata": {
"name": "",
"signature": "sha256:1aae1f7a5ceff5b5a6cf0eb36c31f2be3a6f6ffb7d63b276d6d3a150abb85555"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@steve-federowicz
steve-federowicz / postgres_remote_setup
Last active August 29, 2015 13:58
Steps to enable remote postgres connection
1. Add entry to pg_hba.conf (at the bottom of the file) of the form.
host all all USERS-IP md5
(Also note that pg_hba.conf will be in the directory of the default database, usually postgres but can be something else.)
2. Go into postgresql.conf (also in the same database directory with pg_hba.conf) and edit listen_addresses='*'
3. Log into the database under admin account and issue the following commands for username='new_user' on database='host_db' with password='tmp_password' and schema='escherichia'
CREATE ROLE new_user WITH PASSWORD 'tmp_password';