Skip to content

Instantly share code, notes, and snippets.

View jrslagle's full-sized avatar

James Slagle jrslagle

View GitHub Profile
@jrslagle
jrslagle / LPSN_parcer.rb
Created January 1, 2016 10:57
a script to parse bacterial phylogeny from http://www.bacterio.net/-classifphyla.html and print it into a table format.
# original text is from http://www.bacterio.net/-classifphyla.html
# load hard-coded filename LPSN.txt into a string
# create a File object from LPSN.txt
file = open("LPSN.txt") or die "LPSN.txt not found."
lineArray = Array.new
file.each_line {|line|
lineArray.push line
}
file.close()
# todo: parse lines your own way if it helps separate genuses.