Skip to content

Instantly share code, notes, and snippets.

@kellrott
kellrott / graphql_inspect_query.go
Created April 25, 2019 23:55
Test code to take incoming GraphQL-Go query and inspect the AST for sub fields
package main
import (
"encoding/json"
"fmt"
"log"
"github.com/graphql-go/graphql"
"github.com/graphql-go/graphql/language/ast"
)
@kellrott
kellrott / SeqAlign.ipynb
Created October 10, 2018 15:49
Sequence Alignment
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python
"""
This script scans a directory for files then loads the file into library
Sample call:
python galaxy_lib_sync.py [--apikey <api_key>] <api_url> /data/folder "API Imports"
NOTE: The upload method used requires the data library filesystem upload allow_library_path_paste
"""
import os
@kellrott
kellrott / synapse_galaxy_sync.py
Last active August 29, 2015 14:00
Synapse to Galaxy Sync
#!/usr/bin/env python
"""
Sample call:
python synapse_galaxy_sync.py <api_key> <api_url> syn12345
NOTE: The upload method used requires the data library filesystem upload allow_library_path_paste
"""
import os
import shutil
@kellrott
kellrott / hyperquick.go
Created January 28, 2013 18:33
A GO implementation of the hyper geometric value calculation algorithm found at http://www.sciencedirect.com/science/article/pii/S1570866706000499
package hypergeometric
func invJm(n, x, N, m float64) float64 {
return (1-x/(m+1))/(1-(n-1-x)/(N-1-m));
}
func HyperQuick(n,x,N,M int64) float64 {
/*
Given N balls, M of which are black and the rest are white,
what is the probability C(n,x,N,M) that out of n balls selected