Skip to content

Instantly share code, notes, and snippets.

View dcjones's full-sized avatar

Daniel C. Jones dcjones

View GitHub Profile
@dcjones
dcjones / fasta.jl
Created April 3, 2012 02:22
The fasta benchmark in Julia
const line_width = 60
const alu = strcat(
"GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGG",
"GAGGCCGAGGCGGGCGGATCACCTGAGGTCAGGAGTTCGAGA",
"CCAGCCTGGCCAACATGGTGAAACCCCGTCTCTACTAAAAAT",
"ACAAAAATTAGCCGGGCGTGGTGGCGCGCGCCTGTAATCCCA",
"GCTACTCGGGAGGCTGAGGCAGGAGAATCGCTTGAACCCGGG",
"AGGCGGAGGTTGCAGTGAGCCGAGATCGCGCCACTGCACTCC",
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
x=[ -1.2
-1.19868
-1.1947
-1.18809
-1.17886
-1.16703
-1.15263
-1.1357
-1.11627
# Note: This only works on julia-0.4 currently.
using Bio.Seq
include("fogsaa.jl")
scoring = AlignmentScoring(2, -1, -3, -1)
FOGSAA(
dna"AACGTACGTACAATAGTTTTACGATAACCGATAGCGATACCCATTAGACTATA",
@dcjones
dcjones / gist:9f20218f58e438c96476
Created May 21, 2015 16:17
Random FASTQ entries
function main()
if length(ARGS) < 2
println(STDERR, "Usage: fastq_rnd_seek_proper.jl filename numsamples")
exit()
end
filename = ARGS[1]
numsamples = parse(Int, ARGS[2])
pattern = r"@.+[\n\r]+[A-Z-]+[\n\r]+\+[\n\r]+.+[\n\r]{0,1}"