Skip to content

Instantly share code, notes, and snippets.

@drpowell
drpowell / gist:cc679ceea709dfa3af79
Created July 18, 2014 04:25
Add blastn as a chrome search engine
This allows you to use simple blast search from your chrome location bar. eg. type "bn AGGTTGTATAGTTTGGGGCTCT"
Right-click in the chrome location bar, select "Edit Search Engines"
Scroll to the bottom
- Enter a name, say "blastn"
- Enter a keyword, say "bn"
- Cut-and-paste the snippit below into the URL
https://blast.ncbi.nlm.nih.gov/Blast.cgi?QUERY=%s&db=nucleotide&QUERY_FROM=&QUERY_TO=&QUERYFILE=&GENETIC_CODE=1&JOB_TITLE=&SUBJECTS=&stype=nucleotide&SUBJECTS_FROM=&SUBJECTS_TO=&SUBJECTFILE=&DBTYPE=gc&DATABASE=nr&EQ_MENU=&NUM_ORG=1&EQ_TEXT=&BLAST_PROGRAMS=megaBlast&PHI_PATTERN=&MAX_NUM_SEQ=100&SHORT_QUERY_ADJUST=on&EXPECT=10&WORD_SIZE=28&HSP_RANGE_MAX=0&MATRIX_NAME=PAM30&MATCH_SCORES=1,-2&GAPCOSTS=0 0&COMPOSITION_BASED_STATISTICS=0&FILTER=L&REPEATS=5755&FILTER=m&TEMPLATE_LENGTH=0&TEMPLATE_TYPE=0&PSSM=&I_THRESH=&DI_THRESH=&PSI_PSEUDOCOUNT=&SHOW_OVERVIEW=true&SHOW_LINKOUT=true&GET_SEQUENCE=true&FORMAT_OBJECT=Alignment&FORMAT_TYPE=HTML&ALIGNMENT_VIEW=Pairwise&MASK_CHAR=2&MASK_COLOR=1&DESCRIPTIONS=100&A
module FmtLogHandler
(fmtLogHandler
,logFormatter
) where
import System.Log.Logger
import System.Log
import System.Log.Handler
import System.IO
@drpowell
drpowell / gist:1005798
Created June 3, 2011 03:07
Tom's coding challenge
module Library
def self.leaf_paths_of(paths)
normalized = paths.map {|s| x=s.squeeze('/'); x+='/'}
leafs = normalized.reject { |x| normalized.any? { |a| x != a && a.start_with?(x) } }
leafs.map {|x| x.chomp('/') }.uniq
end
end
@drpowell
drpowell / pin-cpu.c
Created June 25, 2012 03:11
Trivial program to max a single CPU core
main()
{
float t=1;
while(t!=0) {
t+=2;
}
}
@drpowell
drpowell / counts2.csv
Created October 30, 2017 12:50
problem with glmQLFTest()
Feature cdhR-rep1 cdhR-rep2 GppX-rep1 GppX-rep2 luxS-rep1 luxS-rep2 luxS-rep3 wt-rep1 wt-rep2 wt-rep3 Length gene product
PG_0001 491 258 198 442 480 737 651 336 633 286 1422 dnaA chromosomal replication initiator protein DnaA
PG_0002 69 54 45 86 84 72 119 92 94 63 573 hexapeptide transferase family protein
PG_0003 107 45 54 62 47 93 76 72 86 26 1020 membrane protein, putative
PG_0004 145 70 100 45 141 170 85 99 232 95 705 transcriptional regulator, Sir2 family
PG_0005 276 172 104 233 189 475 277 181 269 115 1155 conserved hypothetical protein
PG_0006 140 92 84 118 85 186 169 89 161 47 1329 MATE efflux family protein
PG_0007 10 0 5 0 4 2 0 7 1 0 159 hypothetical protein
PG_0008 0 0 0 0 0 0 0 0 0 0 939 ISPg5 transposase Orf2
PG_0009 0 0 0 0 0 0 0 0 0 0 390 ISPg5 transposase Orf1