次の方法で共有


BioInformatics in Sho: Using the Microsoft Biology Foundation

Beatriz, from the Microsoft Biology Initiative team, recently put up a great post on how to use their Microsoft Biology Foundation (MBF) library from Sho.  Her post gives many more details, but to give you a quick teaser of how easy it is, here is all you have to do to import the library and load up some gene sequences from a FASTA file:

>>> ShoLoadAssembly("c:/Program Files/Microsoft Biology Initiative/1.0/MBF/MBF.dll")
>>> import MBF
>>> filename = "c:\\path\\to\\your\\file.fa"
>>> parser = MBF.IO.SequenceParsers.FindParserByFile(filename)
>>> sequences = parser.Parse(filename)
>>> for x in sequences: print x

CCAGGCTTTAGGTATCACCACTAAAATCTCCAGGGGCAC
TTTCCAGGCTTTAGGTATCACCACTAAAATCTCAAG
GGTATCACCACTAAAATCTCCAGGGGCACCATTGAA
...

 There's of course much more you can do with the MBF tools than just read sequences from files - you can parse sequences, make visualizations, do sequence alignment, multi-sequence alignment, fragment assembly, transcription, translation, pattern matching against sequences, and more (see their MBF training page for more information), all from the .NET language of your choice.  All this functionality is thus available in Sho; using the code is as simple as the small example above.