Skip to content

Instantly share code, notes, and snippets.

View sr320's full-sized avatar

Steven Roberts sr320

View GitHub Profile
@sr320
sr320 / nbsnap
Last active August 29, 2015 13:56
cd /Volumes/Shoelace/Dropbox/Public/nb
wget --no-check-certificate -N http://genefish.wikispaces.com/Sam%27s+Notebook?f=print
mv Sam\'s\+Notebook\?f\=print _sam.html
tail -n +106 /Volumes/Shoelace/Dropbox/Public/nb/_sam.html > /Volumes/Shoelace/Dropbox/Public/nb/__sam.html
sed 's/h1/h3/g' </Volumes/Shoelace/Dropbox/Public/nb/__sam.html> /Volumes/Shoelace/Dropbox/Public/nb/sam.html
cd /Volumes/Shoelace/Dropbox/Steven/ipython_nb
rsync -avzr *.ipynb /Volumes/Shoelace/Dropbox/Public/ip/nbview/
@sr320
sr320 / blastcheck
Created July 30, 2014 15:26
eimd_quickcheck
{
"metadata": {
"name": "",
"signature": "sha256:a998131beddc729ad529da2eb5f1f69ca26b8ef8a1cfb8a2d294d41b2393c04c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@sr320
sr320 / gist:f535043258d757592bba
Last active August 29, 2015 14:04
eimd morning
#!/bin/bash
#script to start the morning right!
#below line not needed if already mounted.
#open afp://usr:password@maxene.fhl.washington.edu/Students
cd /Volumes/Students/diseases/steven
say lets get ready to have some fun!
ipython notebook
@sr320
sr320 / gist:7196b3d440d40c6fcb9a
Created February 2, 2015 19:23
BiGo: examining statistical differences in two TE subtypes (repeats and wublastx targets)
{
"metadata": {
"name": "",
"signature": "sha256:6a2c4937c9f7b56d5a87f63f909673244ddf55041c4a61246dc2d1054b142b7d"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@sr320
sr320 / gist:491e9d618aa4699ec3fc
Created February 5, 2015 17:51
Stacks on hummingbird
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:43e451368edace0e55cb05d7b11cb77dfffa12b132a73a6993fbf7eaeee0826c"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@sr320
sr320 / From-Ensenada.md
Last active November 17, 2015 01:26
Notebook post on panopea project

There have not been many posts recently, but that is not to say I have not been doing any science. Much of what I have been doing is numerous burst commits on the Panopea transcriptome paper / project. This can be found @ https://github.com/sr320/paper-pano-go.

You can see all the Jupyter nbs in this sub-directory. I will highlight some of my proudest cell moments here:

Ok the first one is so good I will just give you the whole thing except that I will provide just a little more comments ##

!wc -l analyses/Geoduck-transcriptome-v2.tab
@sr320
sr320 / sumcol.sh
Created July 26, 2013 03:13
Summing Column #10 in a tab delimited text file
cat file.txt | awk -F"\t" '{ sum+=$10} END {print sum}'
@sr320
sr320 / CpG OE
Last active December 25, 2015 08:09
Counting C, G, and CpG motifs per sequence in Cgigas gene sequence table
SELECT
CGI_ID,
len(sequence)- len(REPLACE(sequence, 'C', '')) as Ccount,
len(sequence)- len(REPLACE(sequence, 'G', '')) as Gcount,
(len(sequence)- len(REPLACE(sequence, 'G', ''))) + (len(sequence)- len(REPLACE(sequence, 'C', ''))) as C_Gcount,
len(sequence)- len(REPLACE(sequence, 'CG', ' ')) as CpGcount,
len(sequence) as sequence_len,
sequence
FROM [sr320@washington.edu].[qDOD_Cgigas_gene_fasta]​
@sr320
sr320 / gist:6998577
Created October 15, 2013 20:59
cleaning up methratio file
SELECT [chr]
, CAST([pos] as INTEGER) as [pos]
, [strand]
, [context]
, CAST([ratio] as FLOAT) as [ratio]
, CAST([eff_CT_count] as INTEGER) as [eff_CT_count]
, CAST([C_count] as INTEGER) as [C_count]
, CAST([CT_count] as INTEGER) as [CT_count]
, CAST([rev_G_count] as INTEGER) as [rev_G_count]
, CAST([CI_lower] as FLOAT) as [CI_lower]