Skip to content

Instantly share code, notes, and snippets.

View ctb's full-sized avatar

C. Titus Brown ctb

View GitHub Profile
@ctb
ctb / README.md
Last active March 20, 2017 17:00

Figure out what kmer(s) match a given hash

Usage:

./get-kmers-for-hashes.py data/GCF_000005845.2_ASM584v2_genomic.fna.gz 31 9061051479453
class: sourmash_signature
email: ''
filename: 0Hour_ATCACG_L002001.1.fq
hash_function: 0.murmur64
signatures:
- abundances: [1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 95, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1,
1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 2, 2, 1,
3, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1,
2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 6, 1, 2,
@ctb
ctb / README.md
Last active December 2, 2016 02:07

Some stuff on sourmash

Note: currently uses the ctb branch of dib-lab/sourmash.

@ctb
ctb / README.md
Last active March 9, 2021 17:15
Cython maps

Here, the .get function on maps is about 1m times slower than the .getitem function. Why?

To run (requires Python 3, Cython, and a C/C++ build environment):

python setup.py build_ext -i
python test.py
@ctb
ctb / README.md
Last active November 8, 2016 12:40
@ctb
ctb / Makefile
Last active November 2, 2016 13:22
Some pydoit stuff for Ethan and Matt et al.
SPG=../../spacegraphcats
all: acido-sim-catlas acido-genome-catlas acido-reads-catlas
clean:
./make-sim-catlas.py acido-chunk-reads data/acido-chunk[12].fa.gz --clean
./make-genome-catlas.py acido-genome data/acido-chunk[12].fa.gz --clean
./recover-reads.py acido-chunk-reads data/acido-chunk1.fa.sig.dump.txt \
acido-chunk1.reads.fa.abundtrim acido-chunk1-1.extract.fa --clean
./recover-reads.py acido-chunk-reads data/acido-chunk1.fa.sig.dump.txt \
@ctb
ctb / bench.py
Created September 4, 2016 04:07
Simple benchmarking script for khmer
import random
import timeit
dna = ['A', 'C', 'G', 'T'] * 10000
random.seed(1)
random.shuffle(dna)
dna = "".join(dna)
import khmer
print(khmer)
kh = khmer._Nodegraph(31, [1])
@ctb
ctb / README.md
Last active May 18, 2016 13:30
level outputs

output from:

for i in 0 1 2 3 4 5;
do
   ../../sourmash/sourmash search_mxt 15genome.catlas.5.mxt *.sig -l $i \
       > /tmp/level${i}.txt
done
@ctb
ctb / gist:a4f2622a02a51ebd2ba7
Created February 1, 2016 17:06
lab discussion of software publications
> If only I were evil-er, I could be the Darth Vader of
> bioinformatics! "I find your publication attempts... disturbing."
"Don't be too proud of this technological terror you've
constructed. The ability to platform a workflow is insignificant
next to the power of the Source."

Keybase proof

I hereby claim:

  • I am ctb on github.
  • I am ctitusbrown (https://keybase.io/ctitusbrown) on keybase.
  • I have a public key whose fingerprint is 5CE0 DDA2 1061 A2E7 BB00 730F 994F 75DD D6C8 935B

To claim this, I am signing this object: