|
| 1 | +BioCompute Editor |
| 2 | +================= |
| 3 | + |
| 4 | +The BioCompute Editor is a web application that can be used to create and edit BioCompute objects based on BioCompute schema described in the BCO specification document. This editor uses <a href="https://github.com/jdorn/json-editor">JSON Editor</a> developed by Jeremy Dorn. |
| 5 | + |
| 6 | + |
| 7 | +Software requirement |
| 8 | +==================== |
| 9 | +* Any linux operating system |
| 10 | +* MongoDB Community or Enterprise version |
| 11 | + |
| 12 | + |
| 13 | +### MongoDB Installation Example |
| 14 | +If you do not have MongoDB installed on your server, here is an example of [MongoDB installation instruction steps](mongodb_installation.md) steps for CentOs server. |
| 15 | + |
| 16 | + |
| 17 | +### Downloading BioCompute Editor |
| 18 | +Use git clone to clone the bco_editor repository |
| 19 | + |
| 20 | +``` |
| 21 | +git clone https://github.com/biocompute-objects/bco_editor.git |
| 22 | +
|
| 23 | +``` |
| 24 | + |
| 25 | +### BioCompute Editor Setup |
| 26 | +Assuming you have followed [MongoDB installation instructions steps](mongodb_installation.md), edit the config.json file under cgi-bin/conf/ subdirectory to customize it to your server. In the example given below, the name of the mongodb database is "bcodb_1_tst", and requires an authenticated mongodb user who has a "readWrite" role to write to it. In the example config file given below, the mongodb username and password are "bcodbadmin" and "pass123!" respectively. |
| 27 | + |
| 28 | + |
| 29 | +``` |
| 30 | + "dbinfo":{ |
| 31 | + "mongodbname":"bcodb_1_tst" |
| 32 | + ,"mongodbuser":"bcodbadmin" |
| 33 | + ,"mongodbpassword":"bcodbpass" |
| 34 | + ,"sessionlife":3600 |
| 35 | + ,"collections":{ |
| 36 | + "bco":"c_bco" |
| 37 | + ,"counters":"c_counters" |
| 38 | + ,"users":"c_users" |
| 39 | + } |
| 40 | + } |
| 41 | + ,"pathinfo":{ |
| 42 | + "htmlroot":"http://example.com/bco_editor/" |
| 43 | + ,"htmlpath":"/myrepositories/bco_editor/html/" |
| 44 | + } |
| 45 | +
|
| 46 | +``` |
| 47 | + |
| 48 | +As for html and cgi-bin directories, the easiest way (assuming your apache is set to allow following symbolic links) is to make symbolic links from your server html and cgi-bin roots. |
| 49 | + |
| 50 | +``` |
| 51 | + $ sudo ln -s /myrepositories/bco_editor/cgi-bin /var/www/cgi-bin/bco_editor |
| 52 | + $ sudo ln -s /myrepositories/bco_editor/html /var/www/html/bco_editor |
| 53 | +``` |
| 54 | + |
| 55 | +Or you can copy the folders physically. |
| 56 | + |
| 57 | +``` |
| 58 | + $ sudo cp -r /myrepositories/bco_editor/cgi-bin /var/www/cgi-bin/bco_editor |
| 59 | + $ sudo cp -r /myrepositories/bco_editor/html /var/www/html/bco_editor |
| 60 | +``` |
| 61 | + |
| 62 | +You also need to make sure that apache has write access to /var/www/html/bco_editor/log/. |
| 63 | + |
| 64 | +``` |
| 65 | + $ sudo chown -R apache:apache /var/www/html/bco_editor/log/ |
| 66 | +``` |
| 67 | + |
| 68 | +Finally, you need to make sure the htmlRoot and cgiRoot javascript variables in bco_editor/html/index.html are assigned right values |
| 69 | + |
| 70 | +``` |
| 71 | + <script> |
| 72 | + var htmlRoot = '/bco_editor/'; |
| 73 | + var cgiRoot = '/cgi-bin/bco_editor/'; |
| 74 | + </script> |
| 75 | +``` |
| 76 | + |
| 77 | +### Admin Utility |
| 78 | +The script admin_util under cgi-bin/ subdirectory is used to manage the BioCompute Editor portal. Given below are commands (issued from the cgi-bin subdirectory) that can be used to perform various tasks. |
| 79 | + |
| 80 | +``` |
| 81 | +Listing registered users |
| 82 | + $ python admin_util -a list_users |
| 83 | +
|
| 84 | +Registration is public but users cannot login before they are activated using this admin_util tool (read below on how to activate pending registerations). |
| 85 | +
|
| 86 | +Adding new user |
| 87 | + $ python admin_util -a upsert_user -e jim.jones@gmail.com -f James -l Jones -p pass123 -s 1 |
| 88 | +
|
| 89 | +Activating or updating user |
| 90 | + $ python admin_util -a upsert_user -e jim.jones@gmail.com -s 1 |
| 91 | +
|
| 92 | +Removing user |
| 93 | + $ python admin_util -a delete_user -e jim.jones@gmail.com |
| 94 | +
|
| 95 | +Listing BioCompute objects |
| 96 | + $ python admin_util -a list_bco |
| 97 | +
|
| 98 | +Deleting BioCompute object |
| 99 | + $ python admin_util -a delete_bco -o 2 |
| 100 | +
|
| 101 | +``` |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | +### Other Links |
| 106 | +BioCompute Partnership: http://biocomputeobject.org |
| 107 | + |
| 108 | +GitHub repository for BioCompute Objects: |
| 109 | +https://github.com/biocompute-objects/bco_editor |
| 110 | + |
| 111 | + |
| 112 | + |
0 commit comments