Skip to content

Instantly share code, notes, and snippets.

@misshie
misshie / qstat2.rb
Last active October 28, 2016 01:56
Modified GridEngine's qstat command showing longer job names
#!/usr/bin/env ruby
# License: the MIT lincense.
# Copyright: MISHIMA, Hiroyuki hmishima at nagasaki-u.ac.jp, 2015
require 'rexml/document'
class Qstat2
JOBNAME_WIDTH = 65
def initialize
@misshie
misshie / iupac.rb
Last active August 29, 2015 13:56
The table of IUPAC ambiguous nucleic acid notation
iupac = {
"A" => ["A"], # Adenine
"C" => ["C"], # Cytosine
"G" => ["G"], # Guanine
"T" => ["T"], # Thymine
"R" => ["A", "G"], # puRine
"Y" => ["C", "T"], # pYrimidine
"S" => ["G", "C"], # Strong
"W" => ["A", "T"], # Weak
"K" => ["G", "T"], # Keto
@misshie
misshie / viterbi.rb
Created September 18, 2011 12:05
A Ruby implementation of the Viterbi algorithm based on the hidden Markov model (HMM)
# A Ruby implementation of
# the Viterbi algorithm based on the hidden Markov model (HMM)
#
# An original Python code: a Wikipedia page "Viterbi algorithm" at
# http://en.wikipedia.org/wiki/Viterbi_algorithm
#
# Author: MISHIMA, Hiroyuki
#
require 'pp'