A Gentle Introduction to Installing RuleBuilder and BioNetGen on a Mac

  1. Download BioNetGen_2.0.48.tar, RuleBuilder.zip, run_network, BNGEditor, and BioLab.
  2. Installing RuleBuilder.
    1. If RuleBuilder.zip has been unzipped, so that you have a directory RuleBuilder, then RuleBuilder has been installed. If it hasn't been unzipped, double click it -- that should do the trick.
    2. To run RuleBuilder, double click on the file RuleBuilder-beta-1.51.jar inside the directory RuleBuilder. You can now define a model or import a bngl file (using File>import in the RuleBuilder file menu).
    3. To run the model using BioNetGen, you must first install BioNetGen as described below, tell RuleBuilder how to find the program BNG2.pl, and tell RuleBuilder where to put output files. Use File>settings to set these the absolute path to BNG2.pl (see discussion of absolute paths below) and to tell RuleBuilder where to put output files.
  3. Installing BioNetGen

    1. Put BioNetGen_2.0.48.tar in a convenient directory (you can use either the Finder or a terminal window to do this) -- perhaps your home directory, ie, /Users/<yourloginname> (this is your working directory when you first open a terminal window) or your desktop (/Users/<yourloginname>/Desktop).

      Note: When I use pointy brackets around a word or phrase, it means you should change the entire word or phrase, including the pointy brackets, to the thing I'm describing. For example, since my loginname is nancyg, I would use /Users/nancyg and /Users/nancyg/Desktop in place of the above.

      Wherever you put the file, figure out the absolute path to the directory.

      Here's a trick you can use on a Mac: use the finder to find a file (or directory, which is a special kind of file). Select the file, and copy it. Now open a terminal window and paste. The result is the absolute pathname for the file. You can use it in a command (eg, type ls followed by a space and then paste) or you can paste it into a text document or almost anywhere else that you need it.

    2. Double-click BioNetGen_2.0.48.tar This should create a directory BioNetGen.

      Inside the BioNetGen directory are a number of subdirectories -- the most interesting are Models2, which contains a collection of models including toy-jim.bngl; Perl2, which contains a number of programs, most importantly BNG2.pl; and bin, which contains some more important programs and which will need to contain run_network (see instructions below).

    3. What is the absolute pathname for BioNetGen/bin? If you have figured this out correctly, you can type the command
      ls <absolutepathname>
      and the Unix shell will respond
      <absolutepathname>
      If you have it wrong, it will respond
      <absolutepathname>: No such file or directory
      Move the file run_network to BioNetGen/bin using the finder or using the mv command in a terminal window. You can always use Spotlight to find it again if it gets lost.
    4. What is the absolute pathname for the directory Perl2 (remember, this is one of the interesting subdirectories of BioNetGen)? In the terminal window, type
      export PATH=$PATH:<absolute_pathname_for_Perl2>This tells the shell where the program is. Once you have told it, then to run BioNetGen, all you have to do is type BNG2.pl. Otherwise you would have to type the entire absolute path name, or else change to the directory where it is and use just the name.
    5. Now change directory to the Models2 directory and type
      BNG2.pl toy-jim.bngl
      to see what happens. You should see something that looks like this (check that the last few lines are the same). If you do, you have installed BioNetGen correctly.
  4. Installing and Running BNGEditor
    1. You must first install BioNetGen.
    2. Unzip BNGEditor.
    3. Open a terminal window and change directory to BNGEditor. The following command makes the file runeditor executable
      chmod +x runeditor
    4. To run BNGEditor, type
      ./runeditor
    5. You probably need to set the path to the location of BNG2.pl (see absolute pathnames, above). To do this, use Run>Set BNG Path, and set it to <absolute_pathname_for_Perl2>/BNG2.pl
  5. Installing and Running BioLab