This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defproject resolve-contig-one "1.0.0-SNAPSHOT" | |
| :dependencies [[org.clojure/clojure "1.2.0"] | |
| [org.clojure/clojure-contrib "1.2.0"] | |
| [clj-redis "0.0.12"]]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (use '[clojure.java.io :only [reader]]) | |
| (use '[clojure.string :only [split]]) | |
| (def read-keys [:id :status :pos-contig :pos-position :pos-strand :neg-contig :neg-position :neg-strand]) | |
| (defn split-line [x] | |
| (split x #"\t")) | |
| (defn create-read [x] | |
| (with-meta |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (use '[clojure.java.io :only [reader]]) | |
| (use '[clojure.string :only [split]]) | |
| (defrecord Read | |
| [id status | |
| pos-contig pos-position pos-strand | |
| neg-contig neg-position neg-strand]) | |
| (defn split-line [x] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env Rscript | |
| library('plyr') | |
| library('ggplot2') | |
| source('lib/r/drop.levels.r') | |
| source('lib/r/find.replace.R') | |
| options(stringsAsFactors = FALSE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| require 'fastercsv' | |
| require 'pp' | |
| map = FCSV.open('addition.csv',:headers => true).inject(Hash.new) do |hash,row| | |
| if row['Gene '] | |
| hash['250327' + row['R124#']] = row['Gene '] | |
| end | |
| hash | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| out | |
| tmp |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Git < Thor | |
| desc "branch", "Name of current branch" | |
| def branch | |
| puts branch_name | |
| end | |
| private | |
| def git(command,args) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'bio' | |
| task :map_ids do | |
| mappings = YAML.load(File.read('data/mapping.yml')) | |
| v2_ids = File.readlines('data/v2_gene_ids.txt').map{|a| a.to_i} | |
| end | |
| task :select do | |
| v2_ids = File.readlines('data/v2_gene_ids.txt').map{|a| a.to_i} | |
| entries = Bio::FlatFile.auto('data/proteins.faa') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Dir['content/markup/*/*'].each do |file| | |
| file =~ /\d+-\d+-\d+/ | |
| date = Regexp.last_match(0) + ' 00:00 GMT' | |
| file =~ /\d+-\d+-\d+-(.+).markdown$/ | |
| title = Regexp.last_match(1) | |
| english_title = title.gsub('-',' ').capitalize | |
| content = File.open(file) do |pipe| | |
| pipe.readline |