Posted on

mambo md seeds

Mambo md seeds

Copy raw contents

Copy raw contents

Codes for the functions that were used in the MAMBO algorithm described by Garza et al. (2018). These functions were written on Cython and are intended to be used integrated with COBRApy ( on a python2.7 platform, using a collection of genome-scale metabolic models with model SEED identifiers for metabolites and reactions.

The script “bottom_up_ecology.pyx” contains the functions for: 1) identifying exchange reactions, 2) setting-up an initial environment 3) Performing a Markov-Chain step to determine the accept/reject probabilities for random changes to the environment. In order to use these functions, one must install the prerequisites listed below and compile the script using the “” script.

The functions are written on cython, thus they require compilation. To do this, one can use the terminal command to compile to their working directory:

$ build_ext –inplace

Other ways of compiling Cython code should also be available. Check here

After compilation, the script may be imported into a python script by “import bottom_up_ecology”. An example of usage for maximizing the correlation between steady-state solutions for biomass functions and the relative abundance of species determined by metagenomic experiments is given below. For more details, see Garza et al.(2016).

###Example of MCMC optimization for this example, a python environment is assumed. It is also assumed that one has a group of GSMMs on a python list named “models” and, in the same order, a numpy array of numbers with the relative abundance of bacteria named “relative_abundance”

import bottom_up_ecology_functions as bte

evolution_of_exchange_reactions = <> # A python dictionary to store the results for the MCMC

initial_environment = bte.starting_environment(models) # defines an initial random environment

metabs = initial_environment.keys() # defines the metabolites that will conform the search-space.

for i in xrange(1000): # 1000 Markov chain optimization steps

List of dependencies with the versions that were used for the data described on the manuscript:

  • COBRApy (v. 0.4.1)
  • Numpy (v. 1.11.0)
  • Gurobi (v. 6.5)
  • Cython (v. 0.24)
  • Scipy (v. 0.17.1)

1562 genome-scale metabolic models were used in the study. These models can be obtained from this repository, by downloding the files:

Mambo md seeds

Mambo is an extensible teamspeak 3 chat bot. If you’re using the bot, or have written some scripts for it, please let me know, I’d love to hear what your doing if you don’t mind sharing it.

This project was originally written by MrShankly, and is being updated by Inouju.

  • Erlang (18.0 or later) – there are pre built packages in the Erlang Solutions Downloads page
  • Elixir >1.2
  • Server query login credentials
  • The script gif.ex also requires ImageMagick to be installed.

Some plugins require access to certain APIs:

    for google.ex for google.ex for twitter.ex for wolframalpha.ex for youtube.ex for lastfm.ex

Use the above links to register an account and get your API credentials. If you don’t plan to use the above plugins you can skip this.

Compile and run

When you have a working installation of elixir and the bot is properly configured, download the source code and extract it to a directory of your choosing. Open a terminal window and do the following:

If everything went ok you now have compiled the bot, next step is to actually get it running, you have 2 choices:

To run the bot without a shell and in the background do:

To run the bot with an elixir shell do:

I recommend running the bot with an elixir shell, this way you can have some feedback and easily manage the bot without turning it off (see Managing the bot for more info). In Linux (and Mac OS X too I guess) you can use tmux or screen to keep the shell running. I don’t know about Windows, google is your friend here.

Once you have sorted the dependencies you can start configuring the bot. Everything related to configuration is done in the settings.json file.

  • name : Nickname that will appear in the chat
  • user : Server query username
  • pass : Server query password
  • host : Server ip address
  • port : Server query port
  • bot_id : Bot unique id, it’s important that this value is right or the bot will not work properly
  • admins : List of admins unique id, required if you plan to use the admin.ex script
  • channels : List of the channels the bot will join, this can be either a list of channel ids such as [1, 12, 24] or “all” to join all the channels
  • scripts : List of scripts that the bot will use, put only the scripts you want to use

Use the file settings.sample.json as a guide, edit the values that you don’t like, remove the scripts you don’t want to use from the list and when you’re happy rename it to settings.json .

Mambo by itself doesn’t do much, but don’t worry, it’s extensible via scripting, you can add new functionalities by writting your own scripts and/or using the provided scripts.

Note: Type .help in the chat to know more about the running scripts.

Here’s the full list of provided scripts:

Script Commands
admin.ex .mute , .unmute , .gm <message> , .rename <name>
benis.ex .benis <expression>
brainfuck.ex .bf <brainfuck_expression>
cannedreplies.ex cool , gface , goface , edgyface , dface , ggface , chownface , shrug , .shrug
doge.ex .doge , .doge <amount>
eightball.ex .8ball <question>
gif.ex .gif <gif_link>
google.ex .g <phrase> , .google <phrase> , .img <phrase> , .image <phrase> , .images <phrase>
help.ex .help
lastfm.ex .np , .np < user> , .np set < user>
private.ex .private
quotes.ex .quote , .quote <id> , .quote add <quote> , .quote find <search query> , .quote rm <id
rainbow.ex .r <expression> , .rainbow <expression>
random.ex .roll , .roll <# of dice>d<sides> , .roll <max> , .rock , .paper , .scissors
sux.ex .sux <expression>
title.ex none
translate.ex .tl <phrase> , .translate <phrase> , .translate <input language> <target language> <phrase>
twitter.ex none
urban.ex .ud <term> , .urban <term>
utils.ex .ping , .date , .time , .uptime , .version
whatthecommit.ex .wtc
wolframalpha.ex .wa <expression> , .calc <expression> , .convert <expression> to <units>
youtube.ex .yt <phrase> , .youtube <phrase>

Scripts can either be written in elixir or erlang, they all are gen_event handlers, see [1] and [2] for more info. Look at already written scripts to know how to write your own.

Once you have written your script place it in the lib/scripts folder and add it to the scripts list in the settings.json file.

Scripts will receive notifications of the following events:

Event Notification message
chat message <:msg, >>
private chat message <:privmsg, >>
moved into channel <:move_in, >
moved out of channel <:move_out, >
left the channel :left
entered the channel
  • msg = String.t() – message written in the chat
  • cid = integer() – channel id (channel were the event happened)
  • tcid = integer() – target channel id (the client moved to channel with id tcid )
  • clid = integer() – client id (client that triggered the event)
  • reasonid = integer()
  • name = String.t() – username of the client that triggered the event

The modules Mambo.Bot and Mambo.Brain implement various functions meant to be used by the scripts:

If you need an http client in your script use hackney . If you need to decode or encode json use jsx . They will both be installed when you do mix deps.get during the installation procedure.

Managing the bot

Note: This requires to start the bot with iex -S mix .

All the functions mentioned in exports are available for you to use in an elixir shell.

To manage scripts, load, unload, notify or get a list of the running scripts, use the API from the module Mambo.EventManager .

This should be enough to manage the bot without ever shutting it down, even adding new plugins.

You can get help by making an issue on GitHub, or going to the official thread in the teamspeak forums. If you are already knowledgable about Mambo, please consider contributing for the sake of others.

All files under this repository fall under the MIT License. Check LICENSE for more details.