# File lib/bio/shell/demo.rb, line 30 def all sequence && entry && shell && pdb && true end
# File lib/bio/shell/demo.rb, line 75 def entry run(%[kuma = getobj("gb:AF237819")], "Obtain an entry from GenBank database", false) && run(%[kuma.definition], "Definition of the entry", true) && run(%[kuma.naseq], "Sequence of the entry", true) && run(%[kuma.naseq.translate], "Translate the sequence to protein", true) && run(%[midifile("data/AF237819.mid", kuma.naseq)], "Generate gene music ...", false) && true end
# File lib/bio/shell/demo.rb, line 44 def mito run(%[entry = getent("data/kumamushi.gb")], "Load kumamushi gene from GenBank database entry ...", false) && run(%[disp entry], "Check the contents ...", false) && run(%[kuma = flatparse(entry)], "Parse the database entry ...", true) && run(%[web], "Start BioRuby on Rails...", false) && run(%[puts kuma.entry_id], "Extract entry ID ...", false) && run(%[puts kuma.definition], "Extract definition ...", false) && run(%[gene = kuma.seq], "Extract DNA sequence of the gene ...", true) && run(%[doublehelix(gene)], "Show the sequence in ascii art ...", false) && run(%[seqstat(gene)], "Statistics of the gene ...", false) && run(%[config :color], "Change to color mode...", false) && run(%[seqstat(gene)], "Statistics of the gene ...", false) && #run(%q[codontable], "Codontalble ...", false) && run(%[protein = gene.translate], "Translate DNA into protein ...", true) && run(%[comp = protein.composition], "Composition of the amino acids ...", false) && run(%[pp comp], "Check the composition ...", false) && run(%[puts protein.molecular_weight], "Molecular weight ...", false) && run(%[midifile("data/kumamushi.mid", gene)], "Gene to music ...", false) && run(%[`open "data/kumamushi.mid"`], "Let's listen ...", false) && true end
# File lib/bio/shell/demo.rb, line 91 def pdb run(%[ent_1bl8 = getent("pdb:1bl8")], "Retrieving PDB entry 1BL8 ...", false) && run(%[head ent_1bl8], "Head part of the entry ...", false) && run(%[savefile("1bl8.pdb", ent_1bl8)], "Saving the original entry in file ...", false) && run(%[disp "data/1bl8.pdb"], "Look through the entire entry ...", false) && run(%[pdb_1bl8 = flatparse(ent_1bl8)], "Parsing the entry ...", false) && run(%[pdb_1bl8.entry_id], "Showing the entry ID ...", true) && run(%[pdb_1bl8.each_heterogen { |heterogen| p heterogen.resName }], "Showing each heterogen object ...", false) && true end
# File lib/bio/shell/demo.rb, line 102 def pdb_hetdic # run(%q[het_dic = open("http://deposit.pdb.org/het_dictionary.txt").read], # "Retrieving the het_dic database ...", false) && # run(%q[savefile("data/het_dictionary.txt", het_dic)], # "Saving the file ... ", false) && run(%[het_dic.size], "Bytes of the file ...", true) && run(%[disp "data/het_dictionary.txt"], "Take a look on the contents ...", true) && run(%[flatindex("het_dic", "data/het_dictionary.txt")], "Creating index to make the seaarchable database ...", false) && run(%[ethanol = flatsearch("het_dic", "EOH")], "Search an ethanol entry ...", true) && run(%[osake = flatparse(ethanol)], "Parse the entry ...", true) && run(%[osake.conect], "Showing connect table (conect) of the molecule ...", true) && true end
# File lib/bio/shell/demo.rb, line 66 def sequence run(%[dna = getseq("atgc" * 100)], "Generating DNA sequence ...", true) && run(%[doublehelix dna], "Double helix representation", false) && run(%[protein = dna.translate], "Translate DNA into Protein ...", true) && run(%[protein.molecular_weight], "Calculating molecular weight ...", true) && run(%[protein.composition], "Amino acid composition ...", true) && true end
Generated with the Darkfish Rdoc Generator 2.