http://mx.phenomix.org/api.php?action=feedcontributions&user=Matt&feedformat=atom mx Help Wiki - User contributions [en] 2024-03-28T14:22:14Z User contributions MediaWiki 1.20.0 http://mx.phenomix.org/index.php/Installation Installation 2014-04-03T17:00:33Z <p>Matt: /* Get the required gems */</p> <hr /> <div>&lt;div style=&quot;float:right;margin: 10px;&quot;&gt;__TOC__&lt;/div&gt;<br /> <br /> <br /> &lt;div style=&quot;color:red;padding:1em;border:1px solid orange;text-align:center;&quot;&gt;'''The new code base is on [https://github.com/mx3/mx github]'''&lt;/div&gt;<br /> <br /> == Overview ==<br /> <br /> mx can be installed locally for development or testing purposes or on a server. If you're seriously considering supporting a mx installation in your lab or workplace you should have an intermediate to advanced programmer or server admin on your team. &lt;span style=&quot;color:red;&quot;&gt;Because of the relatively rapid updates to mx we recommend that you should presently use the edge branch.&lt;/span&gt;<br /> <br /> == Dependencies ==<br /> <br /> === Required ===<br /> <br /> ==== [http://www.mysql.com/ MySQL] ==== <br /> <br /> * MySQL 5.n is in use on development and production servers. Its easiest to install the community addition with the startup item, then reboot.<br /> <br /> * There are many examples of how to install and [[secure your mysql|secure MySQL]] on your machine available on whe world-wide web. If you are using OS X chances are you have a copy installed already (it will need configuration if you haven't already done so).<br /> <br /> ===== Mx specific settings =====<br /> * Typically you add settings to /etc/my.cnf.<br /> * First, check that the value of the `socket` setting matches that provided in /config/database.yml, looking something like this in the .cnf file.<br /> [client]<br /> socket = /var/mysql/mysql.sock<br /> [mysqld]<br /> socket = /var/mysql/mysql.sock<br /> <br /> * Second, add the following line under the [mysqld] settings.<br /> [mysqld]<br /> max_allowed_packet = 32M<br /> <br /> ==== [http://www.ruby-lang.org/en/ Ruby] ==== <br /> <br /> * If you don't already have Ruby (most *nix systems come with it installed) you can find more about it [http://www.ruby-lang.org here]. Ruby v. 1.8.7 or higher is now required. We recommend building from source. Get the source [http://www.ruby-lang.org/en/ here].<br /> <br /> ==== [http://docs.rubygems.org/read/chapter/3 RubyGems ] ====<br /> <br /> * Its easiest to install several Ruby packages (including Rails) through the Ruby package manager RubyGems. <br /> <br /> ''&lt;span style=&quot;color:red;&quot;&gt;IMPORTANT&lt;/span&gt;: There are issues with the rubygems &gt; 1.7.2 and mx, the last known rubygem version to work is 1.7.2.'' This issue (and many others) should disappear when we finish the jump to Rails 3. A possible ''untested'' workaround is to use Rails 2.3.12.<br /> <br /> ==== [http://www.rubyonrails.org/ Rails] ==== <br /> <br /> ''' Production is now using Rails 2.3.10. Install the required version with the -v flag. '''<br /> <br /> * Do (appending --no-rdoc will speed things up, but not install local documentation):<br /> <br /> gem install rails -v=2.3.10 --include-dependencies --no-rdoc<br /> <br /> === Optional ===<br /> <br /> ==== [http://www.imagemagick.org/script/index.php ImageMagik] ====<br /> <br /> * NOTE: This is optional, and not required for MorphBank images.<br /> * The tools 'convert' and 'identify' must be in your ''systems'' PATH, copying them to /usr/bin generally works. You do not need a rubygem hook.<br /> * Ensure that you have created the necessary paths for storing the images.<br /> * If possible install the additional jpg, tiff, png, and gs libraries before installing ImageMagick, this will let you handle additional image formats.<br /> <br /> ==== Passenger ====<br /> <br /> * Used only on a production server.<br /> * If you are running passenger, on CentOS/RHEL 5 servers there is a default daily chron that deletes some necessary passenger files in /tmp/passenger.PID. The easiest way to deal with this is to set the PassengerTempDir in the apache conf to something else, like so:<br /> <br /> PassengerTempDir /some_other_tmp_dir<br /> <br /> == Installation == <br /> <br /> === Stepwise overview ===<br /> <br /> # Install the required software (see above). There are numerous external sites that will help with installing these software, as such their installation is not documented here.<br /> # Download the mx source and required gems.<br /> # Create the database(s)<br /> # Populate the database with some initial data<br /> # Configure the local environment<br /> # Configure your folders<br /> # Start the server<br /> <br /> === Download the mx source ===<br /> <br /> The preferred method is now to checkout the source from [http://sourceforge.net/projects/mx-database/ Sourceforge] using [[http://subversion.tigris.org/ SVN]]]. <br /> <br /> &lt;em&gt;The (trunk) branch is now permanently deprecated, ignore it.&lt;/em&gt; <br /> <br /> For developers or those wanting to see the latest changes an edge branch that should be relatively stable but may contain production restricting commits is here:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database/branches/edge your_local_folder_name_here<br /> <br /> Several site-specific branches are being added, these are not recommended as a base for new installs but do provide a lot of example code. To grab everything you can just do:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database your_local_folder_name_here<br /> <br /> === Get the required gems ===<br /> <br /> Depending on the checkout you downloaded you might need to install the ruby-debug gem ''first'' (note for Ruby 1.9.1 users you will likely need to install the ruby-debug19 gem).<br /> <br /> ''sudo'' gem install ruby-debug<br /> <br /> You need various Ruby gems listed in the ''environment.rb''. The easiest way to install them all is to enter your mx folder (you should see the folders 'app', 'config' etc. if you are in the right place) and type:<br /> <br /> ''sudo'' rake gems:install<br /> <br /> ==== Mysql ====<br /> <br /> &lt;span style=&quot;color:red;&quot;&gt;'''Note that the native mysql gem is nearly always problematic, and you might have to work at getting it installed.'''&lt;/span&gt; <br /> You can try:<br /> <br /> sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br /> <br /> On RHEL (after ''yum install mysql-devel'') this worked:<br /> <br /> gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config <br /> <br /> On Ubuntu 9.10 ([https://help.ubuntu.com/community/RubyOnRails see also here]) this worked:<br /> <br /> sudo apt-get install libmysqlclient-dev<br /> sudo gem install mysql<br /> <br /> See below or [http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard here], and more recently [http://techliberty.blogspot.com/ here] for other possible solutions if you have no luck with the above. <br /> <br /> ==== mx on 64 bit Mavericks ====<br /> <br /> 4/3/2014 - . Using RVM with both Ruby 1.8.7 andMysql 5.1.73 installed in 64 bits, it is possible to use the mysql2 gem + activerecord-mysql2-adapter (0.0.3). You will have to edit the line around 30 in /trunk/vendor/plugins/redhillonrails_core/lib/red_hill_consulting/core/active_record/base.rb like so: ' column.case_sensitive = true # index.case_sensitive?'. To install under RVM you'll need gem version 1.8.24. Force the install. You'll have many deprecation warnings when starting the server, these can be ignored..<br /> ' . If you have lots of Specimen data you may need to add 'max_allowed_packet = 32M' in the [mysqld] section of your my.cnf.<br /> <br /> === Configuring the database ===<br /> <br /> ==== Create the databases ====<br /> <br /> These instructions follow the defaults included in the database.yml file. Edit that file to change your configuration as necessary. <br /> <br /> If you haven't yet create the databases (don't forget the ';' for mysql <br /> commands):<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> create database mx_test;<br /> create database mx_development;<br /> create database mx_production;<br /> <br /> You'll need to add a MySQL account so that the app can access the database:<br /> <br /> GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';<br /> <br /> Repeat the above but swap out the word development for 'test' and 'production'.<br /> <br /> ==== Build the tables and populate some initial data ====<br /> <br /> &lt;div style=&quot;text-align:center; color:green;&quot;&gt;''Do this step if you have are starting from scratch, and have no existing mx dump to work with. If you have a mx data dump (see below) skip to &quot;Import existing data&quot;.''&lt;/div&gt;<br /> <br /> Exit mysql and navigate to the root of your mx install. Create the development database with the rake task (you may need to prefix with 'sudo'):<br /> <br /> rake db:migrate RAILS_ENV=development<br /> <br /> You can create the production database like so if necessary:<br /> <br /> rake db:migrate RAILS_ENV=production<br /> <br /> To create the test database do<br /> <br /> rake db:test:clone_structure<br /> <br /> Anytime the source is updated just repeat the rake db:migrate and your database will be updated if there are changes. There are several [[Rake tasks| rake tasks available for dumping and restoring data]], make sure to check them out.<br /> <br /> A single user with administrator privileges will have to be manually added to the 'people' tables prior to using mx. Once this user is added additional users can be added from the mx interface.<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> use mx_development;<br /> insert into people (first_name, last_name, login, password, is_admin,<br /> creates_projects) values ('joe', 'smith', 'jsmith', sha1('foosomepwdbar'), 1,1);<br /> <br /> * IMPORTANT - you must wrap 'foo' and 'bar' around your password in the above line. In the example above the password for 'jsmith' is 'somepwd' #<br /> <br /> While in the MySQL client you'll also want to add a root node to your taxonomic names hierarchy (this assumes the admin you created has id 1).<br /> <br /> insert into taxon_names (name, cached_display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);<br /> <br /> ==== Importing existing data ====<br /> <br /> If you have access to an existing dump of mx data (it will look something like &quot;2011_08_19_110700.sql&quot;) generated by you or an existing mx adminstrator, then you need not do the 'Build the tables and populate some initial data' step. To use this data copy the .sql file ''mx_root''/db/dumps, then do this<br /> <br /> rake mx:db:restore_last RAILS_ENV=development<br /> <br /> This will both build the database and load your data dump into it.<br /> <br /> === Configure the mx environment ===<br /> <br /> If you are starting with a new mx, i.e. not a version in production somehwere, you'll need to configure the local environment.<br /> <br /> Open<br /> <br /> /config/initializers/local_config.rb <br /> <br /> and update the various FOO variables as needed, see comments therein.<br /> <br /> You'll need to grab [http://code.google.com/apis/maps/signup.html GoogleMaps API keys] and add them to BOTH of:<br /> <br /> GMAPS_KEY_PRODUCTION<br /> GMAPS_KEY_DEVELOPMENT<br /> <br /> Finally, replace the emails in<br /> <br /> ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bob@gmail.com)<br /> <br /> with those you want e-mails to be sent to when errors are thrown.<br /> <br /> === Configure your operating system environment ===<br /> <br /> ==== Specific to *nix systems: check the path of your MySQL socket ====<br /> <br /> By default, the path of mysql.sock is set to<br /> /tmp/mysql.sock<br /> <br /> However, several distributions do not use this path. To change it edit the file<br /> config/database.yml<br /> and replace the 3 occurrences of<br /> socket: /tmp/mysql.sock<br /> by your actual path. For instance in Ubuntu<br /> socket: /var/run/mysqld/mysqld.sock<br /> <br /> === Configuring file and image storage ===<br /> <br /> Edit the /config/initializers/local_config.rb file and configure the various FILE_PATH variables, for development they can typically be left alone. If left as-is they correspond to the folders that you'll need to create as below:<br /> <br /> public/files<br /> public/files/images<br /> public/files/images/big<br /> public/files/images/medium<br /> public/files/images/original<br /> public/files/images/thumb<br /> public/files/pdfs<br /> public/files/datasets<br /> public/files/chromatograms<br /> <br /> On a *nix system you can also use a symbolic link to keep your images, pdfs, and datasets elsewhere.<br /> <br /> === Test your configurations/environment ===<br /> <br /> Do<br /> <br /> rake test<br /> <br /> This runs the numerous internal tests, it take some time. While you'll typically see a few fail the vast majority should pass. If they do chances are your environment is correctly configured.<br /> <br /> === Start the server (development) ===<br /> <br /> Try starting the sever, depending on your operating system you may have to set some permission.<br /> <br /> ruby script/server<br /> <br /> Navigate to [http://127.0.0.1:3000 http://127.0.0.1:3000]<br /> <br /> You may see the following problems at this point (solution in []).<br /> <br /> * &lt;em&gt;schema.rb doesn't exist yet. Run &quot;rake db:migrate&quot; to create it then try again.&lt;/em&gt; [Run &quot;rake db:migrate&quot; (and see below).<br /> * &lt;em&gt;Rails Error: Unable to access log file.&lt;/em&gt; [Change permissions on the /log folder so that it is writable. In development just do &quot;chmod 755 log&quot;. Then, in the log folder, do &quot;echo '' &gt; development.log&quot;, followed by &quot;chmod 666 development.log&quot;. If you are on a mac or linux machine you may need to prefix these commands with &quot;sudo&quot;.]<br /> <br /> === Troubleshooting ===<br /> <br /> ==== Configuring my.cnf ====<br /> <br /> If you get a 'Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:' you can add the following line to your my.cnf under [mysqld]: 'max_allowed_packet = 32M;'.<br /> <br /> == Usage (development) ==<br /> <br /> === Using the server/application ===<br /> <br /> To test/develop in development mode navigate to the root of your installation and type<br /> <br /> ruby script/server<br /> <br /> Open a web browser and browse to <br /> <br /> 127.0.0.1:3000<br /> <br /> You should see a login page. If you see the mx page but no login fields then you have not correctly added your administrator user.<br /> <br /> Once logged in navigate to <br /> <br /> 127.0.0.1:3000/admin<br /> <br /> to create new projects.<br /> <br /> You can also navigate to <br /> <br /> 127.0.0.1:3000/account/signup<br /> <br /> to add regular users.<br /> <br /> == Upgrading ==<br /> <br /> Once you have mx installed upgrading should be relatively straightforward. First, make a backup of both the database and the application, we assume you know where your data reside by this point, and we assume that you know that things can go horribly wrong. After backing up replace the old source with the new (see below for comments). Then, make sure you have the required Rails/Gems (plugins are included in the source already). Finally, run the rake task to update the database like so:<br /> <br /> rake db:migrate RAILS_ENV=&lt;development|production&gt;<br /> <br /> Its always a good idea to run the test suite as well, this will give you a good idea of what possible problems you might still have.<br /> <br /> rake test<br /> <br /> == Usage (production) ==<br /> <br /> Production installation follows, for the most part, the same installation process as above. See the Rails homepage for setting up the server. Note that only users with accounts can see data in a clean installation of mx, i.e. you must manually configure the installation to make data available to the public.<br /> <br /> If you plan to set up a production installation of mx, it would be a good idea to read chapter 27 of ''Agile Web Development with Rails'', second edition.<br /> <br /> === Production with no customizations ===<br /> <br /> We don't have Capistrano working, so essentially you'll have to devise your own method of rolling to production, we use an SVN checkout for now.<br /> <br /> === Production with customizations ===<br /> <br /> If you have begun to build public front ends you know where your custom code resides (/public, /app/models/public, /app/controllers/public, /app/views/public), manage these as you like.<br /> <br /> === Apache configuration ===<br /> <br /> If you plan to use the API functionality you'll need add the following to your virtual .conf:<br /> <br /> AllowEncodedSlashes On<br /> <br /> == Legacy notes on installation / configuration == <br /> <br /> * These notes: [[one person's experience with installing mx]] also include Mac install instructions, but these do not include Ruby install instructions.<br /> * Very good installation notes for Ubuntu hardy can be found on the [[http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails Slicehost blog]] (November, 2008).<br /> * Notes for [[Server configuration | Server set up note here]].</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2014-04-03T16:41:22Z <p>Matt: </p> <hr /> <div><br /> <br /> &lt;div style=&quot;padding:1em;border:1px solid red;margin:1em;&quot;&gt;<br /> &lt;p&gt; The codebase of Mx will being rolled into a new initiative from the Species File Group, [http://taxonworks.org TaxonWorks]. Contact --[[User:Matt|matt]] ([[User talk:Matt|talk]]) 10:06, 25 March 2013 (CDT) if you have questions, or would like to join this effort. Details and resources to follow in May, 2013. &lt;/p&gt;<br /> &lt;/div&gt;<br /> <br /> <br /> <br /> &lt;div style=&quot;padding:1em;border:1px solid orange;margin:1em;&quot;&gt; &lt;p&gt; The content here is becoming dated, but is largely accurate for the (very-stable) SVN-archived version of mx on Sourceforge (edge branch) that uses Rails version 2.3.18. &lt;/p&gt;<br /> <br /> &lt;p&gt; Ongoing development and updates are now on [http://github.com/mx3 GitHub]. Please also join the new [https://groups.google.com/forum/?fromgroups#!forum/mx-developers developers list]. &lt;/p&gt; &lt;/div&gt;<br /> <br /> <br /> == Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://www.phenomix.org/phenomix/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/User:Matt User:Matt 2013-03-25T15:07:39Z <p>Matt: </p> <hr /> <div><br /> diapriid on<br /> <br /> gmail, skype</div> Matt http://mx.phenomix.org/index.php/User:Matt User:Matt 2013-03-25T15:07:10Z <p>Matt: Created page with &quot; diapriid at gmail&quot;</p> <hr /> <div><br /> diapriid at gmail</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2013-03-25T15:06:35Z <p>Matt: </p> <hr /> <div><br /> <br /> &lt;div style=&quot;padding:1em;border:1px solid red;margin:1em;&quot;&gt;<br /> &lt;p&gt; The codebase of Mx will being rolled into a new initiative from the Species File Group, starting this year. Contact --[[User:Matt|matt]] ([[User talk:Matt|talk]]) 10:06, 25 March 2013 (CDT) if you have questions, or would like to join this effort. Details and resources to follow in May, 2013. &lt;/p&gt;<br /> &lt;/div&gt;<br /> <br /> <br /> <br /> &lt;div style=&quot;padding:1em;border:1px solid orange;margin:1em;&quot;&gt; &lt;p&gt; The content here is becoming dated, but is largely accurate for the (very-stable) SVN-archived version of mx on Sourceforge (edge branch) that uses Rails version 2.3.17. &lt;/p&gt;<br /> <br /> &lt;p&gt; Ongoing development and updates are now on [http://github.com/mx3 GitHub]. Please also join the new [https://groups.google.com/forum/?fromgroups#!forum/mx-developers developers list]. &lt;/p&gt; &lt;/div&gt;<br /> <br /> <br /> == Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://www.phenomix.org/phenomix/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2013-03-15T14:04:03Z <p>Matt: </p> <hr /> <div><br /> <br /> &lt;div style=&quot;padding:1em;border:1px solid orange;margin:1em;&quot;&gt; &lt;p&gt; The content here is becoming dated, but is largely accurate for the (very-stable) SVN-archived version of mx on Sourceforge (edge branch) that uses Rails version 2.3.17. &lt;/p&gt;<br /> <br /> &lt;p&gt; Ongoing development and updates are now on [http://github.com/mx3 GitHub]. Please also join the new [https://groups.google.com/forum/?fromgroups#!forum/mx-developers developers list]. &lt;/p&gt; &lt;/div&gt;<br /> <br /> <br /> == Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://www.phenomix.org/phenomix/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2013-03-15T13:10:20Z <p>Matt: </p> <hr /> <div><br /> <br /> &lt;div style=&quot;padding:1em;border:1px solid orange;margin:1em;&quot;&gt; &lt;p&gt; The content here is becoming dated, but is largely accurate for the (very-stable) SVN-archived version of mx on Sourceforge (edge branch) that uses Rails version 2.3.17. &lt;/p&gt;<br /> <br /> &lt;p&gt; Ongoing development and updates are now on [http://github.com/mx3 GitHub]. Please also join the new [https://groups.google.com/forum/?fromgroups#!forum/mx-developers developers list]. &lt;/p&gt; &lt;/div&gt;<br /> <br /> == Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://www.phenomix.org/phenomix/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/User:Bomorris User:Bomorris 2013-01-31T00:57:14Z <p>Matt: Creating user page for new user.</p> <hr /> <div></div> Matt http://mx.phenomix.org/index.php/User_talk:Bomorris User talk:Bomorris 2013-01-31T00:57:14Z <p>Matt: Welcome!</p> <hr /> <div>'''Welcome to ''mx Help Wiki''!'''<br /> We hope you will contribute much and well.<br /> You will probably want to read the [[Help:Contents|help pages]].<br /> Again, welcome and have fun! [[User:Matt|matt]] ([[User talk:Matt|talk]]) 18:57, 30 January 2013 (CST)</div> Matt http://mx.phenomix.org/index.php/User:Mgosby User:Mgosby 2012-11-27T16:13:47Z <p>Matt: Creating user page for new user.</p> <hr /> <div></div> Matt http://mx.phenomix.org/index.php/User_talk:Mgosby User talk:Mgosby 2012-11-27T16:13:47Z <p>Matt: Welcome!</p> <hr /> <div>'''Welcome to ''mx Help Wiki''!'''<br /> We hope you will contribute much and well.<br /> You will probably want to read the [[Help:Contents|help pages]].<br /> Again, welcome and have fun! [[User:Matt|matt]] ([[User talk:Matt|talk]]) 10:13, 27 November 2012 (CST)</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2012-11-26T18:31:51Z <p>Matt: </p> <hr /> <div><br /> <br /> &lt;div style=&quot;padding:1em;border:1px solid orange;margin:1em;&quot;&gt; &lt;p&gt; The content here is becoming dated, but is largely accurate for the (very-stable) SVN-archived version of mx on Sourceforge (edge branch) that uses Rails 2.3.10 version. &lt;/p&gt;<br /> <br /> &lt;p&gt; Ongoing development and updates are now on [http://github.com/mx3 GitHub]. Please also join the new [https://groups.google.com/forum/?fromgroups#!forum/mx-developers developers list]. &lt;/p&gt; &lt;/div&gt;<br /> <br /> == Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://www.phenomix.org/phenomix/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/User:Danleehr User:Danleehr 2012-11-26T18:16:26Z <p>Matt: Creating user page for new user.</p> <hr /> <div></div> Matt http://mx.phenomix.org/index.php/User_talk:Danleehr User talk:Danleehr 2012-11-26T18:16:26Z <p>Matt: Welcome!</p> <hr /> <div>'''Welcome to ''mx Help Wiki''!'''<br /> We hope you will contribute much and well.<br /> You will probably want to read the [[Help:Contents|help pages]].<br /> Again, welcome and have fun! [[User:Matt|matt]] ([[User talk:Matt|talk]]) 12:16, 26 November 2012 (CST)</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2012-11-26T04:25:47Z <p>Matt: /* The hack-mx workshop */</p> <hr /> <div>== Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://www.phenomix.org/phenomix/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2012-11-26T01:45:49Z <p>Matt: </p> <hr /> <div>== Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://phenomix.org/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2012-11-26T01:45:37Z <p>Matt: </p> <hr /> <div>== Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://phenomix.org/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> test<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/Installation Installation 2012-04-17T21:42:15Z <p>Matt: /* Overview */</p> <hr /> <div>&lt;div style=&quot;float:right;margin: 10px;&quot;&gt;__TOC__&lt;/div&gt;<br /> <br /> <br /> &lt;div style=&quot;color:red;padding:1em;border:1px solid orange;text-align:center;&quot;&gt;'''The new code base is on [https://github.com/mx3/mx github]'''&lt;/div&gt;<br /> <br /> == Overview ==<br /> <br /> mx can be installed locally for development or testing purposes or on a server. If you're seriously considering supporting a mx installation in your lab or workplace you should have an intermediate to advanced programmer or server admin on your team. &lt;span style=&quot;color:red;&quot;&gt;Because of the relatively rapid updates to mx we recommend that you should presently use the edge branch.&lt;/span&gt;<br /> <br /> == Dependencies ==<br /> <br /> === Required ===<br /> <br /> ==== [http://www.mysql.com/ MySQL] ==== <br /> <br /> * MySQL 5.n is in use on development and production servers. Its easiest to install the community addition with the startup item, then reboot.<br /> <br /> * There are many examples of how to install and [[secure your mysql|secure MySQL]] on your machine available on whe world-wide web. If you are using OS X chances are you have a copy installed already (it will need configuration if you haven't already done so).<br /> <br /> ===== Mx specific settings =====<br /> * Typically you add settings to /etc/my.cnf.<br /> * First, check that the value of the `socket` setting matches that provided in /config/database.yml, looking something like this in the .cnf file.<br /> [client]<br /> socket = /var/mysql/mysql.sock<br /> [mysqld]<br /> socket = /var/mysql/mysql.sock<br /> <br /> * Second, add the following line under the [mysqld] settings.<br /> [mysqld]<br /> max_allowed_packet = 32M<br /> <br /> ==== [http://www.ruby-lang.org/en/ Ruby] ==== <br /> <br /> * If you don't already have Ruby (most *nix systems come with it installed) you can find more about it [http://www.ruby-lang.org here]. Ruby v. 1.8.7 or higher is now required. We recommend building from source. Get the source [http://www.ruby-lang.org/en/ here].<br /> <br /> ==== [http://docs.rubygems.org/read/chapter/3 RubyGems ] ====<br /> <br /> * Its easiest to install several Ruby packages (including Rails) through the Ruby package manager RubyGems. <br /> <br /> ''&lt;span style=&quot;color:red;&quot;&gt;IMPORTANT&lt;/span&gt;: There are issues with the rubygems &gt; 1.7.2 and mx, the last known rubygem version to work is 1.7.2.'' This issue (and many others) should disappear when we finish the jump to Rails 3. A possible ''untested'' workaround is to use Rails 2.3.12.<br /> <br /> ==== [http://www.rubyonrails.org/ Rails] ==== <br /> <br /> ''' Production is now using Rails 2.3.10. Install the required version with the -v flag. '''<br /> <br /> * Do (appending --no-rdoc will speed things up, but not install local documentation):<br /> <br /> gem install rails -v=2.3.10 --include-dependencies --no-rdoc<br /> <br /> === Optional ===<br /> <br /> ==== [http://www.imagemagick.org/script/index.php ImageMagik] ====<br /> <br /> * NOTE: This is optional, and not required for MorphBank images.<br /> * The tools 'convert' and 'identify' must be in your ''systems'' PATH, copying them to /usr/bin generally works. You do not need a rubygem hook.<br /> * Ensure that you have created the necessary paths for storing the images.<br /> * If possible install the additional jpg, tiff, png, and gs libraries before installing ImageMagick, this will let you handle additional image formats.<br /> <br /> ==== Passenger ====<br /> <br /> * Used only on a production server.<br /> * If you are running passenger, on CentOS/RHEL 5 servers there is a default daily chron that deletes some necessary passenger files in /tmp/passenger.PID. The easiest way to deal with this is to set the PassengerTempDir in the apache conf to something else, like so:<br /> <br /> PassengerTempDir /some_other_tmp_dir<br /> <br /> == Installation == <br /> <br /> === Stepwise overview ===<br /> <br /> # Install the required software (see above). There are numerous external sites that will help with installing these software, as such their installation is not documented here.<br /> # Download the mx source and required gems.<br /> # Create the database(s)<br /> # Populate the database with some initial data<br /> # Configure the local environment<br /> # Configure your folders<br /> # Start the server<br /> <br /> === Download the mx source ===<br /> <br /> The preferred method is now to checkout the source from [http://sourceforge.net/projects/mx-database/ Sourceforge] using [[http://subversion.tigris.org/ SVN]]]. <br /> <br /> &lt;em&gt;The (trunk) branch is now permanently deprecated, ignore it.&lt;/em&gt; <br /> <br /> For developers or those wanting to see the latest changes an edge branch that should be relatively stable but may contain production restricting commits is here:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database/branches/edge your_local_folder_name_here<br /> <br /> Several site-specific branches are being added, these are not recommended as a base for new installs but do provide a lot of example code. To grab everything you can just do:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database your_local_folder_name_here<br /> <br /> === Get the required gems ===<br /> <br /> Depending on the checkout you downloaded you might need to install the ruby-debug gem ''first'' (note for Ruby 1.9.1 users you will likely need to install the ruby-debug19 gem).<br /> <br /> ''sudo'' gem install ruby-debug<br /> <br /> You need various Ruby gems listed in the ''environment.rb''. The easiest way to install them all is to enter your mx folder (you should see the folders 'app', 'config' etc. if you are in the right place) and type:<br /> <br /> ''sudo'' rake gems:install<br /> <br /> &lt;span style=&quot;color:red;&quot;&gt;'''Note that the native mysql gem is nearly always problematic, and you might have to work at getting it installed.'''&lt;/span&gt; <br /> You can try:<br /> <br /> sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br /> <br /> On RHEL (after ''yum install mysql-devel'') this worked:<br /> <br /> gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config <br /> <br /> On Ubuntu 9.10 ([https://help.ubuntu.com/community/RubyOnRails see also here]) this worked:<br /> <br /> sudo apt-get install libmysqlclient-dev<br /> sudo gem install mysql<br /> <br /> See [http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard here], or [http://www.macruby.org/trac/wiki/Troubleshooting here], and more recently [http://techliberty.blogspot.com/ here] for other possible solutions if you have no luck with the above.<br /> <br /> === Configuring the database ===<br /> <br /> ==== Create the databases ====<br /> <br /> These instructions follow the defaults included in the database.yml file. Edit that file to change your configuration as necessary. <br /> <br /> If you haven't yet create the databases (don't forget the ';' for mysql <br /> commands):<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> create database mx_test;<br /> create database mx_development;<br /> create database mx_production;<br /> <br /> You'll need to add a MySQL account so that the app can access the database:<br /> <br /> GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';<br /> <br /> Repeat the above but swap out the word development for 'test' and 'production'.<br /> <br /> ==== Build the tables and populate some initial data ====<br /> <br /> &lt;div style=&quot;text-align:center; color:green;&quot;&gt;''Do this step if you have are starting from scratch, and have no existing mx dump to work with. If you have a mx data dump (see below) skip to &quot;Import existing data&quot;.''&lt;/div&gt;<br /> <br /> Exit mysql and navigate to the root of your mx install. Create the development database with the rake task (you may need to prefix with 'sudo'):<br /> <br /> rake db:migrate RAILS_ENV=development<br /> <br /> You can create the production database like so if necessary:<br /> <br /> rake db:migrate RAILS_ENV=production<br /> <br /> To create the test database do<br /> <br /> rake db:test:clone_structure<br /> <br /> Anytime the source is updated just repeat the rake db:migrate and your database will be updated if there are changes. There are several [[Rake tasks| rake tasks available for dumping and restoring data]], make sure to check them out.<br /> <br /> A single user with administrator privileges will have to be manually added to the 'people' tables prior to using mx. Once this user is added additional users can be added from the mx interface.<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> use mx_development;<br /> insert into people (first_name, last_name, login, password, is_admin,<br /> creates_projects) values ('joe', 'smith', 'jsmith', sha1('foosomepwdbar'), 1,1);<br /> <br /> * IMPORTANT - you must wrap 'foo' and 'bar' around your password in the above line. In the example above the password for 'jsmith' is 'somepwd' #<br /> <br /> While in the MySQL client you'll also want to add a root node to your taxonomic names hierarchy (this assumes the admin you created has id 1).<br /> <br /> insert into taxon_names (name, cached_display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);<br /> <br /> ==== Importing existing data ====<br /> <br /> If you have access to an existing dump of mx data (it will look something like &quot;2011_08_19_110700.sql&quot;) generated by you or an existing mx adminstrator, then you need not do the 'Build the tables and populate some initial data' step. To use this data copy the .sql file ''mx_root''/db/dumps, then do this<br /> <br /> rake mx:db:restore_last RAILS_ENV=development<br /> <br /> This will both build the database and load your data dump into it.<br /> <br /> === Configure the mx environment ===<br /> <br /> If you are starting with a new mx, i.e. not a version in production somehwere, you'll need to configure the local environment.<br /> <br /> Open<br /> <br /> /config/initializers/local_config.rb <br /> <br /> and update the various FOO variables as needed, see comments therein.<br /> <br /> You'll need to grab [http://code.google.com/apis/maps/signup.html GoogleMaps API keys] and add them to BOTH of:<br /> <br /> GMAPS_KEY_PRODUCTION<br /> GMAPS_KEY_DEVELOPMENT<br /> <br /> Finally, replace the emails in<br /> <br /> ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bob@gmail.com)<br /> <br /> with those you want e-mails to be sent to when errors are thrown.<br /> <br /> === Configure your operating system environment ===<br /> <br /> ==== Specific to *nix systems: check the path of your MySQL socket ====<br /> <br /> By default, the path of mysql.sock is set to<br /> /tmp/mysql.sock<br /> <br /> However, several distributions do not use this path. To change it edit the file<br /> config/database.yml<br /> and replace the 3 occurrences of<br /> socket: /tmp/mysql.sock<br /> by your actual path. For instance in Ubuntu<br /> socket: /var/run/mysqld/mysqld.sock<br /> <br /> === Configuring file and image storage ===<br /> <br /> Edit the /config/initializers/local_config.rb file and configure the various FILE_PATH variables, for development they can typically be left alone. If left as-is they correspond to the folders that you'll need to create as below:<br /> <br /> public/files<br /> public/files/images<br /> public/files/images/big<br /> public/files/images/medium<br /> public/files/images/original<br /> public/files/images/thumb<br /> public/files/pdfs<br /> public/files/datasets<br /> public/files/chromatograms<br /> <br /> On a *nix system you can also use a symbolic link to keep your images, pdfs, and datasets elsewhere.<br /> <br /> === Test your configurations/environment ===<br /> <br /> Do<br /> <br /> rake test<br /> <br /> This runs the numerous internal tests, it take some time. While you'll typically see a few fail the vast majority should pass. If they do chances are your environment is correctly configured.<br /> <br /> === Start the server (development) ===<br /> <br /> Try starting the sever, depending on your operating system you may have to set some permission.<br /> <br /> ruby script/server<br /> <br /> Navigate to [http://127.0.0.1:3000 http://127.0.0.1:3000]<br /> <br /> You may see the following problems at this point (solution in []).<br /> <br /> * &lt;em&gt;schema.rb doesn't exist yet. Run &quot;rake db:migrate&quot; to create it then try again.&lt;/em&gt; [Run &quot;rake db:migrate&quot; (and see below).<br /> * &lt;em&gt;Rails Error: Unable to access log file.&lt;/em&gt; [Change permissions on the /log folder so that it is writable. In development just do &quot;chmod 755 log&quot;. Then, in the log folder, do &quot;echo '' &gt; development.log&quot;, followed by &quot;chmod 666 development.log&quot;. If you are on a mac or linux machine you may need to prefix these commands with &quot;sudo&quot;.]<br /> <br /> === Troubleshooting ===<br /> <br /> ==== Configuring my.cnf ====<br /> <br /> If you get a 'Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:' you can add the following line to your my.cnf under [mysqld]: 'max_allowed_packet = 32M;'.<br /> <br /> == Usage (development) ==<br /> <br /> === Using the server/application ===<br /> <br /> To test/develop in development mode navigate to the root of your installation and type<br /> <br /> ruby script/server<br /> <br /> Open a web browser and browse to <br /> <br /> 127.0.0.1:3000<br /> <br /> You should see a login page. If you see the mx page but no login fields then you have not correctly added your administrator user.<br /> <br /> Once logged in navigate to <br /> <br /> 127.0.0.1:3000/admin<br /> <br /> to create new projects.<br /> <br /> You can also navigate to <br /> <br /> 127.0.0.1:3000/account/signup<br /> <br /> to add regular users.<br /> <br /> == Upgrading ==<br /> <br /> Once you have mx installed upgrading should be relatively straightforward. First, make a backup of both the database and the application, we assume you know where your data reside by this point, and we assume that you know that things can go horribly wrong. After backing up replace the old source with the new (see below for comments). Then, make sure you have the required Rails/Gems (plugins are included in the source already). Finally, run the rake task to update the database like so:<br /> <br /> rake db:migrate RAILS_ENV=&lt;development|production&gt;<br /> <br /> Its always a good idea to run the test suite as well, this will give you a good idea of what possible problems you might still have.<br /> <br /> rake test<br /> <br /> == Usage (production) ==<br /> <br /> Production installation follows, for the most part, the same installation process as above. See the Rails homepage for setting up the server. Note that only users with accounts can see data in a clean installation of mx, i.e. you must manually configure the installation to make data available to the public.<br /> <br /> If you plan to set up a production installation of mx, it would be a good idea to read chapter 27 of ''Agile Web Development with Rails'', second edition.<br /> <br /> === Production with no customizations ===<br /> <br /> We don't have Capistrano working, so essentially you'll have to devise your own method of rolling to production, we use an SVN checkout for now.<br /> <br /> === Production with customizations ===<br /> <br /> If you have begun to build public front ends you know where your custom code resides (/public, /app/models/public, /app/controllers/public, /app/views/public), manage these as you like.<br /> <br /> === Apache configuration ===<br /> <br /> If you plan to use the API functionality you'll need add the following to your virtual .conf:<br /> <br /> AllowEncodedSlashes On<br /> <br /> == Legacy notes on installation / configuration == <br /> <br /> * These notes: [[one person's experience with installing mx]] also include Mac install instructions, but these do not include Ruby install instructions.<br /> * Very good installation notes for Ubuntu hardy can be found on the [[http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails Slicehost blog]] (November, 2008).<br /> * Notes for [[Server configuration | Server set up note here]].</div> Matt http://mx.phenomix.org/index.php/App/specimen/batch_load App/specimen/batch load 2012-02-15T20:53:50Z <p>Matt: /* Valid column heads on batch files */</p> <hr /> <div>== Overview ==<br /> <br /> The batch loading functionality found here allows you to add specimen OR lot records from a spreadsheet format. Data are typically compiled in excel or google docs then exported to a tab delimited format which is read by the importer.<br /> <br /> '''Important: Most records require the use of an Identifier, which in turn needs a [[App/namespace|Namespace]].'''<br /> <br /> == Summary steps ==<br /> <br /> # Assemble the import file.<br /> #* Each row must contain a header BUT not headers need be matches to those possible headers listed below. If they do not match they are ignored!<br /> #* The first row must contain the headers for each row. Only those columns that match the list below will be read. Columns with headers not matching are ignored.<br /> #* Each row represents a single specimen or lot.<br /> #* Each row must &lt;em&gt;match an existing OTU already in mx&lt;/em&gt;. Matching of row data to the existing is possible via various mechanisms (see table below).<br /> #** One possible mechanism for quickly adding new OTUs that don't exist is to use [http://code.google.com/p/google-refine/ Google Refine] on an 'otu_name' column.<br /> #**# Create a new project in Google refine by selecting the text file that you will later import.<br /> #**# Click on the arrow to the right of the 'otu_name' column and select 'Facet'-&gt;'Text facet'. A window to the left will highlight all unique names (as an side this is ''very'' useful for debugging your data, see the Google Refine tutorials). <br /> #**# Click '123 choices&quot; in the facet box, this will bring up a text file that you can copy/paste to a new text file.<br /> #**# Modify that file to include only 1 OTU name / line. <br /> #**# Navigate to OTU-&gt;'more options'-&gt;'batch load' and load your unique OTU names.<br /> # Once the file is ready for testing follow the batch loading instructions in mx.<br /> <br /> == Saving from Excel ==<br /> <br /> If you work in Excel to capture your data you'll be exporting it prior to loading it. Your data should be saved in one of the following formats, (topmost preferred).<br /> <br /> {|<br /> ! File format<br /> ! Character Encoding<br /> |-<br /> |Tab Delimited Text (.txt)<br /> |MACINTOSH or ISO-8859-1<br /> |-<br /> |Windows Formatted Text (.txt)<br /> |ISO-8859-1<br /> |-<br /> |UTF-16 Unicode Text (.txt)<br /> |UTF-16LE<br /> |}<br /> <br /> == Columns ==<br /> <br /> === Required for both lots and specimens ===<br /> <br /> otu_id<br /> <br /> ''or (both allowed if they match)''<br /> otu_name <br /> <br /> '''OR'''<br /> <br /> taxon_name_id<br /> ''or (both allowed if they match)''<br /> taxon_name_string<br /> <br /> === Required for Lots ===<br /> <br /> count<br /> <br /> === Required for Specimens ===<br /> <br /> identifier <br /> <br /> === Optional for Specimens and Lots ===<br /> <br /> '''One of'''<br /> <br /> ce_id<br /> verbatim_label<br /> <br /> '''One of'''<br /> <br /> repository_id<br /> repository_coden<br /> <br /> '''Any of'''<br /> sex<br /> stage<br /> notes<br /> data_entry_by<br /> <br /> === Optional for lots ===<br /> <br /> identifier<br /> <br /> === Optional for specimens ===<br /> <br /> '''An additional determination'''<br /> <br /> ''One of''<br /> det_name<br /> det_otu_id <br /> <br /> '' and any of ''<br /> determiner<br /> det_year<br /> det_basis<br /> <br /> '''A type designation'''<br /> <br /> ''both of''<br /> type<br /> type_of_taxon_name_id<br /> <br /> == Valid column heads on batch files == <br /> <br /> {|<br /> ! column headers<br /> ! description<br /> ! restrictions<br /> |-<br /> |ce_id<br /> |A mx collecting event id.<br /> |If present in a row then ''verbatim_label'' must be empty. <br /> |-<br /> |count<br /> |Total specimens in a lot.<br /> |If present in a row then ''identifier'' must be empty.<br /> |-<br /> |data_entry_by<br /> |A mx uses login. If supplied then all creator/updator fields are set to this person. If not supplied the creator is the person logged in.<br /> |None.<br /> |-<br /> |det_basis<br /> |Free text describing how the specimen. determination was made.<br /> |Requires ''det_name'' or 'det_otu_id' to be included. Not applicable to lots.<br /> |-<br /> |det_name<br /> |Free text determination of specimen.<br /> |If present in a row then ''det_otu_id'' must be empty. Not applicable to lots.<br /> |-<br /> |det_otu_id <br /> |An id of an mx OTU that the specimen is determined as.<br /> |If present in a row then ''det_name'' must be empty. Not applicable to lots.<br /> |-<br /> |det_year<br /> |A year in which a determination is made. <br /> |Requires ''det_otu_id'' or ''det_name'' to be present. Not applicable to lots.<br /> |-<br /> |determiner<br /> |Free text indicator of determiner.<br /> |Requires ''det_otu_id'' or ''det_name'' to be present. Not applicable to lots.<br /> |-<br /> |identifier<br /> |An identifier in the form of &quot;namespace identifier&quot;, like &quot;NCSU 1234&quot;. <br /> |The namespace must be present in mx. Applicable to lots or specimens. Identifiers must be unique with an mx project (i.e. lots and specimens can not share identifiers).<br /> |-<br /> |notes<br /> |Free text notes.<br /> |None.<br /> |-<br /> |otu_id<br /> |A mx OTU id to which a specimen or lot is primarily attached.<br /> |Must match an OTU found by ''otu_name'' if ''otu_name'' is also provided.<br /> |-<br /> |otu_name <br /> |A mx OTU ''name'' (not associated taxon name, manuscript name, nor matrix name) which identifies the specimen. <br /> |The named OTU must exist in the database. Must match the OTU indicated by ''otu_id'' if ''otu_id'' is also provide. If ''otu_id'' is not provided must be unique for the given project. <br /> |-<br /> |repository_coden<br /> |A mx repository coden, like &quot;NCSU&quot;.<br /> |Must match a coden in repositories. If provided ''repository_id'' must be empty.<br /> |-<br /> |repository_id<br /> |A mx id matching a respository.<br /> |Must match a coden in repositories. If provided ''repository_coden'' must be empty.<br /> |-<br /> |sex<br /> |Free text determination of sex, standard use is &quot;male&quot; or &quot;female&quot;. Applicable to lots or specimens. <br /> |None.<br /> |-<br /> |stage<br /> |Free text determination of stage. Applicable to lots or specimens.<br /> |None.<br /> |-<br /> |taxon_name_id<br /> |Mx taxon name id which identifiers a specimen.<br /> |Must be tied to a single OTU. Applicable to specimens only. Must be empty if ''otu_id'' or ''otu_name'' is provided. Must match ''taxon_name_string'' if ''taxon_name_string'' is provided.<br /> |-<br /> |taxon_name_string<br /> |Mx taxon name which identifiers a specimen.<br /> |Name in mx must be unique, and associated id must be tied to a single OTU. Applicable to specimens only. Must be empty if ''otu_id'' or ''otu_name'' is provided. Must match ''taxon_name_id'' if ''taxon_name_string'' is provided. At present matches only single word string. <br /> |-<br /> |type<br /> |The code recognized type status of the specimen. Like &quot;holotype&quot;, &quot;paratype&quot;, &quot;syntype&quot;, &quot;neotype&quot;, or &quot;paralectotype&quot;. Not for non governed things like &quot;allotype&quot;.<br /> |Applicable to specimens only. Must be used in combination with ''type_of_taxon_name_id''.<br /> |-<br /> |type_of_taxon_name_id<br /> |The mx taxon name id that the ''type'' refers to.<br /> |Applicable to specimens only. Must be used in combination with ''type''. <br /> |-<br /> |verbatim_label<br /> |The verbatim text of the label(s) of the specimen or lot. Identical ''verbatim_labels'' are tied to a single collecting event in mx. Individual lines can be separated with &quot;&amp;#124;&amp;#124;&quot;, individual labels can be separated with &quot;++&quot;. &quot;&amp;#124;&amp;#124;&quot; and '++' will be replaced with one and two new lines respectively.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |latitude<br /> |A real number in decimal degrees format.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |longitude<br /> |A real number in decimal degrees format. <br /> |Must be empty if ce_id is provided.<br /> |-<br /> |elev_min<br /> |A real number indicating the minimum elevation of the elevation range.<br /> |Must be empty if ce_id is provided. Required if elev_max provided. <br /> |-<br /> |elev_max<br /> |A real number indicating the maximum elevation of the elevation range.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |elev_unit<br /> |&quot;feet&quot; or &quot;meters&quot;. <br /> |Must be empty if ce_id is provided. Required if elev_min included. <br /> |-<br /> |geog_id<br /> |An mx id for a geographic unit that indicates the finest geographic unit for the collecting event.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |method<br /> |Interpreted version of the method given on the label (not verbatim).<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |locality<br /> |Free text description of the locality, e.g. &quot;1.5 km N Calgary&quot;<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_d<br /> |Verbatim, max 2 character field in roman numeral or integer. <br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_m<br /> |Verbatim, max 2 character field in roman numeral or integer.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_y<br /> |Verbatim, max 4 character integer.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |ed_d<br /> |Verbatim, max 2 character field in roman numeral or integer. <br /> |Must be empty if ce_id is provided. <br /> |-<br /> |ed_m<br /> |Verbatim, max 2 character field in roman numeral or integer.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |ed_y<br /> |Verbatim, max 4 character integer.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |time_start<br /> |Hours:Minutes, like &quot;13:23&quot;. 24 hour clock.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |time_end<br /> |Hours:Minutes, like &quot;13:23&quot;. 24 hour clock.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |collectors<br /> |Verbatim.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |micro_habitat<br /> |Verbatim.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |macro_habitat<br /> |Verbatim.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |country<br /> |As matched in the geogs table.<br /> |Must be empty if ce_id is provided. Used to match against the geog table. <br /> |-<br /> |state<br /> |As matched in the geogs table.<br /> |Must be empty if ce_id is provided. Used to match against the geog table.<br /> |- <br /> |county<br /> |As matched in the geogs table.<br /> |Must be empty if ce_id is provided. Used to match against the geog table. <br /> |}</div> Matt http://mx.phenomix.org/index.php/App/public/ontology/analyze App/public/ontology/analyze 2012-02-13T20:05:01Z <p>Matt: /* Steps to publishing a &quot;URI Table&quot; */</p> <hr /> <div>== Overview ==<br /> <br /> &lt;span style=&quot;color:#cb1502&quot;&gt;The goal of this tool is to allow for explicit and unambiguous reference to ontological concepts within publications, other websites, or applications through the use of Universal Resource Identifiers (URIs).&lt;/span&gt; This sounds a little confusing, but the idea is straightforward. Labels used in publications are often not explicitly defined, and when read by others they may be misinterpreted (e.g through synonymy or homonomy). By including in your publication or website a link to a specific ontological concept, for example an anatomical structure, you can state your intention as to how a given word (label/term) is used in your particular paper- &quot;by using the word 'head' I mean the thing that is defined [http://purl.obolibrary.org/obo/HAO_0000397 in this manner] in this ontology.&quot;. Nearly all taxonomic publications, for example, include a statement in their Materials and Methods that indicates where the descriptive terminology in the present work is defined. The analyzer is a powerful tool to aid in the production of these statements. &lt;span style=&quot;color:#cb1502&quot;&gt;Like with all tools the results of the analyzer should not be published without careful review (see 'Steps to publishing' below).&lt;/span&gt; For an example of the analyzer in action [http://glossary.hymao.org/projects/32/public/ontology/analyze see here].<br /> <br /> == Usage ==<br /> <br /> # Cut and paste your text, or type directly into the large text box. Try to limit the text in the box to that pertinent to the underlying ontology being analyzed against.<br /> # Fill out the reCAPTHCA form. If you need help click the small &quot;?&quot; on that form. This is used to prevent spamming or other attacks. Each time you click the submit button you will have to recomplete the CAPTCHA, even after you have successfully filled one out the first time.<br /> # Click Submit and wait (you'll see a little turning spinner).<br /> # Results are displayed in below in a simple table format.<br /> # Download the results by clicking the &quot;Download&quot; button to the right. The downloaded file is a tab delimited file that can be opened directly in a spreadsheet program or other text editor.<br /> # For additional details click on &quot;Detailed breakdown&quot;. This will show exactly what text is parsed, where in the text matches were found, a list of synonyms, and a list of homonyms.<br /> <br /> == Interpreting results ==<br /> <br /> * The result table has 4 columns<br /> *# The word in the text that matched.<br /> *# The concept(s) within the ontology that word is tied to. &lt;span style=&quot;color:#cb1502&quot;&gt;It is important to note these are &lt;em&gt;NOT&lt;/em&gt; identical concepts, in fact each concept is distinctly different is some way, or there is a problem with the ontology.&lt;span style=&quot;color:#cb1502&quot;&gt;<br /> *# The URI. This is the unique link to the concept immediately to its left.<br /> *# The reference(s) which use the label in column 1 in the manner of the definition of column 3. Click on a reference to see its full citation.<br /> * The Detailed breakdown will additional aid in interpreting the results of the analysis, it is broken down by:<br /> *# Analyzed Text - Use this to confirm that your text was submitted correctly. The analyzer may truncate your text if it is too long, or if it finds other problems.<br /> *# Match Map - The words that were matched and returned are highlighted in the context of the text here. Green highlights indicate a 1:1 mapping (i.e. there is only one concept present for the given label. Red highlights indicate that there are multiple concepts for a given term.<br /> *# Matched Terms - A simple comma separated list of the terms that were found.<br /> *# Matched Classes - A list of the concepts that were matched.<br /> *# Homonymous Terms - Of those terms that matched those that are homonyms.<br /> *# Synonymous Terms - Of those terms that matched those that are synonyms.<br /> <br /> == Steps to publishing a &quot;URI Table&quot; ==<br /> <br /> The result table could be formatted for publication, and in the portal.hymao.org example it is particularly useful for Materials and Methods or appendix sections of taxonomic treatise. Here is an outline of the steps you should take (additional functionality is available to those producing descriptions or phylogenetic matrices within mx).<br /> <br /> # Generate a result as above.<br /> # Click the download button to download the result. The result is a text file, with column separated by tabs. Use a text editor with many columns to view it, or, alternatively, open excel, and import the file (most versions of excel will *not* import the file correctly simply by clicking on it). <br /> # &lt;em&gt;Carefully review each conceptual match.&lt;/em&gt; This is the most important step- do not assume that the result is using the label you have provided in the manner you mean to provide.<br /> # If multiple concepts (definitions) are available for a given label choose the one that you feel matches your concept. &lt;em&gt; Delete the other lines &lt;/em&gt;. Repeat for all the labels in the table.<br /> <br /> Include the table in the pertinent section of the paper. Include extra columns as needed for notes or comments. It is highly recommend that you pass along your table to the curators of the ontology for them to review, particularly if you have comments or questions.<br /> <br /> == Future work ==<br /> <br /> Providing a printed URI within the text of a publication, for example a taxonomic description, is a first step to modelling the statements we make in publications in a formal manner. There are many other potentially more useful applications of a URI. Including URIs in any form, however, within a publication, will ultimately make the document more interesting to computer-driven indexing of the document. For example all the papers of with the URI referencing the &quot;head of a hymenopteran&quot; could be discovered if each publications about hymenopteran heads included the URI &quot;http://purl.obolibrary.org/obo/HAO_0000397&quot;. They could still use the label &quot;head&quot; alone, but a search could differentiate between &quot;head&quot; in the context of hymenopterans, and &quot;head&quot; of, for example, community organizations. <br /> <br /> == Similar functionality ==<br /> <br /> Other sites provide similar services, most notably Bioportal. The functionality within mx allows for a result integrated with other functionality to be returned, and for context specific to mx to be provided.</div> Matt http://mx.phenomix.org/index.php/App/public/ontology/analyze App/public/ontology/analyze 2012-02-13T20:01:48Z <p>Matt: /* Interpreting results */</p> <hr /> <div>== Overview ==<br /> <br /> &lt;span style=&quot;color:#cb1502&quot;&gt;The goal of this tool is to allow for explicit and unambiguous reference to ontological concepts within publications, other websites, or applications through the use of Universal Resource Identifiers (URIs).&lt;/span&gt; This sounds a little confusing, but the idea is straightforward. Labels used in publications are often not explicitly defined, and when read by others they may be misinterpreted (e.g through synonymy or homonomy). By including in your publication or website a link to a specific ontological concept, for example an anatomical structure, you can state your intention as to how a given word (label/term) is used in your particular paper- &quot;by using the word 'head' I mean the thing that is defined [http://purl.obolibrary.org/obo/HAO_0000397 in this manner] in this ontology.&quot;. Nearly all taxonomic publications, for example, include a statement in their Materials and Methods that indicates where the descriptive terminology in the present work is defined. The analyzer is a powerful tool to aid in the production of these statements. &lt;span style=&quot;color:#cb1502&quot;&gt;Like with all tools the results of the analyzer should not be published without careful review (see 'Steps to publishing' below).&lt;/span&gt; For an example of the analyzer in action [http://glossary.hymao.org/projects/32/public/ontology/analyze see here].<br /> <br /> == Usage ==<br /> <br /> # Cut and paste your text, or type directly into the large text box. Try to limit the text in the box to that pertinent to the underlying ontology being analyzed against.<br /> # Fill out the reCAPTHCA form. If you need help click the small &quot;?&quot; on that form. This is used to prevent spamming or other attacks. Each time you click the submit button you will have to recomplete the CAPTCHA, even after you have successfully filled one out the first time.<br /> # Click Submit and wait (you'll see a little turning spinner).<br /> # Results are displayed in below in a simple table format.<br /> # Download the results by clicking the &quot;Download&quot; button to the right. The downloaded file is a tab delimited file that can be opened directly in a spreadsheet program or other text editor.<br /> # For additional details click on &quot;Detailed breakdown&quot;. This will show exactly what text is parsed, where in the text matches were found, a list of synonyms, and a list of homonyms.<br /> <br /> == Interpreting results ==<br /> <br /> * The result table has 4 columns<br /> *# The word in the text that matched.<br /> *# The concept(s) within the ontology that word is tied to. &lt;span style=&quot;color:#cb1502&quot;&gt;It is important to note these are &lt;em&gt;NOT&lt;/em&gt; identical concepts, in fact each concept is distinctly different is some way, or there is a problem with the ontology.&lt;span style=&quot;color:#cb1502&quot;&gt;<br /> *# The URI. This is the unique link to the concept immediately to its left.<br /> *# The reference(s) which use the label in column 1 in the manner of the definition of column 3. Click on a reference to see its full citation.<br /> * The Detailed breakdown will additional aid in interpreting the results of the analysis, it is broken down by:<br /> *# Analyzed Text - Use this to confirm that your text was submitted correctly. The analyzer may truncate your text if it is too long, or if it finds other problems.<br /> *# Match Map - The words that were matched and returned are highlighted in the context of the text here. Green highlights indicate a 1:1 mapping (i.e. there is only one concept present for the given label. Red highlights indicate that there are multiple concepts for a given term.<br /> *# Matched Terms - A simple comma separated list of the terms that were found.<br /> *# Matched Classes - A list of the concepts that were matched.<br /> *# Homonymous Terms - Of those terms that matched those that are homonyms.<br /> *# Synonymous Terms - Of those terms that matched those that are synonyms.<br /> <br /> == Steps to publishing a &quot;URI Table&quot; ==<br /> <br /> The result table could be formatted for publication, and in the hymglossary example it is particularly useful for Materials and Methods or appendix sections of taxonomic treatise. Here is an outline of the steps you should take (additional functionality is available to those producing descriptions or phylogenetic matrices within mx).<br /> <br /> # Generate a result as above.<br /> # Download the table and open it in excel.<br /> # &lt;em&gt;Carefully review each conceptual match.&lt;/em&gt; This is the most important step- do not assume that the result is using the label you have provided in the manner you mean to provide.<br /> # If multiple concepts (definitions) are available for a given label choose the one that you feel matches your concept. &lt;em&gt; Delete the other lines &lt;/em&gt;. Repeat for all the labels in the table.<br /> <br /> Include the table in the pertinent section of the paper. Include extra columns as needed for notes or comments. It is highly recommend that you pass along your table to the curators of the ontology for them to review, particularly if you have comments or questions.<br /> <br /> == Future work ==<br /> <br /> Providing a printed URI within the text of a publication, for example a taxonomic description, is a first step to modelling the statements we make in publications in a formal manner. There are many other potentially more useful applications of a URI. Including URIs in any form, however, within a publication, will ultimately make the document more interesting to computer-driven indexing of the document. For example all the papers of with the URI referencing the &quot;head of a hymenopteran&quot; could be discovered if each publications about hymenopteran heads included the URI &quot;http://purl.obolibrary.org/obo/HAO_0000397&quot;. They could still use the label &quot;head&quot; alone, but a search could differentiate between &quot;head&quot; in the context of hymenopterans, and &quot;head&quot; of, for example, community organizations. <br /> <br /> == Similar functionality ==<br /> <br /> Other sites provide similar services, most notably Bioportal. The functionality within mx allows for a result integrated with other functionality to be returned, and for context specific to mx to be provided.</div> Matt http://mx.phenomix.org/index.php/App/namespace App/namespace 2012-02-02T15:59:05Z <p>Matt: </p> <hr /> <div><br /> <br /> == Overview ==<br /> <br /> A namespace serves as space in which all the following identifiers are intended to (globally) identify unique things. The namespace plus identifier should be unique for all of the instances of the class the namespace is attached to. For example namespaces are used when barcodes are created where the barcode might be &quot;AEI 0102312&quot;. Here AEI is the namespace, and we expect no more than one &quot;specimen&quot; to ever be identified with 012312. Identifiers in mx are used not just for specimens but for other things that must be uniquely identified as well (e.g. for DOIs).<br /> <br /> == Creating, editing, deleting Namespaces ==<br /> <br /> '''You must be an administrator to create, update, or delete Namespaces.''' Navigate to the administrator field, then click the namespace link.<br /> <br /> == Fields ==<br /> <br /> * '''Name''' - A human readable description of the Namespace<br /> * '''Short Name/Collection Code''' - The namespace itself. No spaces or quotes are allowed.<br /> * '''Owner''' - In general, the person or institution responsible for the minting of the Namespace, i.e. the person who ensures that these identifiers are in fact unique.<br /> * '''Is admin/internal use only?''' - Some namespaces are used for importing data. By choosing this option the namespace will not be available int he dropdowns in the application. <br /> * '''Notes''' - Be verbose, explain exactly what this namespace does/is meant to do.</div> Matt http://mx.phenomix.org/index.php/App/specimen/batch_load App/specimen/batch load 2012-02-02T15:51:42Z <p>Matt: </p> <hr /> <div>== Overview ==<br /> <br /> The batch loading functionality found here allows you to add specimen OR lot records from a spreadsheet format. Data are typically compiled in excel or google docs then exported to a tab delimited format which is read by the importer.<br /> <br /> '''Important: Most records require the use of an Identifier, which in turn needs a [[App/namespace|Namespace]].'''<br /> <br /> == Summary steps ==<br /> <br /> # Assemble the import file.<br /> #* Each row must contain a header BUT not headers need be matches to those possible headers listed below. If they do not match they are ignored!<br /> #* The first row must contain the headers for each row. Only those columns that match the list below will be read. Columns with headers not matching are ignored.<br /> #* Each row represents a single specimen or lot.<br /> #* Each row must &lt;em&gt;match an existing OTU already in mx&lt;/em&gt;. Matching of row data to the existing is possible via various mechanisms (see table below).<br /> #** One possible mechanism for quickly adding new OTUs that don't exist is to use [http://code.google.com/p/google-refine/ Google Refine] on an 'otu_name' column.<br /> #**# Create a new project in Google refine by selecting the text file that you will later import.<br /> #**# Click on the arrow to the right of the 'otu_name' column and select 'Facet'-&gt;'Text facet'. A window to the left will highlight all unique names (as an side this is ''very'' useful for debugging your data, see the Google Refine tutorials). <br /> #**# Click '123 choices&quot; in the facet box, this will bring up a text file that you can copy/paste to a new text file.<br /> #**# Modify that file to include only 1 OTU name / line. <br /> #**# Navigate to OTU-&gt;'more options'-&gt;'batch load' and load your unique OTU names.<br /> # Once the file is ready for testing follow the batch loading instructions in mx.<br /> <br /> == Saving from Excel ==<br /> <br /> If you work in Excel to capture your data you'll be exporting it prior to loading it. Your data should be saved in one of the following formats, (topmost preferred).<br /> <br /> {|<br /> ! File format<br /> ! Character Encoding<br /> |-<br /> |Tab Delimited Text (.txt)<br /> |MACINTOSH or ISO-8859-1<br /> |-<br /> |Windows Formatted Text (.txt)<br /> |ISO-8859-1<br /> |-<br /> |UTF-16 Unicode Text (.txt)<br /> |UTF-16LE<br /> |}<br /> <br /> == Columns ==<br /> <br /> === Required for both lots and specimens ===<br /> <br /> otu_id<br /> <br /> ''or (both allowed if they match)''<br /> otu_name <br /> <br /> '''OR'''<br /> <br /> taxon_name_id<br /> ''or (both allowed if they match)''<br /> taxon_name_string<br /> <br /> === Required for Lots ===<br /> <br /> count<br /> <br /> === Required for Specimens ===<br /> <br /> identifier <br /> <br /> === Optional for Specimens and Lots ===<br /> <br /> '''One of'''<br /> <br /> ce_id<br /> verbatim_label<br /> <br /> '''One of'''<br /> <br /> repository_id<br /> repository_coden<br /> <br /> '''Any of'''<br /> sex<br /> stage<br /> notes<br /> data_entry_by<br /> <br /> === Optional for lots ===<br /> <br /> identifier<br /> <br /> === Optional for specimens ===<br /> <br /> '''An additional determination'''<br /> <br /> ''One of''<br /> det_name<br /> det_otu_id <br /> <br /> '' and any of ''<br /> determiner<br /> det_year<br /> det_basis<br /> <br /> '''A type designation'''<br /> <br /> ''both of''<br /> type<br /> type_of_taxon_name_id<br /> <br /> == Valid column heads on batch files == <br /> <br /> {|<br /> ! column headers<br /> ! description<br /> ! restrictions<br /> |-<br /> |ce_id<br /> |A mx collecting event id.<br /> |If present in a row then ''verbatim_label'' must be empty. <br /> |-<br /> |count<br /> |Total specimens in a lot.<br /> |If present in a row then ''identifier'' must be empty.<br /> |-<br /> |data_entry_by<br /> |A mx uses login. If supplied then all creator/updator fields are set to this person. If not supplied the creator is the person logged in.<br /> |None.<br /> |-<br /> |det_basis<br /> |Free text describing how the specimen. determination was made.<br /> |Requires ''det_name'' or 'det_otu_id' to be included. Not applicable to lots.<br /> |-<br /> |det_name<br /> |Free text determination of specimen.<br /> |If present in a row then ''det_otu_id'' must be empty. Not applicable to lots.<br /> |-<br /> |det_otu_id <br /> |An id of an mx OTU that the specimen is determined as.<br /> |If present in a row then ''det_name'' must be empty. Not applicable to lots.<br /> |-<br /> |det_year<br /> |A year in which a determination is made. <br /> |Requires ''det_otu_id'' or ''det_name'' to be present. Not applicable to lots.<br /> |-<br /> |determiner<br /> |Free text indicator of determiner.<br /> |Requires ''det_otu_id'' or ''det_name'' to be present. Not applicable to lots.<br /> |-<br /> |identifier<br /> |An identifier in the form of &quot;namespace identifier&quot;, like &quot;NCSU 1234&quot;. <br /> |The namespace must be present in mx. Applicable to lots or specimens. Identifiers must be unique with an mx project (i.e. lots and specimens can not share identifiers).<br /> |-<br /> |notes<br /> |Free text notes.<br /> |None.<br /> |-<br /> |otu_id<br /> |A mx OTU id to which a specimen or lot is primarily attached.<br /> |Must match an OTU found by ''otu_name'' if ''otu_name'' is also provided.<br /> |-<br /> |otu_name <br /> |A mx OTU ''name'' (not associated taxon name, manuscript name, nor matrix name) which identifies the specimen. <br /> |The named OTU must exist in the database. Must match the OTU indicated by ''otu_id'' if ''otu_id'' is also provide. If ''otu_id'' is not provided must be unique for the given project. <br /> |-<br /> |repository_coden<br /> |A mx repository coden, like &quot;NCSU&quot;.<br /> |Must match a coden in repositories. If provided ''repository_id'' must be empty.<br /> |-<br /> |repository_id<br /> |A mx id matching a respository.<br /> |Must match a coden in repositories. If provided ''repository_coden'' must be empty.<br /> |-<br /> |sex<br /> |Free text determination of sex, standard use is &quot;male&quot; or &quot;female&quot;. Applicable to lots or specimens. <br /> |None.<br /> |-<br /> |stage<br /> |Free text determination of stage. Applicable to lots or specimens.<br /> |None.<br /> |-<br /> |taxon_name_id<br /> |Mx taxon name id which identifiers a specimen.<br /> |Must be tied to a single OTU. Applicable to specimens only. Must be empty if ''otu_id'' or ''otu_name'' is provided. Must match ''taxon_name_string'' if ''taxon_name_string'' is provided.<br /> |-<br /> |taxon_name_string<br /> |Mx taxon name which identifiers a specimen.<br /> |Name in mx must be unique, and associated id must be tied to a single OTU. Applicable to specimens only. Must be empty if ''otu_id'' or ''otu_name'' is provided. Must match ''taxon_name_id'' if ''taxon_name_string'' is provided. At present matches only single word string. <br /> |-<br /> |type<br /> |The code recognized type status of the specimen. Like &quot;holotype&quot;, &quot;paratype&quot;, &quot;syntype&quot;, &quot;neotype&quot;, or &quot;paralectotype&quot;. Not for non governed things like &quot;allotype&quot;.<br /> |Applicable to specimens only. Must be used in combination with ''type_of_taxon_name_id''.<br /> |-<br /> |type_of_taxon_name_id<br /> |The mx taxon name id that the ''type'' refers to.<br /> |Applicable to specimens only. Must be used in combination with ''type''. <br /> |-<br /> |verbatim_label<br /> |The verbatim text of the label(s) of the specimen or lot. Identical ''verbatim_labels'' are tied to a single collecting event in mx. Individual lines can be separated with &quot;&amp;#124;&amp;#124;&quot;, individual labels can be separated with &quot;++&quot;. &quot;&amp;#124;&amp;#124;&quot; and '++' will be replaced with one and two new lines respectively.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |latitude<br /> |A real number in decimal degrees format.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |longitude<br /> |A real number in decimal degrees format. <br /> |Must be empty if ce_id is provided.<br /> |-<br /> |elev_min<br /> |A real number indicating the minimum elevation of the elevation range.<br /> |Must be empty if ce_id is provided. Required if elev_max provided. <br /> |-<br /> |elev_max<br /> |A real number indicating the maximum elevation of the elevation range.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |elev_unit<br /> |&quot;feet&quot; or &quot;meters&quot;. <br /> |Must be empty if ce_id is provided. Required if elev_min included. <br /> |-<br /> |geog_id<br /> |An mx id for a geographic unit that indicates the finest geographic unit for the collecting event.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |method<br /> |Interpreted version of the method given on the label (not verbatim).<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |locality<br /> |Free text description of the locality, e.g. &quot;1.5 km N Calgary&quot;<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_d<br /> |Verbatim, max 2 character field in roman numeral or integer. <br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_m<br /> |Verbatim, max 2 character field in roman numeral or integer.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_y<br /> |Verbatim, max 4 character integer.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |ed_d<br /> |Verbatim, max 2 character field in roman numeral or integer. <br /> |Must be empty if ce_id is provided. <br /> |-<br /> |ed_m<br /> |Verbatim, max 2 character field in roman numeral or integer.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |ed_y<br /> |Verbatim, max 4 character integer.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |time_start<br /> |Hours:Minutes, like &quot;13:23&quot;. 24 hour clock.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |time_end<br /> |Hours:Minutes, like &quot;13:23&quot;. 24 hour clock.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |collectors<br /> |Verbatim.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |micro_habitat<br /> |Verbatim.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |macro_habitat<br /> |Verbatim.<br /> |Must be empty if ce_id is provided. <br /> |}</div> Matt http://mx.phenomix.org/index.php/Installation Installation 2011-12-19T17:22:23Z <p>Matt: /* Mx specific settings */</p> <hr /> <div>&lt;div style=&quot;float:right;margin: 10px;&quot;&gt;__TOC__&lt;/div&gt;<br /> <br /> == Overview ==<br /> <br /> mx can be installed locally for development or testing purposes or on a server. If you're seriously considering supporting a mx installation in your lab or workplace you should have an intermediate to advanced programmer or server admin on your team. &lt;span style=&quot;color:red;&quot;&gt;Because of the relatively rapid updates to mx we recommend that you should presently use the edge branch.&lt;/span&gt; <br /> <br /> == Dependencies ==<br /> <br /> === Required ===<br /> <br /> ==== [http://www.mysql.com/ MySQL] ==== <br /> <br /> * MySQL 5.n is in use on development and production servers. Its easiest to install the community addition with the startup item, then reboot.<br /> <br /> * There are many examples of how to install and [[secure your mysql|secure MySQL]] on your machine available on whe world-wide web. If you are using OS X chances are you have a copy installed already (it will need configuration if you haven't already done so).<br /> <br /> ===== Mx specific settings =====<br /> * Typically you add settings to /etc/my.cnf.<br /> * First, check that the value of the `socket` setting matches that provided in /config/database.yml, looking something like this in the .cnf file.<br /> [client]<br /> socket = /var/mysql/mysql.sock<br /> [mysqld]<br /> socket = /var/mysql/mysql.sock<br /> <br /> * Second, add the following line under the [mysqld] settings.<br /> [mysqld]<br /> max_allowed_packet = 32M<br /> <br /> ==== [http://www.ruby-lang.org/en/ Ruby] ==== <br /> <br /> * If you don't already have Ruby (most *nix systems come with it installed) you can find more about it [http://www.ruby-lang.org here]. Ruby v. 1.8.7 or higher is now required. We recommend building from source. Get the source [http://www.ruby-lang.org/en/ here].<br /> <br /> ==== [http://docs.rubygems.org/read/chapter/3 RubyGems ] ====<br /> <br /> * Its easiest to install several Ruby packages (including Rails) through the Ruby package manager RubyGems. <br /> <br /> ''&lt;span style=&quot;color:red;&quot;&gt;IMPORTANT&lt;/span&gt;: There are issues with the rubygems &gt; 1.7.2 and mx, the last known rubygem version to work is 1.7.2.'' This issue (and many others) should disappear when we finish the jump to Rails 3. A possible ''untested'' workaround is to use Rails 2.3.12.<br /> <br /> ==== [http://www.rubyonrails.org/ Rails] ==== <br /> <br /> ''' Production is now using Rails 2.3.10. Install the required version with the -v flag. '''<br /> <br /> * Do (appending --no-rdoc will speed things up, but not install local documentation):<br /> <br /> gem install rails -v=2.3.10 --include-dependencies --no-rdoc<br /> <br /> === Optional ===<br /> <br /> ==== [http://www.imagemagick.org/script/index.php ImageMagik] ====<br /> <br /> * NOTE: This is optional, and not required for MorphBank images.<br /> * The tools 'convert' and 'identify' must be in your ''systems'' PATH, copying them to /usr/bin generally works. You do not need a rubygem hook.<br /> * Ensure that you have created the necessary paths for storing the images.<br /> * If possible install the additional jpg, tiff, png, and gs libraries before installing ImageMagick, this will let you handle additional image formats.<br /> <br /> ==== Passenger ====<br /> <br /> * Used only on a production server.<br /> * If you are running passenger, on CentOS/RHEL 5 servers there is a default daily chron that deletes some necessary passenger files in /tmp/passenger.PID. The easiest way to deal with this is to set the PassengerTempDir in the apache conf to something else, like so:<br /> <br /> PassengerTempDir /some_other_tmp_dir<br /> <br /> == Installation == <br /> <br /> === Stepwise overview ===<br /> <br /> # Install the required software (see above). There are numerous external sites that will help with installing these software, as such their installation is not documented here.<br /> # Download the mx source and required gems.<br /> # Create the database(s)<br /> # Populate the database with some initial data<br /> # Configure the local environment<br /> # Configure your folders<br /> # Start the server<br /> <br /> === Download the mx source ===<br /> <br /> The preferred method is now to checkout the source from [http://sourceforge.net/projects/mx-database/ Sourceforge] using [[http://subversion.tigris.org/ SVN]]]. <br /> <br /> &lt;em&gt;The (trunk) branch is now permanently deprecated, ignore it.&lt;/em&gt; <br /> <br /> For developers or those wanting to see the latest changes an edge branch that should be relatively stable but may contain production restricting commits is here:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database/branches/edge your_local_folder_name_here<br /> <br /> Several site-specific branches are being added, these are not recommended as a base for new installs but do provide a lot of example code. To grab everything you can just do:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database your_local_folder_name_here<br /> <br /> === Get the required gems ===<br /> <br /> Depending on the checkout you downloaded you might need to install the ruby-debug gem ''first'' (note for Ruby 1.9.1 users you will likely need to install the ruby-debug19 gem).<br /> <br /> ''sudo'' gem install ruby-debug<br /> <br /> You need various Ruby gems listed in the ''environment.rb''. The easiest way to install them all is to enter your mx folder (you should see the folders 'app', 'config' etc. if you are in the right place) and type:<br /> <br /> ''sudo'' rake gems:install<br /> <br /> &lt;span style=&quot;color:red;&quot;&gt;'''Note that the native mysql gem is nearly always problematic, and you might have to work at getting it installed.'''&lt;/span&gt; <br /> You can try:<br /> <br /> sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br /> <br /> On RHEL (after ''yum install mysql-devel'') this worked:<br /> <br /> gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config <br /> <br /> On Ubuntu 9.10 ([https://help.ubuntu.com/community/RubyOnRails see also here]) this worked:<br /> <br /> sudo apt-get install libmysqlclient-dev<br /> sudo gem install mysql<br /> <br /> See [http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard here], or [http://www.macruby.org/trac/wiki/Troubleshooting here], and more recently [http://techliberty.blogspot.com/ here] for other possible solutions if you have no luck with the above.<br /> <br /> === Configuring the database ===<br /> <br /> ==== Create the databases ====<br /> <br /> These instructions follow the defaults included in the database.yml file. Edit that file to change your configuration as necessary. <br /> <br /> If you haven't yet create the databases (don't forget the ';' for mysql <br /> commands):<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> create database mx_test;<br /> create database mx_development;<br /> create database mx_production;<br /> <br /> You'll need to add a MySQL account so that the app can access the database:<br /> <br /> GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';<br /> <br /> Repeat the above but swap out the word development for 'test' and 'production'.<br /> <br /> ==== Build the tables and populate some initial data ====<br /> <br /> &lt;div style=&quot;text-align:center; color:green;&quot;&gt;''Do this step if you have are starting from scratch, and have no existing mx dump to work with. If you have a mx data dump (see below) skip to &quot;Import existing data&quot;.''&lt;/div&gt;<br /> <br /> Exit mysql and navigate to the root of your mx install. Create the development database with the rake task (you may need to prefix with 'sudo'):<br /> <br /> rake db:migrate RAILS_ENV=development<br /> <br /> You can create the production database like so if necessary:<br /> <br /> rake db:migrate RAILS_ENV=production<br /> <br /> To create the test database do<br /> <br /> rake db:test:clone_structure<br /> <br /> Anytime the source is updated just repeat the rake db:migrate and your database will be updated if there are changes. There are several [[Rake tasks| rake tasks available for dumping and restoring data]], make sure to check them out.<br /> <br /> A single user with administrator privileges will have to be manually added to the 'people' tables prior to using mx. Once this user is added additional users can be added from the mx interface.<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> use mx_development;<br /> insert into people (first_name, last_name, login, password, is_admin,<br /> creates_projects) values ('joe', 'smith', 'jsmith', sha1('foosomepwdbar'), 1,1);<br /> <br /> * IMPORTANT - you must wrap 'foo' and 'bar' around your password in the above line. In the example above the password for 'jsmith' is 'somepwd' #<br /> <br /> While in the MySQL client you'll also want to add a root node to your taxonomic names hierarchy (this assumes the admin you created has id 1).<br /> <br /> insert into taxon_names (name, cached_display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);<br /> <br /> ==== Importing existing data ====<br /> <br /> If you have access to an existing dump of mx data (it will look something like &quot;2011_08_19_110700.sql&quot;) generated by you or an existing mx adminstrator, then you need not do the 'Build the tables and populate some initial data' step. To use this data copy the .sql file ''mx_root''/db/dumps, then do this<br /> <br /> rake mx:db:restore_last RAILS_ENV=development<br /> <br /> This will both build the database and load your data dump into it.<br /> <br /> === Configure the mx environment ===<br /> <br /> If you are starting with a new mx, i.e. not a version in production somehwere, you'll need to configure the local environment.<br /> <br /> Open<br /> <br /> /config/initializers/local_config.rb <br /> <br /> and update the various FOO variables as needed, see comments therein.<br /> <br /> You'll need to grab [http://code.google.com/apis/maps/signup.html GoogleMaps API keys] and add them to BOTH of:<br /> <br /> GMAPS_KEY_PRODUCTION<br /> GMAPS_KEY_DEVELOPMENT<br /> <br /> Finally, replace the emails in<br /> <br /> ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bob@gmail.com)<br /> <br /> with those you want e-mails to be sent to when errors are thrown.<br /> <br /> === Configure your operating system environment ===<br /> <br /> ==== Specific to *nix systems: check the path of your MySQL socket ====<br /> <br /> By default, the path of mysql.sock is set to<br /> /tmp/mysql.sock<br /> <br /> However, several distributions do not use this path. To change it edit the file<br /> config/database.yml<br /> and replace the 3 occurrences of<br /> socket: /tmp/mysql.sock<br /> by your actual path. For instance in Ubuntu<br /> socket: /var/run/mysqld/mysqld.sock<br /> <br /> === Configuring file and image storage ===<br /> <br /> Edit the /config/initializers/local_config.rb file and configure the various FILE_PATH variables, for development they can typically be left alone. If left as-is they correspond to the folders that you'll need to create as below:<br /> <br /> public/files<br /> public/files/images<br /> public/files/images/big<br /> public/files/images/medium<br /> public/files/images/original<br /> public/files/images/thumb<br /> public/files/pdfs<br /> public/files/datasets<br /> public/files/chromatograms<br /> <br /> On a *nix system you can also use a symbolic link to keep your images, pdfs, and datasets elsewhere.<br /> <br /> === Test your configurations/environment ===<br /> <br /> Do<br /> <br /> rake test<br /> <br /> This runs the numerous internal tests, it take some time. While you'll typically see a few fail the vast majority should pass. If they do chances are your environment is correctly configured.<br /> <br /> === Start the server (development) ===<br /> <br /> Try starting the sever, depending on your operating system you may have to set some permission.<br /> <br /> ruby script/server<br /> <br /> Navigate to [http://127.0.0.1:3000 http://127.0.0.1:3000]<br /> <br /> You may see the following problems at this point (solution in []).<br /> <br /> * &lt;em&gt;schema.rb doesn't exist yet. Run &quot;rake db:migrate&quot; to create it then try again.&lt;/em&gt; [Run &quot;rake db:migrate&quot; (and see below).<br /> * &lt;em&gt;Rails Error: Unable to access log file.&lt;/em&gt; [Change permissions on the /log folder so that it is writable. In development just do &quot;chmod 755 log&quot;. Then, in the log folder, do &quot;echo '' &gt; development.log&quot;, followed by &quot;chmod 666 development.log&quot;. If you are on a mac or linux machine you may need to prefix these commands with &quot;sudo&quot;.]<br /> <br /> === Troubleshooting ===<br /> <br /> ==== Configuring my.cnf ====<br /> <br /> If you get a 'Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:' you can add the following line to your my.cnf under [mysqld]: 'max_allowed_packet = 32M;'.<br /> <br /> == Usage (development) ==<br /> <br /> === Using the server/application ===<br /> <br /> To test/develop in development mode navigate to the root of your installation and type<br /> <br /> ruby script/server<br /> <br /> Open a web browser and browse to <br /> <br /> 127.0.0.1:3000<br /> <br /> You should see a login page. If you see the mx page but no login fields then you have not correctly added your administrator user.<br /> <br /> Once logged in navigate to <br /> <br /> 127.0.0.1:3000/admin<br /> <br /> to create new projects.<br /> <br /> You can also navigate to <br /> <br /> 127.0.0.1:3000/account/signup<br /> <br /> to add regular users.<br /> <br /> == Upgrading ==<br /> <br /> Once you have mx installed upgrading should be relatively straightforward. First, make a backup of both the database and the application, we assume you know where your data reside by this point, and we assume that you know that things can go horribly wrong. After backing up replace the old source with the new (see below for comments). Then, make sure you have the required Rails/Gems (plugins are included in the source already). Finally, run the rake task to update the database like so:<br /> <br /> rake db:migrate RAILS_ENV=&lt;development|production&gt;<br /> <br /> Its always a good idea to run the test suite as well, this will give you a good idea of what possible problems you might still have.<br /> <br /> rake test<br /> <br /> == Usage (production) ==<br /> <br /> Production installation follows, for the most part, the same installation process as above. See the Rails homepage for setting up the server. Note that only users with accounts can see data in a clean installation of mx, i.e. you must manually configure the installation to make data available to the public.<br /> <br /> If you plan to set up a production installation of mx, it would be a good idea to read chapter 27 of ''Agile Web Development with Rails'', second edition.<br /> <br /> === Production with no customizations ===<br /> <br /> We don't have Capistrano working, so essentially you'll have to devise your own method of rolling to production, we use an SVN checkout for now.<br /> <br /> === Production with customizations ===<br /> <br /> If you have begun to build public front ends you know where your custom code resides (/public, /app/models/public, /app/controllers/public, /app/views/public), manage these as you like.<br /> <br /> === Apache configuration ===<br /> <br /> If you plan to use the API functionality you'll need add the following to your virtual .conf:<br /> <br /> AllowEncodedSlashes On<br /> <br /> == Legacy notes on installation / configuration == <br /> <br /> * These notes: [[one person's experience with installing mx]] also include Mac install instructions, but these do not include Ruby install instructions.<br /> * Very good installation notes for Ubuntu hardy can be found on the [[http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails Slicehost blog]] (November, 2008).<br /> * Notes for [[Server configuration | Server set up note here]].</div> Matt http://mx.phenomix.org/index.php/Installation Installation 2011-12-19T17:22:06Z <p>Matt: /* MySQL */</p> <hr /> <div>&lt;div style=&quot;float:right;margin: 10px;&quot;&gt;__TOC__&lt;/div&gt;<br /> <br /> == Overview ==<br /> <br /> mx can be installed locally for development or testing purposes or on a server. If you're seriously considering supporting a mx installation in your lab or workplace you should have an intermediate to advanced programmer or server admin on your team. &lt;span style=&quot;color:red;&quot;&gt;Because of the relatively rapid updates to mx we recommend that you should presently use the edge branch.&lt;/span&gt; <br /> <br /> == Dependencies ==<br /> <br /> === Required ===<br /> <br /> ==== [http://www.mysql.com/ MySQL] ==== <br /> <br /> * MySQL 5.n is in use on development and production servers. Its easiest to install the community addition with the startup item, then reboot.<br /> <br /> * There are many examples of how to install and [[secure your mysql|secure MySQL]] on your machine available on whe world-wide web. If you are using OS X chances are you have a copy installed already (it will need configuration if you haven't already done so).<br /> <br /> ===== Mx specific settings =====<br /> * Typically you add settings to /etc/my.cnf.<br /> * First, check that the value of the `socket` setting matches that provided in /config/database.yml, looking something like this in the .cnf file.<br /> [client]<br /> socket = /var/mysql/mysql.sock<br /> <br /> [mysqld]<br /> socket = /var/mysql/mysql.sock<br /> <br /> * Second, add the following line under the [mysqld] settings.<br /> [mysqld]<br /> max_allowed_packet = 32M<br /> <br /> ==== [http://www.ruby-lang.org/en/ Ruby] ==== <br /> <br /> * If you don't already have Ruby (most *nix systems come with it installed) you can find more about it [http://www.ruby-lang.org here]. Ruby v. 1.8.7 or higher is now required. We recommend building from source. Get the source [http://www.ruby-lang.org/en/ here].<br /> <br /> ==== [http://docs.rubygems.org/read/chapter/3 RubyGems ] ====<br /> <br /> * Its easiest to install several Ruby packages (including Rails) through the Ruby package manager RubyGems. <br /> <br /> ''&lt;span style=&quot;color:red;&quot;&gt;IMPORTANT&lt;/span&gt;: There are issues with the rubygems &gt; 1.7.2 and mx, the last known rubygem version to work is 1.7.2.'' This issue (and many others) should disappear when we finish the jump to Rails 3. A possible ''untested'' workaround is to use Rails 2.3.12.<br /> <br /> ==== [http://www.rubyonrails.org/ Rails] ==== <br /> <br /> ''' Production is now using Rails 2.3.10. Install the required version with the -v flag. '''<br /> <br /> * Do (appending --no-rdoc will speed things up, but not install local documentation):<br /> <br /> gem install rails -v=2.3.10 --include-dependencies --no-rdoc<br /> <br /> === Optional ===<br /> <br /> ==== [http://www.imagemagick.org/script/index.php ImageMagik] ====<br /> <br /> * NOTE: This is optional, and not required for MorphBank images.<br /> * The tools 'convert' and 'identify' must be in your ''systems'' PATH, copying them to /usr/bin generally works. You do not need a rubygem hook.<br /> * Ensure that you have created the necessary paths for storing the images.<br /> * If possible install the additional jpg, tiff, png, and gs libraries before installing ImageMagick, this will let you handle additional image formats.<br /> <br /> ==== Passenger ====<br /> <br /> * Used only on a production server.<br /> * If you are running passenger, on CentOS/RHEL 5 servers there is a default daily chron that deletes some necessary passenger files in /tmp/passenger.PID. The easiest way to deal with this is to set the PassengerTempDir in the apache conf to something else, like so:<br /> <br /> PassengerTempDir /some_other_tmp_dir<br /> <br /> == Installation == <br /> <br /> === Stepwise overview ===<br /> <br /> # Install the required software (see above). There are numerous external sites that will help with installing these software, as such their installation is not documented here.<br /> # Download the mx source and required gems.<br /> # Create the database(s)<br /> # Populate the database with some initial data<br /> # Configure the local environment<br /> # Configure your folders<br /> # Start the server<br /> <br /> === Download the mx source ===<br /> <br /> The preferred method is now to checkout the source from [http://sourceforge.net/projects/mx-database/ Sourceforge] using [[http://subversion.tigris.org/ SVN]]]. <br /> <br /> &lt;em&gt;The (trunk) branch is now permanently deprecated, ignore it.&lt;/em&gt; <br /> <br /> For developers or those wanting to see the latest changes an edge branch that should be relatively stable but may contain production restricting commits is here:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database/branches/edge your_local_folder_name_here<br /> <br /> Several site-specific branches are being added, these are not recommended as a base for new installs but do provide a lot of example code. To grab everything you can just do:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database your_local_folder_name_here<br /> <br /> === Get the required gems ===<br /> <br /> Depending on the checkout you downloaded you might need to install the ruby-debug gem ''first'' (note for Ruby 1.9.1 users you will likely need to install the ruby-debug19 gem).<br /> <br /> ''sudo'' gem install ruby-debug<br /> <br /> You need various Ruby gems listed in the ''environment.rb''. The easiest way to install them all is to enter your mx folder (you should see the folders 'app', 'config' etc. if you are in the right place) and type:<br /> <br /> ''sudo'' rake gems:install<br /> <br /> &lt;span style=&quot;color:red;&quot;&gt;'''Note that the native mysql gem is nearly always problematic, and you might have to work at getting it installed.'''&lt;/span&gt; <br /> You can try:<br /> <br /> sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br /> <br /> On RHEL (after ''yum install mysql-devel'') this worked:<br /> <br /> gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config <br /> <br /> On Ubuntu 9.10 ([https://help.ubuntu.com/community/RubyOnRails see also here]) this worked:<br /> <br /> sudo apt-get install libmysqlclient-dev<br /> sudo gem install mysql<br /> <br /> See [http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard here], or [http://www.macruby.org/trac/wiki/Troubleshooting here], and more recently [http://techliberty.blogspot.com/ here] for other possible solutions if you have no luck with the above.<br /> <br /> === Configuring the database ===<br /> <br /> ==== Create the databases ====<br /> <br /> These instructions follow the defaults included in the database.yml file. Edit that file to change your configuration as necessary. <br /> <br /> If you haven't yet create the databases (don't forget the ';' for mysql <br /> commands):<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> create database mx_test;<br /> create database mx_development;<br /> create database mx_production;<br /> <br /> You'll need to add a MySQL account so that the app can access the database:<br /> <br /> GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';<br /> <br /> Repeat the above but swap out the word development for 'test' and 'production'.<br /> <br /> ==== Build the tables and populate some initial data ====<br /> <br /> &lt;div style=&quot;text-align:center; color:green;&quot;&gt;''Do this step if you have are starting from scratch, and have no existing mx dump to work with. If you have a mx data dump (see below) skip to &quot;Import existing data&quot;.''&lt;/div&gt;<br /> <br /> Exit mysql and navigate to the root of your mx install. Create the development database with the rake task (you may need to prefix with 'sudo'):<br /> <br /> rake db:migrate RAILS_ENV=development<br /> <br /> You can create the production database like so if necessary:<br /> <br /> rake db:migrate RAILS_ENV=production<br /> <br /> To create the test database do<br /> <br /> rake db:test:clone_structure<br /> <br /> Anytime the source is updated just repeat the rake db:migrate and your database will be updated if there are changes. There are several [[Rake tasks| rake tasks available for dumping and restoring data]], make sure to check them out.<br /> <br /> A single user with administrator privileges will have to be manually added to the 'people' tables prior to using mx. Once this user is added additional users can be added from the mx interface.<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> use mx_development;<br /> insert into people (first_name, last_name, login, password, is_admin,<br /> creates_projects) values ('joe', 'smith', 'jsmith', sha1('foosomepwdbar'), 1,1);<br /> <br /> * IMPORTANT - you must wrap 'foo' and 'bar' around your password in the above line. In the example above the password for 'jsmith' is 'somepwd' #<br /> <br /> While in the MySQL client you'll also want to add a root node to your taxonomic names hierarchy (this assumes the admin you created has id 1).<br /> <br /> insert into taxon_names (name, cached_display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);<br /> <br /> ==== Importing existing data ====<br /> <br /> If you have access to an existing dump of mx data (it will look something like &quot;2011_08_19_110700.sql&quot;) generated by you or an existing mx adminstrator, then you need not do the 'Build the tables and populate some initial data' step. To use this data copy the .sql file ''mx_root''/db/dumps, then do this<br /> <br /> rake mx:db:restore_last RAILS_ENV=development<br /> <br /> This will both build the database and load your data dump into it.<br /> <br /> === Configure the mx environment ===<br /> <br /> If you are starting with a new mx, i.e. not a version in production somehwere, you'll need to configure the local environment.<br /> <br /> Open<br /> <br /> /config/initializers/local_config.rb <br /> <br /> and update the various FOO variables as needed, see comments therein.<br /> <br /> You'll need to grab [http://code.google.com/apis/maps/signup.html GoogleMaps API keys] and add them to BOTH of:<br /> <br /> GMAPS_KEY_PRODUCTION<br /> GMAPS_KEY_DEVELOPMENT<br /> <br /> Finally, replace the emails in<br /> <br /> ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bob@gmail.com)<br /> <br /> with those you want e-mails to be sent to when errors are thrown.<br /> <br /> === Configure your operating system environment ===<br /> <br /> ==== Specific to *nix systems: check the path of your MySQL socket ====<br /> <br /> By default, the path of mysql.sock is set to<br /> /tmp/mysql.sock<br /> <br /> However, several distributions do not use this path. To change it edit the file<br /> config/database.yml<br /> and replace the 3 occurrences of<br /> socket: /tmp/mysql.sock<br /> by your actual path. For instance in Ubuntu<br /> socket: /var/run/mysqld/mysqld.sock<br /> <br /> === Configuring file and image storage ===<br /> <br /> Edit the /config/initializers/local_config.rb file and configure the various FILE_PATH variables, for development they can typically be left alone. If left as-is they correspond to the folders that you'll need to create as below:<br /> <br /> public/files<br /> public/files/images<br /> public/files/images/big<br /> public/files/images/medium<br /> public/files/images/original<br /> public/files/images/thumb<br /> public/files/pdfs<br /> public/files/datasets<br /> public/files/chromatograms<br /> <br /> On a *nix system you can also use a symbolic link to keep your images, pdfs, and datasets elsewhere.<br /> <br /> === Test your configurations/environment ===<br /> <br /> Do<br /> <br /> rake test<br /> <br /> This runs the numerous internal tests, it take some time. While you'll typically see a few fail the vast majority should pass. If they do chances are your environment is correctly configured.<br /> <br /> === Start the server (development) ===<br /> <br /> Try starting the sever, depending on your operating system you may have to set some permission.<br /> <br /> ruby script/server<br /> <br /> Navigate to [http://127.0.0.1:3000 http://127.0.0.1:3000]<br /> <br /> You may see the following problems at this point (solution in []).<br /> <br /> * &lt;em&gt;schema.rb doesn't exist yet. Run &quot;rake db:migrate&quot; to create it then try again.&lt;/em&gt; [Run &quot;rake db:migrate&quot; (and see below).<br /> * &lt;em&gt;Rails Error: Unable to access log file.&lt;/em&gt; [Change permissions on the /log folder so that it is writable. In development just do &quot;chmod 755 log&quot;. Then, in the log folder, do &quot;echo '' &gt; development.log&quot;, followed by &quot;chmod 666 development.log&quot;. If you are on a mac or linux machine you may need to prefix these commands with &quot;sudo&quot;.]<br /> <br /> === Troubleshooting ===<br /> <br /> ==== Configuring my.cnf ====<br /> <br /> If you get a 'Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:' you can add the following line to your my.cnf under [mysqld]: 'max_allowed_packet = 32M;'.<br /> <br /> == Usage (development) ==<br /> <br /> === Using the server/application ===<br /> <br /> To test/develop in development mode navigate to the root of your installation and type<br /> <br /> ruby script/server<br /> <br /> Open a web browser and browse to <br /> <br /> 127.0.0.1:3000<br /> <br /> You should see a login page. If you see the mx page but no login fields then you have not correctly added your administrator user.<br /> <br /> Once logged in navigate to <br /> <br /> 127.0.0.1:3000/admin<br /> <br /> to create new projects.<br /> <br /> You can also navigate to <br /> <br /> 127.0.0.1:3000/account/signup<br /> <br /> to add regular users.<br /> <br /> == Upgrading ==<br /> <br /> Once you have mx installed upgrading should be relatively straightforward. First, make a backup of both the database and the application, we assume you know where your data reside by this point, and we assume that you know that things can go horribly wrong. After backing up replace the old source with the new (see below for comments). Then, make sure you have the required Rails/Gems (plugins are included in the source already). Finally, run the rake task to update the database like so:<br /> <br /> rake db:migrate RAILS_ENV=&lt;development|production&gt;<br /> <br /> Its always a good idea to run the test suite as well, this will give you a good idea of what possible problems you might still have.<br /> <br /> rake test<br /> <br /> == Usage (production) ==<br /> <br /> Production installation follows, for the most part, the same installation process as above. See the Rails homepage for setting up the server. Note that only users with accounts can see data in a clean installation of mx, i.e. you must manually configure the installation to make data available to the public.<br /> <br /> If you plan to set up a production installation of mx, it would be a good idea to read chapter 27 of ''Agile Web Development with Rails'', second edition.<br /> <br /> === Production with no customizations ===<br /> <br /> We don't have Capistrano working, so essentially you'll have to devise your own method of rolling to production, we use an SVN checkout for now.<br /> <br /> === Production with customizations ===<br /> <br /> If you have begun to build public front ends you know where your custom code resides (/public, /app/models/public, /app/controllers/public, /app/views/public), manage these as you like.<br /> <br /> === Apache configuration ===<br /> <br /> If you plan to use the API functionality you'll need add the following to your virtual .conf:<br /> <br /> AllowEncodedSlashes On<br /> <br /> == Legacy notes on installation / configuration == <br /> <br /> * These notes: [[one person's experience with installing mx]] also include Mac install instructions, but these do not include Ruby install instructions.<br /> * Very good installation notes for Ubuntu hardy can be found on the [[http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails Slicehost blog]] (November, 2008).<br /> * Notes for [[Server configuration | Server set up note here]].</div> Matt http://mx.phenomix.org/index.php/FAQ FAQ 2011-12-15T21:46:30Z <p>Matt: </p> <hr /> <div>== General ==<br /> <br /> === What is mx being used for? ===<br /> * See [[Publications| publications]].<br /> * See the [[Public_projects| public projects]].<br /> <br /> === What software is needed to run mx? ===<br /> * Mx can run on a wide range of platforms. See [[Installation]].<br /> <br /> === Can you run mx locally and then sync your data to the server? ===<br /> * Not really. You could, however, run a copy in development mode locally, and prepare all your data there, then move that en-masse to production/the web.<br /> <br /> === Can I run mx without a web-based server? ===<br /> * Yes, the application can be run locally, though it hasn't been designed with this in mind or optimized (speed) for this usage. Keep in mind you won't be able to share the application over the network or internet, i.e. it could only be accessed at one machine.<br /> <br /> === How do I cite mx? ===<br /> * The short answer is however you see fit. mx was [http://www.tdwg.org/proceedings/article/view/38 introduced at the 2006 TDWG meeting], however it looks a lot different now than it did then. Perhaps the simplest way is to cite it inline with the URL like &quot;We used mx (code and documentation available at http://mx.phenomix.org) to {do stuff}.&quot;<br /> <br /> == Data model ==<br /> <br /> === Can I see the schema? ===<br /> <br /> * ER diagrams and a schema dump are [http://mx.phenomix.org/schema/ available here]. The schema dump may lag slightly vs. code. The database is built through Rails migrations. After installation you can dump a copy of the schema with the rake task 'rake db:schema:dump'. See also [[Data_model| additional comments, annotations, and notes on deprecations and future plans]].<br /> <br /> === What do all the abbreviations in tables/fields mean? ===<br /> <br /> * See the [[Data dictionary]].<br /> <br /> == Data entry/import ==<br /> <br /> === How do I load EndNote formatted reference into mx? ===<br /> * See &quot;Ref&quot;-&gt;'more options'-&gt;'import Endnote' [[App/ref/endnote|and see here]].<br /> <br /> === How do I load a Nexus file into mx? ===<br /> * See the &quot;Phylo&quot; tab and follow the directions [[App/data_source|here]].<br /> <br /> === What mechanisms are available for entering data? ===<br /> * Data can be entered in a number of different ways<br /> ** individually via forms<br /> ** in batches via the web interface<br /> ** in batches via the server side console (Rake tasks)<br /> ** individually via the Rails console<br /> <br /> === Manually entering data one a time can be very annoying, what kind of data can I batch load into mx? ===<br /> * Matrix related<br /> ** Nexus formatted matrices<br /> ** Lucid's .xls formatted exports<br /> ** Newick formatted trees <br /> * Specimen related<br /> ** [[app/specimen/batch_load|Specimens and lots]]<br /> ** Verbatim collecting events (labels)<br /> ** Individual Otu names<br /> * Nomeclature related<br /> ** Single word epithets (children) of taxon names (e.g. species names for a genus or genera of a family) <br /> * Image related<br /> ** Image files (via a Rake task/command line)<br /> ** References to MorphBank images<br /> * Reference related<br /> ** [[app/ref/endnote|Endnote]]<br /> * Sequence related<br /> * [[app/seq/seqs_from_FASTA|FASTA]]<br /> * Ontology related<br /> ** OBO files (instantiates labels including synonymy, classes, relations, and references provided as xrefs)<br /> ** Sensu tables ([label, definition, reference] combinations)<br /> <br /> === Can projects be merged? ===<br /> <br /> * Yes, data can be moved from one project to another, though not all synonymous data are merged at present. You'll need to use the console interface to do this. See the Proj#merge_to_project.<br /> <br /> == Data export/access ==<br /> <br /> === What formats can matrices be exported to? ===<br /> * OWL (CDAO), NeXML, Nexus, TNT, ASCII tables, and mx database tables<br /> <br /> === Is there an API? ===<br /> <br /> * Yes, an API is in early development, see [[App/API]].<br /> <br /> == Production servers ==<br /> <br /> === What's the preferred production/development update path? ===<br /> <br /> * BACKUP DATA with 'rake mx:db:dump_data RAILS_ENV=production', a dump goes in '''app home'''/db/dumps. Update source (at present the latest source is on the relatively stable /edge/branch). Migrate the database with 'rake db:migrate RAILS_ENV=development' (you may want to test prior to or after this step with 'rake test'). Dump the data again (first step). Copy this copy to '''app home'''/db/dumps in your development environment. Load it with 'rake mx:db:restore_last' (note his dumps the current development, so if the reload fails you'll have to delete this dump as it will be more recent than your production copy). Develop. Repeat.<br /> <br /> === Clicking on a figure on a public site is giving me a 404, how do I fix this? ===<br /> <br /> * Choose edit for project settings and make the figure controller public by checking it.<br /> <br /> == Matrix based species descriptions ==<br /> <br /> === Can mx generate matrix based descriptions? ===<br /> <br /> Yes. Mx has a very flexible content handling system which includes the functionality of using coded characters (sensu morphological phylogenetics) into species descriptions. This is similar functionality to that done in Delta, Lucid, or vSysLab, but with some modifications. See [[Matrix based descriptions]].<br /> <br /> == Taxonomic names ==<br /> <br /> === Why can't I see taxonomic names in my project? ===<br /> * Visibility of names is dynamically set. Go to the '''Taxon names''' tab, then '''more options'''-&gt;'''visibility''' select the parent node you want visible. The taxon names will now be visible and available for use. Removing names from visibility does not delete them, nor invalidate records that reference those names. Visibility is used to focus your workflow, limiting the options in the dropdown, and the data you are reviewing.<br /> <br /> * After initial installation no names will be visible. To start adding real taxa after you create a project make the root taxon visible via the visibility view in the &quot;Taxon names&quot; tab. Then the root will available as the parent of the highest taxonomic level included in your taxa list.<br /> [[Image:Root_visible.png|400 px|Use the visibility list in the Taxon names tab to make root visible]]<br /> <br /> === I can't create a taxon name? ===<br /> * Permissions are set at a by taxon level, have your administrator update the permissions for the given user.<br /> <br /> === My taxon names are repeated in different colors, why? ===<br /> * See the application help here [[App/otu]]<br /> <br /> == OTUs ==<br /> <br /> === See 'What are all these colorful OTU names?' ===<br /> * See the application help here [[App/otu]]<br /> <br /> == Users ==<br /> <br /> === How do I add someone to my project? ===<br /> * Mx uses a FOAF system for creating new accounts. After you sign in navigate to &lt;nowiki&gt;http://yourserver.foo.com/account/signup&lt;/nowiki&gt;. Signing up a new user also logs that person in, logout to return to your user. Select your project, click 'settings' and click the link to add a new user to a project.<br /> <br /> == General errors ==<br /> <br /> === I can't upload files, particularly pdfs, why? ===<br /> <br /> * Firefox has a known bug in which the MimeType can be corrupted. See [[http://cephas.net/blog/2007/01/05/firefox-mimetypesrdf-corruption/ this page]]. Close FF. Delete your mimeTypes.rdf file in your FF profile, reopen.<br /> <br /> == Production/server gotchas. ==<br /> <br /> === mx suddenly can't load pdfs or images. ===<br /> <br /> * There is an issue where /tmp directories are being cleaned out by chron jobs (on OS X we hit this with a monthly). The workaround is to restart the server (ugh), or mess with the PHP tmp directories. See http://code.google.com/p/phusion-passenger/issues/detail?id=365<br /> <br /> === rake db:migrate RAILS_ENV=production fails when a model is not found ===<br /> <br /> * This can occur when updates occur out of sync on in large groups. To resolve edit ''config/environments/production.rb'' and change the following line from true to false ''config.cache_classes = false'', run the migrations, then set back to true.<br /> <br /> == This wiki ==<br /> <br /> === There used to be some pages on this wiki, now I can't find them? ===<br /> <br /> * Mx has been used/in development for over 5 years now, as such there are various &quot;legacy&quot; pages here on the wiki that may or may not have as much relevance as they do now. [[Legacy pages]] for references to these.</div> Matt http://mx.phenomix.org/index.php/App/otu/new App/otu/new 2011-11-22T14:48:36Z <p>Matt: </p> <hr /> <div>See also this help: [[App/otu]].<br /> <br /> There are two ways to create OTUs. Both start by clicking on the New OTU link.<br /> <br /> # You may create a single OTU by filling out the form.<br /> # You can create multiple OTUs at once by clicking on the Include all children? checkbox. This creates an OTU for the chosen taxon name, and every child. Be careful- you may be creating more than you wish, and at present you have to delete OTUs one at a time.<br /> <br /> === Published names vs. Containing taxon ===<br /> <br /> You can tie your OTU to a published taxonomic name by selecting a taxon name via the blue picker at the top when you edit that OTU. If your OTU represents that taxon name that’s all you need to do. If your OTU is a child of that taxon name you can click the “Is child of published name?” check box. Note that we recently merged the functionality of is/is child to a single dropdown.<br /> <br /> === Manuscript Names ===<br /> <br /> Do not place manuscript names in the name field. If you are describing a new species in an currently available genus you should enter the genus name and “new species” in name, field and the full species epithet in the manuscript name field. OTU names are/will be routinely displayed for public use in some cases, and thus it is very important to not include manuscript names in that field.</div> Matt http://mx.phenomix.org/index.php/Main_Page Main Page 2011-10-19T17:20:55Z <p>Matt: </p> <hr /> <div>== Welcome to the homepage for mx ==<br /> &lt;p&gt; mx (preferred reference all lowercase) is a Ruby-based platform that consists of a Ruby on Rails (RoR) application and various supporting gems/libraries. Initially conceived and developed as a collaborative web-based content management system for biosystematists mx now has a wide range of functionality much of which can broadly categorized under the umbrella of biodiversity informatics.&lt;/p&gt; <br /> &lt;p&gt; mx is a relatively flexible codebase as highlighted by some of its more utilized functionality: &lt;/p&gt;<br /> <br /> * Ontologies - A wide range of functionality for creating and develop ontologies (e.g. anatomical) that are exportable to OBO formats <br /> * Phylogenetic matrices - A wide range of support for matrix development, including much utility coding very large matrices (e.g. 1000x1000)<br /> * Specimen metadata - Museum level specimen curation ''very simple IPT integration coming Spring 2011''<br /> * DNA workbench - Audit trails from specimen to sequence including generation of PCR worksheets and FASTA import <br /> * Taxonomic catalogs - Data managed, updated, then presentable to then exportable to various formats (e.g. ITIS)<br /> * Taxon pages/treatments - Customize templates then add dynamic (e.g. matrix based descriptions) or text content and figures <br /> * Biological associations - For example- cataloging host-parasite records<br /> * Multiple-entry and bifurcating keys<br /> <br /> &lt;p&gt; Features are additionally highlighted in [[Features | this summary]]. &lt;/p&gt;<br /> &lt;p&gt; Highlights of some things that makes mx special: &lt;/p&gt;<br /> <br /> * Multi-user, multi-project support in one installation<br /> * A universal tagging system for workflow management or annotations<br /> * Implementation of an OTU ('O'perational 'T'axonomic 'U'nit) as a core data object- this cleanly separates content from nomenclature <br /> * A completely open-source based approach, code updates are not squirreled away until research is published<br /> <br /> == How do I use it? ==<br /> <br /> There are two general paths:<br /> # Find someone who is hosting a installation of mx and ask them to create a project for you.<br /> # Install your own instance and create your own projects. See [[Installation]] and the FAQ for more on this option.<br /> <br /> == The hack-mx workshop ==<br /> <br /> In October, 2011 a hack-mx workshop was held for people with a wide range of programming experience (from none, to expert). Download the tutorials/exercises that were used [http://phenomix.org/hack-mx_tutorials/hack-mx_tutorials.zip here] (.zip, remote site).<br /> <br /> &lt;div style=&quot;font-size: larger; padding: 1em; text-align: center; width: 80%; margin-left: auto;margin-right: auto; border-top: 1px dotted silver;&quot;&gt; <br /> [[Public projects| projects with public data]] | [[Publications| publications etc.]] | [[Roadmap | roadmap]] | [[Credit | credit]] | [[Funding | funding/support]] &lt;/div&gt;<br /> <br /> __NOTOC__</div> Matt http://mx.phenomix.org/index.php/FAQ FAQ 2011-10-18T23:08:41Z <p>Matt: </p> <hr /> <div>== General ==<br /> <br /> === What is mx being used for? ===<br /> * See [[Publications| publications]].<br /> * See the [[Public_projects| public projects]].<br /> <br /> === What software is needed to run mx? ===<br /> * Mx can run on a wide range of platforms. See [[Installation]].<br /> <br /> === Can you run mx locally and then sync your data to the server? ===<br /> * Not really. You could, however, run a copy in development mode locally, and prepare all your data there, then move that en-masse to production/the web.<br /> <br /> === Can I run mx without a web-based server? ===<br /> * Yes, the application can be run locally, though it hasn't been designed with this in mind or optimized (speed) for this usage. Keep in mind you won't be able to share the application over the network or internet, i.e. it could only be accessed at one machine.<br /> <br /> == Data model ==<br /> <br /> === Can I see the schema? ===<br /> <br /> * ER diagrams and a schema dump are [http://mx.phenomix.org/schema/ available here]. The schema dump may lag slightly vs. code. The database is built through Rails migrations. After installation you can dump a copy of the schema with the rake task 'rake db:schema:dump'. See also [[Data_model| additional comments, annotations, and notes on deprecations and future plans]].<br /> <br /> === What do all the abbreviations in tables/fields mean? ===<br /> <br /> * See the [[Data dictionary]].<br /> <br /> == Data entry/import ==<br /> <br /> === How do I load EndNote formatted reference into mx? ===<br /> * See &quot;Ref&quot;-&gt;'more options'-&gt;'import Endnote' [[App/ref/endnote|and see here]].<br /> <br /> === How do I load a Nexus file into mx? ===<br /> * See the &quot;Phylo&quot; tab and follow the directions [[App/data_source|here]].<br /> <br /> === What mechanisms are available for entering data? ===<br /> * Data can be entered in a number of different ways<br /> ** individually via forms<br /> ** in batches via the web interface<br /> ** in batches via the server side console (Rake tasks)<br /> ** individually via the Rails console<br /> <br /> === Manually entering data one a time can be very annoying, what kind of data can I batch load into mx? ===<br /> * Matrix related<br /> ** Nexus formatted matrices<br /> ** Lucid's .xls formatted exports<br /> ** Newick formatted trees <br /> * Specimen related<br /> ** [[app/specimen/batch_load|Specimens and lots]]<br /> ** Verbatim collecting events (labels)<br /> ** Individual Otu names<br /> * Nomeclature related<br /> ** Single word epithets (children) of taxon names (e.g. species names for a genus or genera of a family) <br /> * Image related<br /> ** Image files (via a Rake task/command line)<br /> ** References to MorphBank images<br /> * Reference related<br /> ** [[app/ref/endnote|Endnote]]<br /> * Sequence related<br /> * [[app/seq/seqs_from_FASTA|FASTA]]<br /> * Ontology related<br /> ** OBO files (instantiates labels including synonymy, classes, relations, and references provided as xrefs)<br /> ** Sensu tables ([label, definition, reference] combinations)<br /> <br /> === Can projects be merged? ===<br /> <br /> * Yes, data can be moved from one project to another, though not all synonymous data are merged at present. You'll need to use the console interface to do this. See the Proj#merge_to_project.<br /> <br /> == Data export/access ==<br /> <br /> === What formats can matrices be exported to? ===<br /> * OWL (CDAO), NeXML, Nexus, TNT, ASCII tables, and mx database tables<br /> <br /> === Is there an API? ===<br /> <br /> * Yes, an API is in early development, see [[App/API]].<br /> <br /> == Production servers ==<br /> <br /> === What's the preferred production/development update path? ===<br /> <br /> * BACKUP DATA with 'rake mx:db:dump_data RAILS_ENV=production', a dump goes in '''app home'''/db/dumps. Update source (at present the latest source is on the relatively stable /edge/branch). Migrate the database with 'rake db:migrate RAILS_ENV=development' (you may want to test prior to or after this step with 'rake test'). Dump the data again (first step). Copy this copy to '''app home'''/db/dumps in your development environment. Load it with 'rake mx:db:restore_last' (note his dumps the current development, so if the reload fails you'll have to delete this dump as it will be more recent than your production copy). Develop. Repeat.<br /> <br /> === Clicking on a figure on a public site is giving me a 404, how do I fix this? ===<br /> <br /> * Choose edit for project settings and make the figure controller public by checking it.<br /> <br /> == Matrix based species descriptions ==<br /> <br /> === Can mx generate matrix based descriptions? ===<br /> <br /> Yes. Mx has a very flexible content handling system which includes the functionality of using coded characters (sensu morphological phylogenetics) into species descriptions. This is similar functionality to that done in Delta, Lucid, or vSysLab, but with some modifications. See [[Matrix based descriptions]].<br /> <br /> == Taxonomic names ==<br /> <br /> === Why can't I see taxonomic names in my project? ===<br /> * Visibility of names is dynamically set. Go to the '''Taxon names''' tab, then '''more options'''-&gt;'''visibility''' select the parent node you want visible. The taxon names will now be visible and available for use. Removing names from visibility does not delete them, nor invalidate records that reference those names. Visibility is used to focus your workflow, limiting the options in the dropdown, and the data you are reviewing.<br /> <br /> * After initial installation no names will be visible. To start adding real taxa after you create a project make the root taxon visible via the visibility view in the &quot;Taxon names&quot; tab. Then the root will available as the parent of the highest taxonomic level included in your taxa list.<br /> [[Image:Root_visible.png|400 px|Use the visibility list in the Taxon names tab to make root visible]]<br /> <br /> === I can't create a taxon name? ===<br /> * Permissions are set at a by taxon level, have your administrator update the permissions for the given user.<br /> <br /> === My taxon names are repeated in different colors, why? ===<br /> * See the application help here [[App/otu]]<br /> <br /> == OTUs ==<br /> <br /> === See 'What are all these colorful OTU names?' ===<br /> * See the application help here [[App/otu]]<br /> <br /> == Users ==<br /> <br /> === How do I add someone to my project? ===<br /> * Mx uses a FOAF system for creating new accounts. After you sign in navigate to &lt;nowiki&gt;http://yourserver.foo.com/account/signup&lt;/nowiki&gt;. Signing up a new user also logs that person in, logout to return to your user. Select your project, click 'settings' and click the link to add a new user to a project.<br /> <br /> == General errors ==<br /> <br /> === I can't upload files, particularly pdfs, why? ===<br /> <br /> * Firefox has a known bug in which the MimeType can be corrupted. See [[http://cephas.net/blog/2007/01/05/firefox-mimetypesrdf-corruption/ this page]]. Close FF. Delete your mimeTypes.rdf file in your FF profile, reopen.<br /> <br /> == Production/server gotchas. ==<br /> <br /> === mx suddenly can't load pdfs or images. ===<br /> <br /> * There is an issue where /tmp directories are being cleaned out by chron jobs (on OS X we hit this with a monthly). The workaround is to restart the server (ugh), or mess with the PHP tmp directories. See http://code.google.com/p/phusion-passenger/issues/detail?id=365<br /> <br /> === rake db:migrate RAILS_ENV=production fails when a model is not found ===<br /> <br /> * This can occur when updates occur out of sync on in large groups. To resolve edit ''config/environments/production.rb'' and change the following line from true to false ''config.cache_classes = false'', run the migrations, then set back to true.<br /> <br /> == This wiki ==<br /> <br /> === There used to be some pages on this wiki, now I can't find them? ===<br /> <br /> * Mx has been used/in development for over 5 years now, as such there are various &quot;legacy&quot; pages here on the wiki that may or may not have as much relevance as they do now. [[Legacy pages]] for references to these.</div> Matt http://mx.phenomix.org/index.php/App/specimen/batch_load App/specimen/batch load 2011-10-13T19:51:30Z <p>Matt: /* Summary steps */</p> <hr /> <div>== Overview ==<br /> <br /> The batch loading functionality found here allows you to add specimen OR lot records from a spreadsheet format. Data are typically compiled in excel or google docs then exported to a tab delimited format which is read by the importer.<br /> <br /> == Summary steps ==<br /> <br /> # Assemble the import file.<br /> #* Each row must contain a header BUT not headers need be matches to those possible headers listed below. If they do not match they are ignored!<br /> #* The first row must contain the headers for each row. Only those columns that match the list below will be read. Columns with headers not matching are ignored.<br /> #* Each row represents a single specimen or lot.<br /> #* Each row must &lt;em&gt;match an existing OTU already in mx&lt;/em&gt;. Matching of row data to the existing is possible via various mechanisms (see table below).<br /> #** One possible mechanism for quickly adding new OTUs that don't exist is to use [http://code.google.com/p/google-refine/ Google Refine] on an 'otu_name' column.<br /> #**# Create a new project in Google refine by selecting the text file that you will later import.<br /> #**# Click on the arrow to the right of the 'otu_name' column and select 'Facet'-&gt;'Text facet'. A window to the left will highlight all unique names (as an side this is ''very'' useful for debugging your data, see the Google Refine tutorials). <br /> #**# Click '123 choices&quot; in the facet box, this will bring up a text file that you can copy/paste to a new text file.<br /> #**# Modify that file to include only 1 OTU name / line. <br /> #**# Navigate to OTU-&gt;'more options'-&gt;'batch load' and load your unique OTU names.<br /> # Once the file is ready for testing follow the batch loading instructions in mx.<br /> <br /> == Saving from Excel ==<br /> <br /> If you work in Excel to capture your data you'll be exporting it prior to loading it. Your data should be saved in one of the following formats, (topmost preferred).<br /> <br /> {|<br /> ! File format<br /> ! Character Encoding<br /> |-<br /> |Tab Delimited Text (.txt)<br /> |MACINTOSH or ISO-8859-1<br /> |-<br /> |Windows Formatted Text (.txt)<br /> |ISO-8859-1<br /> |-<br /> |UTF-16 Unicode Text (.txt)<br /> |UTF-16LE<br /> |}<br /> <br /> == Columns ==<br /> <br /> === Required for both lots and specimens ===<br /> <br /> otu_id<br /> <br /> ''or (both allowed if they match)''<br /> otu_name <br /> <br /> '''OR'''<br /> <br /> taxon_name_id<br /> ''or (both allowed if they match)''<br /> taxon_name_string<br /> <br /> === Required for Lots ===<br /> <br /> count<br /> <br /> === Required for Specimens ===<br /> <br /> identifier <br /> <br /> === Optional for Specimens and Lots ===<br /> <br /> '''One of'''<br /> <br /> ce_id<br /> verbatim_label<br /> <br /> '''One of'''<br /> <br /> repository_id<br /> repository_coden<br /> <br /> '''Any of'''<br /> sex<br /> stage<br /> notes<br /> data_entry_by<br /> <br /> === Optional for lots ===<br /> <br /> identifier<br /> <br /> === Optional for specimens ===<br /> <br /> '''An additional determination'''<br /> <br /> ''One of''<br /> det_name<br /> det_otu_id <br /> <br /> '' and any of ''<br /> determiner<br /> det_year<br /> det_basis<br /> <br /> '''A type designation'''<br /> <br /> ''both of''<br /> type<br /> type_of_taxon_name_id<br /> <br /> == Valid column heads on batch files == <br /> <br /> {|<br /> ! column headers<br /> ! description<br /> ! restrictions<br /> |-<br /> |ce_id<br /> |A mx collecting event id.<br /> |If present in a row then ''verbatim_label'' must be empty. <br /> |-<br /> |count<br /> |Total specimens in a lot.<br /> |If present in a row then ''identifier'' must be empty.<br /> |-<br /> |data_entry_by<br /> |A mx uses login. If supplied then all creator/updator fields are set to this person. If not supplied the creator is the person logged in.<br /> |None.<br /> |-<br /> |det_basis<br /> |Free text describing how the specimen. determination was made.<br /> |Requires ''det_name'' or 'det_otu_id' to be included. Not applicable to lots.<br /> |-<br /> |det_name<br /> |Free text determination of specimen.<br /> |If present in a row then ''det_otu_id'' must be empty. Not applicable to lots.<br /> |-<br /> |det_otu_id <br /> |An id of an mx OTU that the specimen is determined as.<br /> |If present in a row then ''det_name'' must be empty. Not applicable to lots.<br /> |-<br /> |det_year<br /> |A year in which a determination is made. <br /> |Requires ''det_otu_id'' or ''det_name'' to be present. Not applicable to lots.<br /> |-<br /> |determiner<br /> |Free text indicator of determiner.<br /> |Requires ''det_otu_id'' or ''det_name'' to be present. Not applicable to lots.<br /> |-<br /> |identifier<br /> |An identifier in the form of &quot;namespace identifier&quot;, like &quot;NCSU 1234&quot;. <br /> |The namespace must be present in mx. Applicable to lots or specimens. Identifiers must be unique with an mx project (i.e. lots and specimens can not share identifiers).<br /> |-<br /> |notes<br /> |Free text notes.<br /> |None.<br /> |-<br /> |otu_id<br /> |A mx OTU id to which a specimen or lot is primarily attached.<br /> |Must match an OTU found by ''otu_name'' if ''otu_name'' is also provided.<br /> |-<br /> |otu_name <br /> |A mx OTU ''name'' (not associated taxon name, manuscript name, nor matrix name) which identifies the specimen. <br /> |The named OTU must exist in the database. Must match the OTU indicated by ''otu_id'' if ''otu_id'' is also provide. If ''otu_id'' is not provided must be unique for the given project. <br /> |-<br /> |repository_coden<br /> |A mx repository coden, like &quot;NCSU&quot;.<br /> |Must match a coden in repositories. If provided ''repository_id'' must be empty.<br /> |-<br /> |repository_id<br /> |A mx id matching a respository.<br /> |Must match a coden in repositories. If provided ''repository_coden'' must be empty.<br /> |-<br /> |sex<br /> |Free text determination of sex, standard use is &quot;male&quot; or &quot;female&quot;. Applicable to lots or specimens. <br /> |None.<br /> |-<br /> |stage<br /> |Free text determination of stage. Applicable to lots or specimens.<br /> |None.<br /> |-<br /> |taxon_name_id<br /> |Mx taxon name id which identifiers a specimen.<br /> |Must be tied to a single OTU. Applicable to specimens only. Must be empty if ''otu_id'' or ''otu_name'' is provided. Must match ''taxon_name_string'' if ''taxon_name_string'' is provided.<br /> |-<br /> |taxon_name_string<br /> |Mx taxon name which identifiers a specimen.<br /> |Name in mx must be unique, and associated id must be tied to a single OTU. Applicable to specimens only. Must be empty if ''otu_id'' or ''otu_name'' is provided. Must match ''taxon_name_id'' if ''taxon_name_string'' is provided. At present matches only single word string. <br /> |-<br /> |type<br /> |The code recognized type status of the specimen. Like &quot;holotype&quot;, &quot;paratype&quot;, &quot;syntype&quot;, &quot;neotype&quot;, or &quot;paralectotype&quot;. Not for non governed things like &quot;allotype&quot;.<br /> |Applicable to specimens only. Must be used in combination with ''type_of_taxon_name_id''.<br /> |-<br /> |type_of_taxon_name_id<br /> |The mx taxon name id that the ''type'' refers to.<br /> |Applicable to specimens only. Must be used in combination with ''type''. <br /> |-<br /> |verbatim_label<br /> |The verbatim text of the label(s) of the specimen or lot. Identical ''verbatim_labels'' are tied to a single collecting event in mx. Individual lines can be separated with &quot;&amp;#124;&amp;#124;&quot;, individual labels can be separated with &quot;++&quot;. &quot;&amp;#124;&amp;#124;&quot; and '++' will be replaced with one and two new lines respectively.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |latitude<br /> |A real number in decimal degrees format.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |longitude<br /> |A real number in decimal degrees format. <br /> |Must be empty if ce_id is provided.<br /> |-<br /> |elev_min<br /> |A real number indicating the minimum elevation of the elevation range.<br /> |Must be empty if ce_id is provided. Required if elev_max provided. <br /> |-<br /> |elev_max<br /> |A real number indicating the maximum elevation of the elevation range.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |elev_unit<br /> |&quot;feet&quot; or &quot;meters&quot;. <br /> |Must be empty if ce_id is provided. Required if elev_min included. <br /> |-<br /> |geog_id<br /> |An mx id for a geographic unit that indicates the finest geographic unit for the collecting event.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |method<br /> |Interpreted version of the method given on the label (not verbatim).<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |locality<br /> |Free text description of the locality, e.g. &quot;1.5 km N Calgary&quot;<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_d<br /> |Verbatim, max 2 character field in roman numeral or integer. <br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_m<br /> |Verbatim, max 2 character field in roman numeral or integer.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |sd_y<br /> |Verbatim, max 4 character integer.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |ed_d<br /> |Verbatim, max 2 character field in roman numeral or integer. <br /> |Must be empty if ce_id is provided. <br /> |-<br /> |ed_m<br /> |Verbatim, max 2 character field in roman numeral or integer.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |ed_y<br /> |Verbatim, max 4 character integer.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |time_start<br /> |Hours:Minutes, like &quot;13:23&quot;. 24 hour clock.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |time_end<br /> |Hours:Minutes, like &quot;13:23&quot;. 24 hour clock.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |collectors<br /> |Verbatim.<br /> |Must be empty if ce_id is provided. <br /> |-<br /> |micro_habitat<br /> |Verbatim.<br /> |Must be empty if ce_id is provided.<br /> |-<br /> |macro_habitat<br /> |Verbatim.<br /> |Must be empty if ce_id is provided. <br /> |}</div> Matt http://mx.phenomix.org/index.php/User:Aaron User:Aaron 2011-10-10T19:42:37Z <p>Matt: Creating user page with biography of new user.</p> <hr /> <div>postdoc at ASU working on Tenebrionidae systematics</div> Matt http://mx.phenomix.org/index.php/User_talk:Aaron User talk:Aaron 2011-10-10T19:42:37Z <p>Matt: Welcome!</p> <hr /> <div>'''Welcome to ''mx''!'''<br /> We hope you will contribute much and well.<br /> You will probably want to read the [[Help:Contents|help pages]].<br /> Again, welcome and have fun! [[User:Matt|matt]] 19:42, 10 October 2011 (UTC)</div> Matt http://mx.phenomix.org/index.php/User:Isaac_Winkler User:Isaac Winkler 2011-10-10T19:42:28Z <p>Matt: Creating user page with biography of new user.</p> <hr /> <div>I am a postdoc at North Carolina State University, working on phylogeny and evolution of Empidine dance flies.</div> Matt http://mx.phenomix.org/index.php/User_talk:Isaac_Winkler User talk:Isaac Winkler 2011-10-10T19:42:28Z <p>Matt: Welcome!</p> <hr /> <div>'''Welcome to ''mx''!'''<br /> We hope you will contribute much and well.<br /> You will probably want to read the [[Help:Contents|help pages]].<br /> Again, welcome and have fun! [[User:Matt|matt]] 19:42, 10 October 2011 (UTC)</div> Matt http://mx.phenomix.org/index.php/User:Vladimir_Gapeyev User:Vladimir Gapeyev 2011-10-10T13:27:43Z <p>Matt: Creating user page with biography of new user.</p> <hr /> <div>Informatics Group member at NESCent, Durham, NC.</div> Matt http://mx.phenomix.org/index.php/User_talk:Vladimir_Gapeyev User talk:Vladimir Gapeyev 2011-10-10T13:27:43Z <p>Matt: Welcome!</p> <hr /> <div>'''Welcome to ''mx''!'''<br /> We hope you will contribute much and well.<br /> You will probably want to read the [[Help:Contents|help pages]].<br /> Again, welcome and have fun! [[User:Matt|matt]] 13:27, 10 October 2011 (UTC)</div> Matt http://mx.phenomix.org/index.php/User_talk:Karen_Cranston User talk:Karen Cranston 2011-10-10T13:27:32Z <p>Matt: Welcome!</p> <hr /> <div>'''Welcome to ''mx''!'''<br /> We hope you will contribute much and well.<br /> You will probably want to read the [[Help:Contents|help pages]].<br /> Again, welcome and have fun! [[User:Matt|matt]] 13:27, 10 October 2011 (UTC)</div> Matt http://mx.phenomix.org/index.php/User:Karen_Cranston User:Karen Cranston 2011-10-10T13:27:31Z <p>Matt: Creating user page with biography of new user.</p> <hr /> <div>Karen is the Informatics Project Manager at NESCent (the National Evolutionary Synthesis Center).</div> Matt http://mx.phenomix.org/index.php/Installation Installation 2011-09-26T14:07:14Z <p>Matt: /* Configuring file and image storage */</p> <hr /> <div>&lt;div style=&quot;float:right;margin: 10px;&quot;&gt;__TOC__&lt;/div&gt;<br /> <br /> == Overview ==<br /> <br /> mx can be installed locally for development or testing purposes or on a server. If you're seriously considering supporting a mx installation in your lab or workplace you should have an intermediate to advanced programmer or server admin on your team. &lt;span style=&quot;color:red;&quot;&gt;Because of the relatively rapid updates to mx we recommend that you should presently use the edge branch.&lt;/span&gt; <br /> <br /> == Dependencies ==<br /> <br /> === Required ===<br /> <br /> ==== [http://www.mysql.com/ MySQL] ==== <br /> <br /> * MySQL 5.n is in use on development and production servers. Its easiest to install the community addition with the startup item, then reboot.<br /> <br /> * There are many examples of how to install and [[secure your mysql|secure MySQL]] on your machine available on whe world-wide web. If you are using OS X chances are you have a copy installed already (it will need configuration if you haven't already done so).<br /> <br /> ==== [http://www.ruby-lang.org/en/ Ruby] ==== <br /> <br /> * If you don't already have Ruby (most *nix systems come with it installed) you can find more about it [http://www.ruby-lang.org here]. Ruby v. 1.8.7 or higher is now required. We recommend building from source. Get the source [http://www.ruby-lang.org/en/ here].<br /> <br /> ==== [http://docs.rubygems.org/read/chapter/3 RubyGems ] ====<br /> <br /> * Its easiest to install several Ruby packages (including Rails) through the Ruby package manager RubyGems. <br /> <br /> ''&lt;span style=&quot;color:red;&quot;&gt;IMPORTANT&lt;/span&gt;: There are issues with the rubygems &gt; 1.7.2 and mx, the last known rubygem version to work is 1.7.2.'' This issue (and many others) should disappear when we finish the jump to Rails 3. A possible ''untested'' workaround is to use Rails 2.3.12.<br /> <br /> ==== [http://www.rubyonrails.org/ Rails] ==== <br /> <br /> ''' Production is now using Rails 2.3.10. Install the required version with the -v flag. '''<br /> <br /> * Do (appending --no-rdoc will speed things up, but not install local documentation):<br /> <br /> gem install rails -v=2.3.10 --include-dependencies --no-rdoc<br /> <br /> === Optional ===<br /> <br /> ==== [http://www.imagemagick.org/script/index.php ImageMagik] ====<br /> <br /> * NOTE: This is optional, and not required for MorphBank images.<br /> * The tools 'convert' and 'identify' must be in your ''systems'' PATH, copying them to /usr/bin generally works. You do not need a rubygem hook.<br /> * Ensure that you have created the necessary paths for storing the images.<br /> * If possible install the additional jpg, tiff, png, and gs libraries before installing ImageMagick, this will let you handle additional image formats.<br /> <br /> ==== Passenger ====<br /> <br /> * Used only on a production server.<br /> * If you are running passenger, on CentOS/RHEL 5 servers there is a default daily chron that deletes some necessary passenger files in /tmp/passenger.PID. The easiest way to deal with this is to set the PassengerTempDir in the apache conf to something else, like so:<br /> <br /> PassengerTempDir /some_other_tmp_dir<br /> <br /> == Installation == <br /> <br /> === Stepwise overview ===<br /> <br /> # Install the required software (see above). There are numerous external sites that will help with installing these software, as such their installation is not documented here.<br /> # Download the mx source and required gems.<br /> # Create the database(s)<br /> # Populate the database with some initial data<br /> # Configure the local environment<br /> # Configure your folders<br /> # Start the server<br /> <br /> === Download the mx source ===<br /> <br /> The preferred method is now to checkout the source from [http://sourceforge.net/projects/mx-database/ Sourceforge] using [[http://subversion.tigris.org/ SVN]]]. <br /> <br /> &lt;em&gt;The (trunk) branch is now permanently deprecated, ignore it.&lt;/em&gt; <br /> <br /> For developers or those wanting to see the latest changes an edge branch that should be relatively stable but may contain production restricting commits is here:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database/branches/edge your_local_folder_name_here<br /> <br /> Several site-specific branches are being added, these are not recommended as a base for new installs but do provide a lot of example code. To grab everything you can just do:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database your_local_folder_name_here<br /> <br /> === Get the required gems ===<br /> <br /> Depending on the checkout you downloaded you might need to install the ruby-debug gem ''first'' (note for Ruby 1.9.1 users you will likely need to install the ruby-debug19 gem).<br /> <br /> ''sudo'' gem install ruby-debug<br /> <br /> You need various Ruby gems listed in the ''environment.rb''. The easiest way to install them all is to enter your mx folder (you should see the folders 'app', 'config' etc. if you are in the right place) and type:<br /> <br /> ''sudo'' rake gems:install<br /> <br /> &lt;span style=&quot;color:red;&quot;&gt;'''Note that the native mysql gem is nearly always problematic, and you might have to work at getting it installed.'''&lt;/span&gt; <br /> You can try:<br /> <br /> sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br /> <br /> On RHEL (after ''yum install mysql-devel'') this worked:<br /> <br /> gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config <br /> <br /> On Ubuntu 9.10 ([https://help.ubuntu.com/community/RubyOnRails see also here]) this worked:<br /> <br /> sudo apt-get install libmysqlclient-dev<br /> sudo gem install mysql<br /> <br /> See [http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard here], or [http://www.macruby.org/trac/wiki/Troubleshooting here], and more recently [http://techliberty.blogspot.com/ here] for other possible solutions if you have no luck with the above.<br /> <br /> === Configuring the database ===<br /> <br /> ==== Create the databases ====<br /> <br /> These instructions follow the defaults included in the database.yml file. Edit that file to change your configuration as necessary. <br /> <br /> If you haven't yet create the databases (don't forget the ';' for mysql <br /> commands):<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> create database mx_test;<br /> create database mx_development;<br /> create database mx_production;<br /> <br /> You'll need to add a MySQL account so that the app can access the database:<br /> <br /> GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';<br /> <br /> Repeat the above but swap out the word development for 'test' and 'production'.<br /> <br /> ==== Build the tables and populate some initial data ====<br /> <br /> &lt;div style=&quot;text-align:center; color:green;&quot;&gt;''Do this step if you have are starting from scratch, and have no existing mx dump to work with. If you have a mx data dump (see below) skip to &quot;Import existing data&quot;.''&lt;/div&gt;<br /> <br /> Exit mysql and navigate to the root of your mx install. Create the development database with the rake task (you may need to prefix with 'sudo'):<br /> <br /> rake db:migrate RAILS_ENV=development<br /> <br /> You can create the production database like so if necessary:<br /> <br /> rake db:migrate RAILS_ENV=production<br /> <br /> To create the test database do<br /> <br /> rake db:test:clone_structure<br /> <br /> Anytime the source is updated just repeat the rake db:migrate and your database will be updated if there are changes. There are several [[Rake tasks| rake tasks available for dumping and restoring data]], make sure to check them out.<br /> <br /> A single user with administrator privileges will have to be manually added to the 'people' tables prior to using mx. Once this user is added additional users can be added from the mx interface.<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> use mx_development;<br /> insert into people (first_name, last_name, login, password, is_admin,<br /> creates_projects) values ('joe', 'smith', 'jsmith', sha1('foosomepwdbar'), 1,1);<br /> <br /> * IMPORTANT - you must wrap 'foo' and 'bar' around your password in the above line. In the example above the password for 'jsmith' is 'somepwd' #<br /> <br /> While in the MySQL client you'll also want to add a root node to your taxonomic names hierarchy (this assumes the admin you created has id 1).<br /> <br /> insert into taxon_names (name, cached_display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);<br /> <br /> ==== Importing existing data ====<br /> <br /> If you have access to an existing dump of mx data (it will look something like &quot;2011_08_19_110700.sql&quot;) generated by you or an existing mx adminstrator, then you need not do the 'Build the tables and populate some initial data' step. To use this data copy the .sql file ''mx_root''/db/dumps, then do this<br /> <br /> rake mx:db:restore_last RAILS_ENV=development<br /> <br /> This will both build the database and load your data dump into it.<br /> <br /> === Configure the mx environment ===<br /> <br /> If you are starting with a new mx, i.e. not a version in production somehwere, you'll need to configure the local environment.<br /> <br /> Open<br /> <br /> /config/initializers/local_config.rb <br /> <br /> and update the various FOO variables as needed, see comments therein.<br /> <br /> You'll need to grab [http://code.google.com/apis/maps/signup.html GoogleMaps API keys] and add them to BOTH of:<br /> <br /> GMAPS_KEY_PRODUCTION<br /> GMAPS_KEY_DEVELOPMENT<br /> <br /> Finally, replace the emails in<br /> <br /> ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bob@gmail.com)<br /> <br /> with those you want e-mails to be sent to when errors are thrown.<br /> <br /> === Configure your operating system environment ===<br /> <br /> ==== Specific to *nix systems: check the path of your MySQL socket ====<br /> <br /> By default, the path of mysql.sock is set to<br /> /tmp/mysql.sock<br /> <br /> However, several distributions do not use this path. To change it edit the file<br /> config/database.yml<br /> and replace the 3 occurrences of<br /> socket: /tmp/mysql.sock<br /> by your actual path. For instance in Ubuntu<br /> socket: /var/run/mysqld/mysqld.sock<br /> <br /> === Configuring file and image storage ===<br /> <br /> Edit the /config/initializers/local_config.rb file and configure the various FILE_PATH variables, for development they can typically be left alone. If left as-is they correspond to the folders that you'll need to create as below:<br /> <br /> public/files<br /> public/files/images<br /> public/files/images/big<br /> public/files/images/medium<br /> public/files/images/original<br /> public/files/images/thumb<br /> public/files/pdfs<br /> public/files/datasets<br /> public/files/chromatograms<br /> <br /> On a *nix system you can also use a symbolic link to keep your images, pdfs, and datasets elsewhere.<br /> <br /> === Test your configurations/environment ===<br /> <br /> Do<br /> <br /> rake test<br /> <br /> This runs the numerous internal tests, it take some time. While you'll typically see a few fail the vast majority should pass. If they do chances are your environment is correctly configured.<br /> <br /> === Start the server (development) ===<br /> <br /> Try starting the sever, depending on your operating system you may have to set some permission.<br /> <br /> ruby script/server<br /> <br /> Navigate to [http://127.0.0.1:3000 http://127.0.0.1:3000]<br /> <br /> You may see the following problems at this point (solution in []).<br /> <br /> * &lt;em&gt;schema.rb doesn't exist yet. Run &quot;rake db:migrate&quot; to create it then try again.&lt;/em&gt; [Run &quot;rake db:migrate&quot; (and see below).<br /> * &lt;em&gt;Rails Error: Unable to access log file.&lt;/em&gt; [Change permissions on the /log folder so that it is writable. In development just do &quot;chmod 755 log&quot;. Then, in the log folder, do &quot;echo '' &gt; development.log&quot;, followed by &quot;chmod 666 development.log&quot;. If you are on a mac or linux machine you may need to prefix these commands with &quot;sudo&quot;.]<br /> <br /> === Troubleshooting ===<br /> <br /> ==== Configuring my.cnf ====<br /> <br /> If you get a 'Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:' you can add the following line to your my.cnf under [mysqld]: 'max_allowed_packet = 32M;'.<br /> <br /> == Usage (development) ==<br /> <br /> === Using the server/application ===<br /> <br /> To test/develop in development mode navigate to the root of your installation and type<br /> <br /> ruby script/server<br /> <br /> Open a web browser and browse to <br /> <br /> 127.0.0.1:3000<br /> <br /> You should see a login page. If you see the mx page but no login fields then you have not correctly added your administrator user.<br /> <br /> Once logged in navigate to <br /> <br /> 127.0.0.1:3000/admin<br /> <br /> to create new projects.<br /> <br /> You can also navigate to <br /> <br /> 127.0.0.1:3000/account/signup<br /> <br /> to add regular users.<br /> <br /> == Upgrading ==<br /> <br /> Once you have mx installed upgrading should be relatively straightforward. First, make a backup of both the database and the application, we assume you know where your data reside by this point, and we assume that you know that things can go horribly wrong. After backing up replace the old source with the new (see below for comments). Then, make sure you have the required Rails/Gems (plugins are included in the source already). Finally, run the rake task to update the database like so:<br /> <br /> rake db:migrate RAILS_ENV=&lt;development|production&gt;<br /> <br /> Its always a good idea to run the test suite as well, this will give you a good idea of what possible problems you might still have.<br /> <br /> rake test<br /> <br /> == Usage (production) ==<br /> <br /> Production installation follows, for the most part, the same installation process as above. See the Rails homepage for setting up the server. Note that only users with accounts can see data in a clean installation of mx, i.e. you must manually configure the installation to make data available to the public.<br /> <br /> If you plan to set up a production installation of mx, it would be a good idea to read chapter 27 of ''Agile Web Development with Rails'', second edition.<br /> <br /> === Production with no customizations ===<br /> <br /> We don't have Capistrano working, so essentially you'll have to devise your own method of rolling to production, we use an SVN checkout for now.<br /> <br /> === Production with customizations ===<br /> <br /> If you have begun to build public front ends you know where your custom code resides (/public, /app/models/public, /app/controllers/public, /app/views/public), manage these as you like.<br /> <br /> === Apache configuration ===<br /> <br /> If you plan to use the API functionality you'll need add the following to your virtual .conf:<br /> <br /> AllowEncodedSlashes On<br /> <br /> == Legacy notes on installation / configuration == <br /> <br /> * These notes: [[one person's experience with installing mx]] also include Mac install instructions, but these do not include Ruby install instructions.<br /> * Very good installation notes for Ubuntu hardy can be found on the [[http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails Slicehost blog]] (November, 2008).<br /> * Notes for [[Server configuration | Server set up note here]].</div> Matt http://mx.phenomix.org/index.php/Installation Installation 2011-09-26T14:05:29Z <p>Matt: /* Configuring file and image storage */</p> <hr /> <div>&lt;div style=&quot;float:right;margin: 10px;&quot;&gt;__TOC__&lt;/div&gt;<br /> <br /> == Overview ==<br /> <br /> mx can be installed locally for development or testing purposes or on a server. If you're seriously considering supporting a mx installation in your lab or workplace you should have an intermediate to advanced programmer or server admin on your team. &lt;span style=&quot;color:red;&quot;&gt;Because of the relatively rapid updates to mx we recommend that you should presently use the edge branch.&lt;/span&gt; <br /> <br /> == Dependencies ==<br /> <br /> === Required ===<br /> <br /> ==== [http://www.mysql.com/ MySQL] ==== <br /> <br /> * MySQL 5.n is in use on development and production servers. Its easiest to install the community addition with the startup item, then reboot.<br /> <br /> * There are many examples of how to install and [[secure your mysql|secure MySQL]] on your machine available on whe world-wide web. If you are using OS X chances are you have a copy installed already (it will need configuration if you haven't already done so).<br /> <br /> ==== [http://www.ruby-lang.org/en/ Ruby] ==== <br /> <br /> * If you don't already have Ruby (most *nix systems come with it installed) you can find more about it [http://www.ruby-lang.org here]. Ruby v. 1.8.7 or higher is now required. We recommend building from source. Get the source [http://www.ruby-lang.org/en/ here].<br /> <br /> ==== [http://docs.rubygems.org/read/chapter/3 RubyGems ] ====<br /> <br /> * Its easiest to install several Ruby packages (including Rails) through the Ruby package manager RubyGems. <br /> <br /> ''&lt;span style=&quot;color:red;&quot;&gt;IMPORTANT&lt;/span&gt;: There are issues with the rubygems &gt; 1.7.2 and mx, the last known rubygem version to work is 1.7.2.'' This issue (and many others) should disappear when we finish the jump to Rails 3. A possible ''untested'' workaround is to use Rails 2.3.12.<br /> <br /> ==== [http://www.rubyonrails.org/ Rails] ==== <br /> <br /> ''' Production is now using Rails 2.3.10. Install the required version with the -v flag. '''<br /> <br /> * Do (appending --no-rdoc will speed things up, but not install local documentation):<br /> <br /> gem install rails -v=2.3.10 --include-dependencies --no-rdoc<br /> <br /> === Optional ===<br /> <br /> ==== [http://www.imagemagick.org/script/index.php ImageMagik] ====<br /> <br /> * NOTE: This is optional, and not required for MorphBank images.<br /> * The tools 'convert' and 'identify' must be in your ''systems'' PATH, copying them to /usr/bin generally works. You do not need a rubygem hook.<br /> * Ensure that you have created the necessary paths for storing the images.<br /> * If possible install the additional jpg, tiff, png, and gs libraries before installing ImageMagick, this will let you handle additional image formats.<br /> <br /> ==== Passenger ====<br /> <br /> * Used only on a production server.<br /> * If you are running passenger, on CentOS/RHEL 5 servers there is a default daily chron that deletes some necessary passenger files in /tmp/passenger.PID. The easiest way to deal with this is to set the PassengerTempDir in the apache conf to something else, like so:<br /> <br /> PassengerTempDir /some_other_tmp_dir<br /> <br /> == Installation == <br /> <br /> === Stepwise overview ===<br /> <br /> # Install the required software (see above). There are numerous external sites that will help with installing these software, as such their installation is not documented here.<br /> # Download the mx source and required gems.<br /> # Create the database(s)<br /> # Populate the database with some initial data<br /> # Configure the local environment<br /> # Configure your folders<br /> # Start the server<br /> <br /> === Download the mx source ===<br /> <br /> The preferred method is now to checkout the source from [http://sourceforge.net/projects/mx-database/ Sourceforge] using [[http://subversion.tigris.org/ SVN]]]. <br /> <br /> &lt;em&gt;The (trunk) branch is now permanently deprecated, ignore it.&lt;/em&gt; <br /> <br /> For developers or those wanting to see the latest changes an edge branch that should be relatively stable but may contain production restricting commits is here:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database/branches/edge your_local_folder_name_here<br /> <br /> Several site-specific branches are being added, these are not recommended as a base for new installs but do provide a lot of example code. To grab everything you can just do:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database your_local_folder_name_here<br /> <br /> === Get the required gems ===<br /> <br /> Depending on the checkout you downloaded you might need to install the ruby-debug gem ''first'' (note for Ruby 1.9.1 users you will likely need to install the ruby-debug19 gem).<br /> <br /> ''sudo'' gem install ruby-debug<br /> <br /> You need various Ruby gems listed in the ''environment.rb''. The easiest way to install them all is to enter your mx folder (you should see the folders 'app', 'config' etc. if you are in the right place) and type:<br /> <br /> ''sudo'' rake gems:install<br /> <br /> &lt;span style=&quot;color:red;&quot;&gt;'''Note that the native mysql gem is nearly always problematic, and you might have to work at getting it installed.'''&lt;/span&gt; <br /> You can try:<br /> <br /> sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br /> <br /> On RHEL (after ''yum install mysql-devel'') this worked:<br /> <br /> gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config <br /> <br /> On Ubuntu 9.10 ([https://help.ubuntu.com/community/RubyOnRails see also here]) this worked:<br /> <br /> sudo apt-get install libmysqlclient-dev<br /> sudo gem install mysql<br /> <br /> See [http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard here], or [http://www.macruby.org/trac/wiki/Troubleshooting here], and more recently [http://techliberty.blogspot.com/ here] for other possible solutions if you have no luck with the above.<br /> <br /> === Configuring the database ===<br /> <br /> ==== Create the databases ====<br /> <br /> These instructions follow the defaults included in the database.yml file. Edit that file to change your configuration as necessary. <br /> <br /> If you haven't yet create the databases (don't forget the ';' for mysql <br /> commands):<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> create database mx_test;<br /> create database mx_development;<br /> create database mx_production;<br /> <br /> You'll need to add a MySQL account so that the app can access the database:<br /> <br /> GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';<br /> <br /> Repeat the above but swap out the word development for 'test' and 'production'.<br /> <br /> ==== Build the tables and populate some initial data ====<br /> <br /> &lt;div style=&quot;text-align:center; color:green;&quot;&gt;''Do this step if you have are starting from scratch, and have no existing mx dump to work with. If you have a mx data dump (see below) skip to &quot;Import existing data&quot;.''&lt;/div&gt;<br /> <br /> Exit mysql and navigate to the root of your mx install. Create the development database with the rake task (you may need to prefix with 'sudo'):<br /> <br /> rake db:migrate RAILS_ENV=development<br /> <br /> You can create the production database like so if necessary:<br /> <br /> rake db:migrate RAILS_ENV=production<br /> <br /> To create the test database do<br /> <br /> rake db:test:clone_structure<br /> <br /> Anytime the source is updated just repeat the rake db:migrate and your database will be updated if there are changes. There are several [[Rake tasks| rake tasks available for dumping and restoring data]], make sure to check them out.<br /> <br /> A single user with administrator privileges will have to be manually added to the 'people' tables prior to using mx. Once this user is added additional users can be added from the mx interface.<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> use mx_development;<br /> insert into people (first_name, last_name, login, password, is_admin,<br /> creates_projects) values ('joe', 'smith', 'jsmith', sha1('foosomepwdbar'), 1,1);<br /> <br /> * IMPORTANT - you must wrap 'foo' and 'bar' around your password in the above line. In the example above the password for 'jsmith' is 'somepwd' #<br /> <br /> While in the MySQL client you'll also want to add a root node to your taxonomic names hierarchy (this assumes the admin you created has id 1).<br /> <br /> insert into taxon_names (name, cached_display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);<br /> <br /> ==== Importing existing data ====<br /> <br /> If you have access to an existing dump of mx data (it will look something like &quot;2011_08_19_110700.sql&quot;) generated by you or an existing mx adminstrator, then you need not do the 'Build the tables and populate some initial data' step. To use this data copy the .sql file ''mx_root''/db/dumps, then do this<br /> <br /> rake mx:db:restore_last RAILS_ENV=development<br /> <br /> This will both build the database and load your data dump into it.<br /> <br /> === Configure the mx environment ===<br /> <br /> If you are starting with a new mx, i.e. not a version in production somehwere, you'll need to configure the local environment.<br /> <br /> Open<br /> <br /> /config/initializers/local_config.rb <br /> <br /> and update the various FOO variables as needed, see comments therein.<br /> <br /> You'll need to grab [http://code.google.com/apis/maps/signup.html GoogleMaps API keys] and add them to BOTH of:<br /> <br /> GMAPS_KEY_PRODUCTION<br /> GMAPS_KEY_DEVELOPMENT<br /> <br /> Finally, replace the emails in<br /> <br /> ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bob@gmail.com)<br /> <br /> with those you want e-mails to be sent to when errors are thrown.<br /> <br /> === Configure your operating system environment ===<br /> <br /> ==== Specific to *nix systems: check the path of your MySQL socket ====<br /> <br /> By default, the path of mysql.sock is set to<br /> /tmp/mysql.sock<br /> <br /> However, several distributions do not use this path. To change it edit the file<br /> config/database.yml<br /> and replace the 3 occurrences of<br /> socket: /tmp/mysql.sock<br /> by your actual path. For instance in Ubuntu<br /> socket: /var/run/mysqld/mysqld.sock<br /> <br /> === Configuring file and image storage ===<br /> <br /> Edit the /config/initializers/local_config.rb file and configure the various FILE_PATH variables, for development they can typically be left alone. If left as-is they correspond to the folders that you'll need to create as below:<br /> <br /> public/files<br /> public/files/images<br /> public/files/images/big<br /> public/files/images/medium<br /> public/files/images/original<br /> public/files/images/thumb<br /> public/files/pdfs<br /> public/files/datasets<br /> public/files/chromatograms<br /> <br /> On a *nix system you can also use a symbolic link to keep your images, pdfs, and datasets elsewhere.<br /> <br /> === Start the server (development) ===<br /> <br /> Try starting the sever, depending on your operating system you may have to set some permission.<br /> <br /> ruby script/server<br /> <br /> Navigate to [http://127.0.0.1:3000 http://127.0.0.1:3000]<br /> <br /> You may see the following problems at this point (solution in []).<br /> <br /> * &lt;em&gt;schema.rb doesn't exist yet. Run &quot;rake db:migrate&quot; to create it then try again.&lt;/em&gt; [Run &quot;rake db:migrate&quot; (and see below).<br /> * &lt;em&gt;Rails Error: Unable to access log file.&lt;/em&gt; [Change permissions on the /log folder so that it is writable. In development just do &quot;chmod 755 log&quot;. Then, in the log folder, do &quot;echo '' &gt; development.log&quot;, followed by &quot;chmod 666 development.log&quot;. If you are on a mac or linux machine you may need to prefix these commands with &quot;sudo&quot;.]<br /> <br /> === Troubleshooting ===<br /> <br /> ==== Configuring my.cnf ====<br /> <br /> If you get a 'Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:' you can add the following line to your my.cnf under [mysqld]: 'max_allowed_packet = 32M;'.<br /> <br /> == Usage (development) ==<br /> <br /> === Using the server/application ===<br /> <br /> To test/develop in development mode navigate to the root of your installation and type<br /> <br /> ruby script/server<br /> <br /> Open a web browser and browse to <br /> <br /> 127.0.0.1:3000<br /> <br /> You should see a login page. If you see the mx page but no login fields then you have not correctly added your administrator user.<br /> <br /> Once logged in navigate to <br /> <br /> 127.0.0.1:3000/admin<br /> <br /> to create new projects.<br /> <br /> You can also navigate to <br /> <br /> 127.0.0.1:3000/account/signup<br /> <br /> to add regular users.<br /> <br /> == Upgrading ==<br /> <br /> Once you have mx installed upgrading should be relatively straightforward. First, make a backup of both the database and the application, we assume you know where your data reside by this point, and we assume that you know that things can go horribly wrong. After backing up replace the old source with the new (see below for comments). Then, make sure you have the required Rails/Gems (plugins are included in the source already). Finally, run the rake task to update the database like so:<br /> <br /> rake db:migrate RAILS_ENV=&lt;development|production&gt;<br /> <br /> Its always a good idea to run the test suite as well, this will give you a good idea of what possible problems you might still have.<br /> <br /> rake test<br /> <br /> == Usage (production) ==<br /> <br /> Production installation follows, for the most part, the same installation process as above. See the Rails homepage for setting up the server. Note that only users with accounts can see data in a clean installation of mx, i.e. you must manually configure the installation to make data available to the public.<br /> <br /> If you plan to set up a production installation of mx, it would be a good idea to read chapter 27 of ''Agile Web Development with Rails'', second edition.<br /> <br /> === Production with no customizations ===<br /> <br /> We don't have Capistrano working, so essentially you'll have to devise your own method of rolling to production, we use an SVN checkout for now.<br /> <br /> === Production with customizations ===<br /> <br /> If you have begun to build public front ends you know where your custom code resides (/public, /app/models/public, /app/controllers/public, /app/views/public), manage these as you like.<br /> <br /> === Apache configuration ===<br /> <br /> If you plan to use the API functionality you'll need add the following to your virtual .conf:<br /> <br /> AllowEncodedSlashes On<br /> <br /> == Legacy notes on installation / configuration == <br /> <br /> * These notes: [[one person's experience with installing mx]] also include Mac install instructions, but these do not include Ruby install instructions.<br /> * Very good installation notes for Ubuntu hardy can be found on the [[http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails Slicehost blog]] (November, 2008).<br /> * Notes for [[Server configuration | Server set up note here]].</div> Matt http://mx.phenomix.org/index.php/Installation Installation 2011-09-26T14:03:35Z <p>Matt: /* Start the server (development) */</p> <hr /> <div>&lt;div style=&quot;float:right;margin: 10px;&quot;&gt;__TOC__&lt;/div&gt;<br /> <br /> == Overview ==<br /> <br /> mx can be installed locally for development or testing purposes or on a server. If you're seriously considering supporting a mx installation in your lab or workplace you should have an intermediate to advanced programmer or server admin on your team. &lt;span style=&quot;color:red;&quot;&gt;Because of the relatively rapid updates to mx we recommend that you should presently use the edge branch.&lt;/span&gt; <br /> <br /> == Dependencies ==<br /> <br /> === Required ===<br /> <br /> ==== [http://www.mysql.com/ MySQL] ==== <br /> <br /> * MySQL 5.n is in use on development and production servers. Its easiest to install the community addition with the startup item, then reboot.<br /> <br /> * There are many examples of how to install and [[secure your mysql|secure MySQL]] on your machine available on whe world-wide web. If you are using OS X chances are you have a copy installed already (it will need configuration if you haven't already done so).<br /> <br /> ==== [http://www.ruby-lang.org/en/ Ruby] ==== <br /> <br /> * If you don't already have Ruby (most *nix systems come with it installed) you can find more about it [http://www.ruby-lang.org here]. Ruby v. 1.8.7 or higher is now required. We recommend building from source. Get the source [http://www.ruby-lang.org/en/ here].<br /> <br /> ==== [http://docs.rubygems.org/read/chapter/3 RubyGems ] ====<br /> <br /> * Its easiest to install several Ruby packages (including Rails) through the Ruby package manager RubyGems. <br /> <br /> ''&lt;span style=&quot;color:red;&quot;&gt;IMPORTANT&lt;/span&gt;: There are issues with the rubygems &gt; 1.7.2 and mx, the last known rubygem version to work is 1.7.2.'' This issue (and many others) should disappear when we finish the jump to Rails 3. A possible ''untested'' workaround is to use Rails 2.3.12.<br /> <br /> ==== [http://www.rubyonrails.org/ Rails] ==== <br /> <br /> ''' Production is now using Rails 2.3.10. Install the required version with the -v flag. '''<br /> <br /> * Do (appending --no-rdoc will speed things up, but not install local documentation):<br /> <br /> gem install rails -v=2.3.10 --include-dependencies --no-rdoc<br /> <br /> === Optional ===<br /> <br /> ==== [http://www.imagemagick.org/script/index.php ImageMagik] ====<br /> <br /> * NOTE: This is optional, and not required for MorphBank images.<br /> * The tools 'convert' and 'identify' must be in your ''systems'' PATH, copying them to /usr/bin generally works. You do not need a rubygem hook.<br /> * Ensure that you have created the necessary paths for storing the images.<br /> * If possible install the additional jpg, tiff, png, and gs libraries before installing ImageMagick, this will let you handle additional image formats.<br /> <br /> ==== Passenger ====<br /> <br /> * Used only on a production server.<br /> * If you are running passenger, on CentOS/RHEL 5 servers there is a default daily chron that deletes some necessary passenger files in /tmp/passenger.PID. The easiest way to deal with this is to set the PassengerTempDir in the apache conf to something else, like so:<br /> <br /> PassengerTempDir /some_other_tmp_dir<br /> <br /> == Installation == <br /> <br /> === Stepwise overview ===<br /> <br /> # Install the required software (see above). There are numerous external sites that will help with installing these software, as such their installation is not documented here.<br /> # Download the mx source and required gems.<br /> # Create the database(s)<br /> # Populate the database with some initial data<br /> # Configure the local environment<br /> # Configure your folders<br /> # Start the server<br /> <br /> === Download the mx source ===<br /> <br /> The preferred method is now to checkout the source from [http://sourceforge.net/projects/mx-database/ Sourceforge] using [[http://subversion.tigris.org/ SVN]]]. <br /> <br /> &lt;em&gt;The (trunk) branch is now permanently deprecated, ignore it.&lt;/em&gt; <br /> <br /> For developers or those wanting to see the latest changes an edge branch that should be relatively stable but may contain production restricting commits is here:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database/branches/edge your_local_folder_name_here<br /> <br /> Several site-specific branches are being added, these are not recommended as a base for new installs but do provide a lot of example code. To grab everything you can just do:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database your_local_folder_name_here<br /> <br /> === Get the required gems ===<br /> <br /> Depending on the checkout you downloaded you might need to install the ruby-debug gem ''first'' (note for Ruby 1.9.1 users you will likely need to install the ruby-debug19 gem).<br /> <br /> ''sudo'' gem install ruby-debug<br /> <br /> You need various Ruby gems listed in the ''environment.rb''. The easiest way to install them all is to enter your mx folder (you should see the folders 'app', 'config' etc. if you are in the right place) and type:<br /> <br /> ''sudo'' rake gems:install<br /> <br /> &lt;span style=&quot;color:red;&quot;&gt;'''Note that the native mysql gem is nearly always problematic, and you might have to work at getting it installed.'''&lt;/span&gt; <br /> You can try:<br /> <br /> sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br /> <br /> On RHEL (after ''yum install mysql-devel'') this worked:<br /> <br /> gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config <br /> <br /> On Ubuntu 9.10 ([https://help.ubuntu.com/community/RubyOnRails see also here]) this worked:<br /> <br /> sudo apt-get install libmysqlclient-dev<br /> sudo gem install mysql<br /> <br /> See [http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard here], or [http://www.macruby.org/trac/wiki/Troubleshooting here], and more recently [http://techliberty.blogspot.com/ here] for other possible solutions if you have no luck with the above.<br /> <br /> === Configuring the database ===<br /> <br /> ==== Create the databases ====<br /> <br /> These instructions follow the defaults included in the database.yml file. Edit that file to change your configuration as necessary. <br /> <br /> If you haven't yet create the databases (don't forget the ';' for mysql <br /> commands):<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> create database mx_test;<br /> create database mx_development;<br /> create database mx_production;<br /> <br /> You'll need to add a MySQL account so that the app can access the database:<br /> <br /> GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';<br /> <br /> Repeat the above but swap out the word development for 'test' and 'production'.<br /> <br /> ==== Build the tables and populate some initial data ====<br /> <br /> &lt;div style=&quot;text-align:center; color:green;&quot;&gt;''Do this step if you have are starting from scratch, and have no existing mx dump to work with. If you have a mx data dump (see below) skip to &quot;Import existing data&quot;.''&lt;/div&gt;<br /> <br /> Exit mysql and navigate to the root of your mx install. Create the development database with the rake task (you may need to prefix with 'sudo'):<br /> <br /> rake db:migrate RAILS_ENV=development<br /> <br /> You can create the production database like so if necessary:<br /> <br /> rake db:migrate RAILS_ENV=production<br /> <br /> To create the test database do<br /> <br /> rake db:test:clone_structure<br /> <br /> Anytime the source is updated just repeat the rake db:migrate and your database will be updated if there are changes. There are several [[Rake tasks| rake tasks available for dumping and restoring data]], make sure to check them out.<br /> <br /> A single user with administrator privileges will have to be manually added to the 'people' tables prior to using mx. Once this user is added additional users can be added from the mx interface.<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> use mx_development;<br /> insert into people (first_name, last_name, login, password, is_admin,<br /> creates_projects) values ('joe', 'smith', 'jsmith', sha1('foosomepwdbar'), 1,1);<br /> <br /> * IMPORTANT - you must wrap 'foo' and 'bar' around your password in the above line. In the example above the password for 'jsmith' is 'somepwd' #<br /> <br /> While in the MySQL client you'll also want to add a root node to your taxonomic names hierarchy (this assumes the admin you created has id 1).<br /> <br /> insert into taxon_names (name, cached_display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);<br /> <br /> ==== Importing existing data ====<br /> <br /> If you have access to an existing dump of mx data (it will look something like &quot;2011_08_19_110700.sql&quot;) generated by you or an existing mx adminstrator, then you need not do the 'Build the tables and populate some initial data' step. To use this data copy the .sql file ''mx_root''/db/dumps, then do this<br /> <br /> rake mx:db:restore_last RAILS_ENV=development<br /> <br /> This will both build the database and load your data dump into it.<br /> <br /> === Configure the mx environment ===<br /> <br /> If you are starting with a new mx, i.e. not a version in production somehwere, you'll need to configure the local environment.<br /> <br /> Open<br /> <br /> /config/initializers/local_config.rb <br /> <br /> and update the various FOO variables as needed, see comments therein.<br /> <br /> You'll need to grab [http://code.google.com/apis/maps/signup.html GoogleMaps API keys] and add them to BOTH of:<br /> <br /> GMAPS_KEY_PRODUCTION<br /> GMAPS_KEY_DEVELOPMENT<br /> <br /> Finally, replace the emails in<br /> <br /> ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bob@gmail.com)<br /> <br /> with those you want e-mails to be sent to when errors are thrown.<br /> <br /> === Configure your operating system environment ===<br /> <br /> ==== Specific to *nix systems: check the path of your MySQL socket ====<br /> <br /> By default, the path of mysql.sock is set to<br /> /tmp/mysql.sock<br /> <br /> However, several distributions do not use this path. To change it edit the file<br /> config/database.yml<br /> and replace the 3 occurrences of<br /> socket: /tmp/mysql.sock<br /> by your actual path. For instance in Ubuntu<br /> socket: /var/run/mysqld/mysqld.sock<br /> <br /> === Configuring file and image storage ===<br /> <br /> Edit the /config/initializers/local_config.rb file and configure the various FILE_PATH variables, they can be left is if needed. If left is they correspond to the folders that you'll need to create below in the /public folder.<br /> <br /> files<br /> files/images<br /> files/images/big<br /> files/images/medium<br /> files/images/original<br /> files/images/thumb<br /> files/pdfs<br /> files/datasets<br /> files/chromatograms<br /> <br /> On a *nix system you can also use a symbolic link to keep your images, pdfs, and datasets elsewhere.<br /> <br /> === Start the server (development) ===<br /> <br /> Try starting the sever, depending on your operating system you may have to set some permission.<br /> <br /> ruby script/server<br /> <br /> Navigate to [http://127.0.0.1:3000 http://127.0.0.1:3000]<br /> <br /> You may see the following problems at this point (solution in []).<br /> <br /> * &lt;em&gt;schema.rb doesn't exist yet. Run &quot;rake db:migrate&quot; to create it then try again.&lt;/em&gt; [Run &quot;rake db:migrate&quot; (and see below).<br /> * &lt;em&gt;Rails Error: Unable to access log file.&lt;/em&gt; [Change permissions on the /log folder so that it is writable. In development just do &quot;chmod 755 log&quot;. Then, in the log folder, do &quot;echo '' &gt; development.log&quot;, followed by &quot;chmod 666 development.log&quot;. If you are on a mac or linux machine you may need to prefix these commands with &quot;sudo&quot;.]<br /> <br /> === Troubleshooting ===<br /> <br /> ==== Configuring my.cnf ====<br /> <br /> If you get a 'Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:' you can add the following line to your my.cnf under [mysqld]: 'max_allowed_packet = 32M;'.<br /> <br /> == Usage (development) ==<br /> <br /> === Using the server/application ===<br /> <br /> To test/develop in development mode navigate to the root of your installation and type<br /> <br /> ruby script/server<br /> <br /> Open a web browser and browse to <br /> <br /> 127.0.0.1:3000<br /> <br /> You should see a login page. If you see the mx page but no login fields then you have not correctly added your administrator user.<br /> <br /> Once logged in navigate to <br /> <br /> 127.0.0.1:3000/admin<br /> <br /> to create new projects.<br /> <br /> You can also navigate to <br /> <br /> 127.0.0.1:3000/account/signup<br /> <br /> to add regular users.<br /> <br /> == Upgrading ==<br /> <br /> Once you have mx installed upgrading should be relatively straightforward. First, make a backup of both the database and the application, we assume you know where your data reside by this point, and we assume that you know that things can go horribly wrong. After backing up replace the old source with the new (see below for comments). Then, make sure you have the required Rails/Gems (plugins are included in the source already). Finally, run the rake task to update the database like so:<br /> <br /> rake db:migrate RAILS_ENV=&lt;development|production&gt;<br /> <br /> Its always a good idea to run the test suite as well, this will give you a good idea of what possible problems you might still have.<br /> <br /> rake test<br /> <br /> == Usage (production) ==<br /> <br /> Production installation follows, for the most part, the same installation process as above. See the Rails homepage for setting up the server. Note that only users with accounts can see data in a clean installation of mx, i.e. you must manually configure the installation to make data available to the public.<br /> <br /> If you plan to set up a production installation of mx, it would be a good idea to read chapter 27 of ''Agile Web Development with Rails'', second edition.<br /> <br /> === Production with no customizations ===<br /> <br /> We don't have Capistrano working, so essentially you'll have to devise your own method of rolling to production, we use an SVN checkout for now.<br /> <br /> === Production with customizations ===<br /> <br /> If you have begun to build public front ends you know where your custom code resides (/public, /app/models/public, /app/controllers/public, /app/views/public), manage these as you like.<br /> <br /> === Apache configuration ===<br /> <br /> If you plan to use the API functionality you'll need add the following to your virtual .conf:<br /> <br /> AllowEncodedSlashes On<br /> <br /> == Legacy notes on installation / configuration == <br /> <br /> * These notes: [[one person's experience with installing mx]] also include Mac install instructions, but these do not include Ruby install instructions.<br /> * Very good installation notes for Ubuntu hardy can be found on the [[http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails Slicehost blog]] (November, 2008).<br /> * Notes for [[Server configuration | Server set up note here]].</div> Matt http://mx.phenomix.org/index.php/Installation Installation 2011-09-26T13:51:56Z <p>Matt: /* Download the mx source */</p> <hr /> <div>&lt;div style=&quot;float:right;margin: 10px;&quot;&gt;__TOC__&lt;/div&gt;<br /> <br /> == Overview ==<br /> <br /> mx can be installed locally for development or testing purposes or on a server. If you're seriously considering supporting a mx installation in your lab or workplace you should have an intermediate to advanced programmer or server admin on your team. &lt;span style=&quot;color:red;&quot;&gt;Because of the relatively rapid updates to mx we recommend that you should presently use the edge branch.&lt;/span&gt; <br /> <br /> == Dependencies ==<br /> <br /> === Required ===<br /> <br /> ==== [http://www.mysql.com/ MySQL] ==== <br /> <br /> * MySQL 5.n is in use on development and production servers. Its easiest to install the community addition with the startup item, then reboot.<br /> <br /> * There are many examples of how to install and [[secure your mysql|secure MySQL]] on your machine available on whe world-wide web. If you are using OS X chances are you have a copy installed already (it will need configuration if you haven't already done so).<br /> <br /> ==== [http://www.ruby-lang.org/en/ Ruby] ==== <br /> <br /> * If you don't already have Ruby (most *nix systems come with it installed) you can find more about it [http://www.ruby-lang.org here]. Ruby v. 1.8.7 or higher is now required. We recommend building from source. Get the source [http://www.ruby-lang.org/en/ here].<br /> <br /> ==== [http://docs.rubygems.org/read/chapter/3 RubyGems ] ====<br /> <br /> * Its easiest to install several Ruby packages (including Rails) through the Ruby package manager RubyGems. <br /> <br /> ''&lt;span style=&quot;color:red;&quot;&gt;IMPORTANT&lt;/span&gt;: There are issues with the rubygems &gt; 1.7.2 and mx, the last known rubygem version to work is 1.7.2.'' This issue (and many others) should disappear when we finish the jump to Rails 3. A possible ''untested'' workaround is to use Rails 2.3.12.<br /> <br /> ==== [http://www.rubyonrails.org/ Rails] ==== <br /> <br /> ''' Production is now using Rails 2.3.10. Install the required version with the -v flag. '''<br /> <br /> * Do (appending --no-rdoc will speed things up, but not install local documentation):<br /> <br /> gem install rails -v=2.3.10 --include-dependencies --no-rdoc<br /> <br /> === Optional ===<br /> <br /> ==== [http://www.imagemagick.org/script/index.php ImageMagik] ====<br /> <br /> * NOTE: This is optional, and not required for MorphBank images.<br /> * The tools 'convert' and 'identify' must be in your ''systems'' PATH, copying them to /usr/bin generally works. You do not need a rubygem hook.<br /> * Ensure that you have created the necessary paths for storing the images.<br /> * If possible install the additional jpg, tiff, png, and gs libraries before installing ImageMagick, this will let you handle additional image formats.<br /> <br /> ==== Passenger ====<br /> <br /> * Used only on a production server.<br /> * If you are running passenger, on CentOS/RHEL 5 servers there is a default daily chron that deletes some necessary passenger files in /tmp/passenger.PID. The easiest way to deal with this is to set the PassengerTempDir in the apache conf to something else, like so:<br /> <br /> PassengerTempDir /some_other_tmp_dir<br /> <br /> == Installation == <br /> <br /> === Stepwise overview ===<br /> <br /> # Install the required software (see above). There are numerous external sites that will help with installing these software, as such their installation is not documented here.<br /> # Download the mx source and required gems.<br /> # Create the database(s)<br /> # Populate the database with some initial data<br /> # Configure the local environment<br /> # Configure your folders<br /> # Start the server<br /> <br /> === Download the mx source ===<br /> <br /> The preferred method is now to checkout the source from [http://sourceforge.net/projects/mx-database/ Sourceforge] using [[http://subversion.tigris.org/ SVN]]]. <br /> <br /> &lt;em&gt;The (trunk) branch is now permanently deprecated, ignore it.&lt;/em&gt; <br /> <br /> For developers or those wanting to see the latest changes an edge branch that should be relatively stable but may contain production restricting commits is here:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database/branches/edge your_local_folder_name_here<br /> <br /> Several site-specific branches are being added, these are not recommended as a base for new installs but do provide a lot of example code. To grab everything you can just do:<br /> <br /> svn co https://mx-database.svn.sourceforge.net/svnroot/mx-database your_local_folder_name_here<br /> <br /> === Get the required gems ===<br /> <br /> Depending on the checkout you downloaded you might need to install the ruby-debug gem ''first'' (note for Ruby 1.9.1 users you will likely need to install the ruby-debug19 gem).<br /> <br /> ''sudo'' gem install ruby-debug<br /> <br /> You need various Ruby gems listed in the ''environment.rb''. The easiest way to install them all is to enter your mx folder (you should see the folders 'app', 'config' etc. if you are in the right place) and type:<br /> <br /> ''sudo'' rake gems:install<br /> <br /> &lt;span style=&quot;color:red;&quot;&gt;'''Note that the native mysql gem is nearly always problematic, and you might have to work at getting it installed.'''&lt;/span&gt; <br /> You can try:<br /> <br /> sudo env ARCHFLAGS=&quot;-arch i386&quot; gem install mysql -- --with-mysql-config=/usr/local/mysql/bin/mysql_config<br /> <br /> On RHEL (after ''yum install mysql-devel'') this worked:<br /> <br /> gem install mysql -- --with-mysql-config=/usr/lib64/mysql/mysql_config <br /> <br /> On Ubuntu 9.10 ([https://help.ubuntu.com/community/RubyOnRails see also here]) this worked:<br /> <br /> sudo apt-get install libmysqlclient-dev<br /> sudo gem install mysql<br /> <br /> See [http://wonko.com/post/how-to-install-the-mysqlruby-gem-on-mac-os-x-leopard here], or [http://www.macruby.org/trac/wiki/Troubleshooting here], and more recently [http://techliberty.blogspot.com/ here] for other possible solutions if you have no luck with the above.<br /> <br /> === Configuring the database ===<br /> <br /> ==== Create the databases ====<br /> <br /> These instructions follow the defaults included in the database.yml file. Edit that file to change your configuration as necessary. <br /> <br /> If you haven't yet create the databases (don't forget the ';' for mysql <br /> commands):<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> create database mx_test;<br /> create database mx_development;<br /> create database mx_production;<br /> <br /> You'll need to add a MySQL account so that the app can access the database:<br /> <br /> GRANT ALL PRIVILEGES ON mx_development.* TO 'mx'@'localhost' IDENTIFIED BY 'MmmXxx';<br /> <br /> Repeat the above but swap out the word development for 'test' and 'production'.<br /> <br /> ==== Build the tables and populate some initial data ====<br /> <br /> &lt;div style=&quot;text-align:center; color:green;&quot;&gt;''Do this step if you have are starting from scratch, and have no existing mx dump to work with. If you have a mx data dump (see below) skip to &quot;Import existing data&quot;.''&lt;/div&gt;<br /> <br /> Exit mysql and navigate to the root of your mx install. Create the development database with the rake task (you may need to prefix with 'sudo'):<br /> <br /> rake db:migrate RAILS_ENV=development<br /> <br /> You can create the production database like so if necessary:<br /> <br /> rake db:migrate RAILS_ENV=production<br /> <br /> To create the test database do<br /> <br /> rake db:test:clone_structure<br /> <br /> Anytime the source is updated just repeat the rake db:migrate and your database will be updated if there are changes. There are several [[Rake tasks| rake tasks available for dumping and restoring data]], make sure to check them out.<br /> <br /> A single user with administrator privileges will have to be manually added to the 'people' tables prior to using mx. Once this user is added additional users can be added from the mx interface.<br /> <br /> mysql -u root -p<br /> &lt;enter password&gt;<br /> use mx_development;<br /> insert into people (first_name, last_name, login, password, is_admin,<br /> creates_projects) values ('joe', 'smith', 'jsmith', sha1('foosomepwdbar'), 1,1);<br /> <br /> * IMPORTANT - you must wrap 'foo' and 'bar' around your password in the above line. In the example above the password for 'jsmith' is 'somepwd' #<br /> <br /> While in the MySQL client you'll also want to add a root node to your taxonomic names hierarchy (this assumes the admin you created has id 1).<br /> <br /> insert into taxon_names (name, cached_display_name, l, r, creator_id, updator_id) values ('root', 'root', 1, 2, 1, 1);<br /> <br /> ==== Importing existing data ====<br /> <br /> If you have access to an existing dump of mx data (it will look something like &quot;2011_08_19_110700.sql&quot;) generated by you or an existing mx adminstrator, then you need not do the 'Build the tables and populate some initial data' step. To use this data copy the .sql file ''mx_root''/db/dumps, then do this<br /> <br /> rake mx:db:restore_last RAILS_ENV=development<br /> <br /> This will both build the database and load your data dump into it.<br /> <br /> === Configure the mx environment ===<br /> <br /> If you are starting with a new mx, i.e. not a version in production somehwere, you'll need to configure the local environment.<br /> <br /> Open<br /> <br /> /config/initializers/local_config.rb <br /> <br /> and update the various FOO variables as needed, see comments therein.<br /> <br /> You'll need to grab [http://code.google.com/apis/maps/signup.html GoogleMaps API keys] and add them to BOTH of:<br /> <br /> GMAPS_KEY_PRODUCTION<br /> GMAPS_KEY_DEVELOPMENT<br /> <br /> Finally, replace the emails in<br /> <br /> ExceptionNotifier.exception_recipients = %w(joe@schmoe.com bob@gmail.com)<br /> <br /> with those you want e-mails to be sent to when errors are thrown.<br /> <br /> === Configure your operating system environment ===<br /> <br /> ==== Specific to *nix systems: check the path of your MySQL socket ====<br /> <br /> By default, the path of mysql.sock is set to<br /> /tmp/mysql.sock<br /> <br /> However, several distributions do not use this path. To change it edit the file<br /> config/database.yml<br /> and replace the 3 occurrences of<br /> socket: /tmp/mysql.sock<br /> by your actual path. For instance in Ubuntu<br /> socket: /var/run/mysqld/mysqld.sock<br /> <br /> === Configuring file and image storage ===<br /> <br /> Edit the /config/initializers/local_config.rb file and configure the various FILE_PATH variables, they can be left is if needed. If left is they correspond to the folders that you'll need to create below in the /public folder.<br /> <br /> files<br /> files/images<br /> files/images/big<br /> files/images/medium<br /> files/images/original<br /> files/images/thumb<br /> files/pdfs<br /> files/datasets<br /> files/chromatograms<br /> <br /> On a *nix system you can also use a symbolic link to keep your images, pdfs, and datasets elsewhere.<br /> <br /> === Start the server (development) ===<br /> <br /> ruby script/server<br /> <br /> Navigate to [http://127.0.0.1:3000 http://127.0.0.1:3000]<br /> <br /> === Troubleshooting ===<br /> <br /> ==== Configuring my.cnf ====<br /> <br /> If you get a 'Mysql::Error: Got a packet bigger than 'max_allowed_packet' bytes:' you can add the following line to your my.cnf under [mysqld]: 'max_allowed_packet = 32M;'.<br /> <br /> == Usage (development) ==<br /> <br /> === Using the server/application ===<br /> <br /> To test/develop in development mode navigate to the root of your installation and type<br /> <br /> ruby script/server<br /> <br /> Open a web browser and browse to <br /> <br /> 127.0.0.1:3000<br /> <br /> You should see a login page. If you see the mx page but no login fields then you have not correctly added your administrator user.<br /> <br /> Once logged in navigate to <br /> <br /> 127.0.0.1:3000/admin<br /> <br /> to create new projects.<br /> <br /> You can also navigate to <br /> <br /> 127.0.0.1:3000/account/signup<br /> <br /> to add regular users.<br /> <br /> == Upgrading ==<br /> <br /> Once you have mx installed upgrading should be relatively straightforward. First, make a backup of both the database and the application, we assume you know where your data reside by this point, and we assume that you know that things can go horribly wrong. After backing up replace the old source with the new (see below for comments). Then, make sure you have the required Rails/Gems (plugins are included in the source already). Finally, run the rake task to update the database like so:<br /> <br /> rake db:migrate RAILS_ENV=&lt;development|production&gt;<br /> <br /> Its always a good idea to run the test suite as well, this will give you a good idea of what possible problems you might still have.<br /> <br /> rake test<br /> <br /> == Usage (production) ==<br /> <br /> Production installation follows, for the most part, the same installation process as above. See the Rails homepage for setting up the server. Note that only users with accounts can see data in a clean installation of mx, i.e. you must manually configure the installation to make data available to the public.<br /> <br /> If you plan to set up a production installation of mx, it would be a good idea to read chapter 27 of ''Agile Web Development with Rails'', second edition.<br /> <br /> === Production with no customizations ===<br /> <br /> We don't have Capistrano working, so essentially you'll have to devise your own method of rolling to production, we use an SVN checkout for now.<br /> <br /> === Production with customizations ===<br /> <br /> If you have begun to build public front ends you know where your custom code resides (/public, /app/models/public, /app/controllers/public, /app/views/public), manage these as you like.<br /> <br /> === Apache configuration ===<br /> <br /> If you plan to use the API functionality you'll need add the following to your virtual .conf:<br /> <br /> AllowEncodedSlashes On<br /> <br /> == Legacy notes on installation / configuration == <br /> <br /> * These notes: [[one person's experience with installing mx]] also include Mac install instructions, but these do not include Ruby install instructions.<br /> * Very good installation notes for Ubuntu hardy can be found on the [[http://articles.slicehost.com/2008/4/30/ubuntu-hardy-ruby-on-rails Slicehost blog]] (November, 2008).<br /> * Notes for [[Server configuration | Server set up note here]].</div> Matt http://mx.phenomix.org/index.php/App/API/Figure App/API/Figure 2011-09-15T20:12:43Z <p>Matt: </p> <hr /> <div>[[App/API | Back to API home]]<br /> <br /> == Description ==<br /> <br /> &lt;nowiki&gt;http:&lt;/nowiki&gt;//''base_url''/api/'''figure'''/fig_&lt;integer&gt;.svg<br /> <br /> Returns the svg document identified by the [[App/figure | Figure]] id in mx.<br /> <br /> == Response (xml/svg) ==<br /> <br /> An svg document referencing an image an possible overlay.<br /> <br /> == Example ==<br /> <br /> Request:<br /> <br /> '''http://api.hymao.org/api/figure/fig_8448.svg'''<br /> <br /> Response:<br /> <br /> &lt;pre style=&quot;padding:1em;&quot;&gt;<br /> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br /> &lt;svg display=&quot;inline&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; width=&quot;640&quot; height=&quot;403&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;fig_svg_8448&quot;&gt;<br /> &lt;a xlink:href=&quot;&quot; target=&quot;_blank&quot;&gt;<br /> &lt;image xlink:href=&quot;http://morphbank.net/?id=516672&amp;amp;imgType=jpg&quot; id=&quot;someid&quot; y=&quot;0&quot; height=&quot;403&quot; x=&quot;0&quot; width=&quot;640&quot;/&gt;<br /> &lt;g id=&quot;markers_for_fig_8448&quot; transform=&quot;scale(0.239073589839372)&quot;&gt;<br /> &lt;g fill=&quot;%2314eddd&quot; display=&quot;inline&quot; opacity=&quot;0.4&quot; stroke-width=&quot;1&quot; id=&quot;marker_39&quot; stroke=&quot;%2314eddd&quot;&gt;<br /> &lt;g&gt;&lt;path d='M254.167,988.889c1.758-3.82,3.461-3.434,5.436-3.355 c-6.773-6.391,17.703,15.555,17.583,12.959c5.83,3.363,16.559,20.396,18.772,23.559c2.219,3.174,7.582,7.24,11.089,9.006 c7.053,3.555,31.296,20.383,37.373,23.672c6.22,3.365,14.415,6.594,21.552,10.535c13.43,7.416,27.881,15.172,40.625,23.047 c0.581,1.846,8.379,12.26,10.069,17.244c0.928,2.74,4.91,12.414,5.675,15.16c2.425,1.662,17.622,54.605,14.467,64.008 c-1.796,5.35-4.918,25.791-6.198,28.508c-1.633,3.463-12.118,23.494-24.225,21.389c-5.843-5.852-26.636-27.289-30.694-34.779 c-5.257-9.701-8.618-19.881-14.6-28.662c-4.074-5.979-27.278-40.045-28.572-53.699c-20.579-24.287-33.483-49.266-49.979-73.604 c-3.497-1.002-19.558-26.84-20.079-28.557C255.618,992.787,258.518,1006.029,254.167,988.889z'/&gt;&lt;/g&gt;&lt;/g&gt;<br /> &lt;/g&gt;<br /> &lt;/a&gt;<br /> &lt;/svg&gt;<br /> &lt;/pre&gt;</div> Matt http://mx.phenomix.org/index.php/App/API/Ontology App/API/Ontology 2011-09-15T19:57:34Z <p>Matt: </p> <hr /> <div>__NOTOC__<br /> [[App/API | Back to API home]]<br /> == Ontology related conventions ==<br /> * Unless otherwise noted methods default to return JSON formatted data.<br /> * '''CLASS_ID''' is a URI like '''&lt;nowiki&gt;http://purl.obolibrary.org/obo/HAO_0000397&lt;/nowiki&gt;'''<br /> * See [[App/API]] for additional conventions. <br /> <br /> == Description ==<br /> &lt;nowiki&gt;http:&lt;/nowiki&gt;//''base_url''/api/'''ontology'''<br /> <br /> Redirects to the wiki help pages (this page) for the ontology-based API methods.<br /> <br /> == Response (Redirect) ==<br /> Redirect<br /> <br /> == Example ==<br /> Request:<br /> <br /> '''http://api.hymao.org/api/ontology/'''<br /> <br /> Response:<br /> <br /> Redirect to this wiki help page.<br /> <br /> == Methods ==<br /> {{Special:Prefixindex/App/API/Ontology}}</div> Matt http://mx.phenomix.org/index.php/App/figure App/figure 2011-09-15T19:56:16Z <p>Matt: </p> <hr /> <div>[[App|back to index]]<br /> <br /> == Overview ==<br /> <br /> Images can be attached to any record with a unique id in mx through figures. A single image can be used as many times as you want for as many different records as you want. For instance a single image can illustrate multiple character states, be linked to text in a description, and illustrate a collecting event.<br /> <br /> == SVG Overlays ==<br /> <br /> We use [http://code.google.com/p/svgweb/ Google's svgweb] to [[App/figure/annotate|annotate images]]. <br /> <br /> == Troubleshooting ==<br /> === SVG not showing up in IE ===<br /> Use Firefox, or Chrome, or Safari.</div> Matt http://mx.phenomix.org/index.php/App/figure App/figure 2011-09-15T19:52:42Z <p>Matt: </p> <hr /> <div>[[App|back to index]]<br /> <br /> == Overview ==<br /> <br /> Images can be attached to any record with a unique id in mx through figures. A single image can be used as many times as you want for as many different records as you want. For instance a single image can illustrate multiple character states, be linked to text in a description, and illustrate a collecting event.<br /> <br /> == SVG Overlays ==<br /> <br /> We use Google's svg_web to [App/figure/ annotate images]. <br /> <br /> == Troubleshooting ==<br /> === SVG not showing up in IE ===<br /> <br /> Use Firefox, or Chrome, or Safari.</div> Matt http://mx.phenomix.org/index.php/App/API/Figure App/API/Figure 2011-09-15T19:51:15Z <p>Matt: </p> <hr /> <div>[[App/API | Back to API home]]<br /> <br /> == Description ==<br /> <br /> &lt;nowiki&gt;http:&lt;/nowiki&gt;//''base_url''/api/'''figure'''/fig_&lt;integer&gt;.svg<br /> <br /> Returns the svg document identified by the [App/figure | Figure] id in mx.<br /> <br /> <br /> == Response (xml/svg) ==<br /> <br /> An svg document referencing an image an possible overlay.<br /> <br /> == Example ==<br /> <br /> Request:<br /> <br /> '''http://api.hymao.org/api/figure/fig_8448.svg'''<br /> <br /> Response:<br /> <br /> &lt;pre style=&quot;padding:1em;&quot;&gt;<br /> &lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br /> &lt;svg display=&quot;inline&quot; xmlns:xlink=&quot;http://www.w3.org/1999/xlink&quot; width=&quot;640&quot; height=&quot;403&quot; xmlns=&quot;http://www.w3.org/2000/svg&quot; id=&quot;fig_svg_8448&quot;&gt;<br /> &lt;a xlink:href=&quot;&quot; target=&quot;_blank&quot;&gt;<br /> &lt;image xlink:href=&quot;http://morphbank.net/?id=516672&amp;amp;imgType=jpg&quot; id=&quot;someid&quot; y=&quot;0&quot; height=&quot;403&quot; x=&quot;0&quot; width=&quot;640&quot;/&gt;<br /> &lt;g id=&quot;markers_for_fig_8448&quot; transform=&quot;scale(0.239073589839372)&quot;&gt;<br /> &lt;g fill=&quot;%2314eddd&quot; display=&quot;inline&quot; opacity=&quot;0.4&quot; stroke-width=&quot;1&quot; id=&quot;marker_39&quot; stroke=&quot;%2314eddd&quot;&gt;<br /> &lt;g&gt;&lt;path d='M254.167,988.889c1.758-3.82,3.461-3.434,5.436-3.355 c-6.773-6.391,17.703,15.555,17.583,12.959c5.83,3.363,16.559,20.396,18.772,23.559c2.219,3.174,7.582,7.24,11.089,9.006 c7.053,3.555,31.296,20.383,37.373,23.672c6.22,3.365,14.415,6.594,21.552,10.535c13.43,7.416,27.881,15.172,40.625,23.047 c0.581,1.846,8.379,12.26,10.069,17.244c0.928,2.74,4.91,12.414,5.675,15.16c2.425,1.662,17.622,54.605,14.467,64.008 c-1.796,5.35-4.918,25.791-6.198,28.508c-1.633,3.463-12.118,23.494-24.225,21.389c-5.843-5.852-26.636-27.289-30.694-34.779 c-5.257-9.701-8.618-19.881-14.6-28.662c-4.074-5.979-27.278-40.045-28.572-53.699c-20.579-24.287-33.483-49.266-49.979-73.604 c-3.497-1.002-19.558-26.84-20.079-28.557C255.618,992.787,258.518,1006.029,254.167,988.889z'/&gt;&lt;/g&gt;&lt;/g&gt;<br /> &lt;/g&gt;<br /> &lt;/a&gt;<br /> &lt;/svg&gt;<br /> &lt;/pre&gt;</div> Matt http://mx.phenomix.org/index.php/App/API/Figure App/API/Figure 2011-09-15T19:28:53Z <p>Matt: Created page with 'stub'</p> <hr /> <div>stub</div> Matt http://mx.phenomix.org/index.php/App/public/ontology/suggest App/public/ontology/suggest 2011-09-15T17:58:16Z <p>Matt: </p> <hr /> <div><br /> == Label/Term/Word ==<br /> <br /> == Definition ==<br /> <br /> == Reference ==<br /> <br /> == Comments ==<br /> <br /> == Your name ==<br /> <br /> == Your email ==<br /> <br /> == Confirm receipt of this feedback by email? ==<br /> <br /> == May we contact you if we have questions? ==<br /> <br /> == reCAPTCHA ==</div> Matt http://mx.phenomix.org/index.php/App/public/ontology/suggest App/public/ontology/suggest 2011-09-15T03:31:15Z <p>Matt: Created page with ' More coming soon- feedback is now working, but confirmation emails are not.'</p> <hr /> <div><br /> <br /> More coming soon- feedback is now working, but confirmation emails are not.</div> Matt http://mx.phenomix.org/index.php/App/public/ontology/analyze App/public/ontology/analyze 2011-09-07T17:50:27Z <p>Matt: /* Overview */</p> <hr /> <div>== Overview ==<br /> <br /> &lt;span style=&quot;color:#cb1502&quot;&gt;The goal of this tool is to allow for explicit and unambiguous reference to ontological concepts within publications, other websites, or applications through the use of Universal Resource Identifiers (URIs).&lt;/span&gt; This sounds a little confusing, but the idea is straightforward. Labels used in publications are often not explicitly defined, and when read by others they may be misinterpreted (e.g through synonymy or homonomy). By including in your publication or website a link to a specific ontological concept, for example an anatomical structure, you can state your intention as to how a given word (label/term) is used in your particular paper- &quot;by using the word 'head' I mean the thing that is defined [http://purl.obolibrary.org/obo/HAO_0000397 in this manner] in this ontology.&quot;. Nearly all taxonomic publications, for example, include a statement in their Materials and Methods that indicates where the descriptive terminology in the present work is defined. The analyzer is a powerful tool to aid in the production of these statements. &lt;span style=&quot;color:#cb1502&quot;&gt;Like with all tools the results of the analyzer should not be published without careful review (see 'Steps to publishing' below).&lt;/span&gt; For an example of the analyzer in action [http://glossary.hymao.org/projects/32/public/ontology/analyze see here].<br /> <br /> == Usage ==<br /> <br /> # Cut and paste your text, or type directly into the large text box. Try to limit the text in the box to that pertinent to the underlying ontology being analyzed against.<br /> # Fill out the reCAPTHCA form. If you need help click the small &quot;?&quot; on that form. This is used to prevent spamming or other attacks. Each time you click the submit button you will have to recomplete the CAPTCHA, even after you have successfully filled one out the first time.<br /> # Click Submit and wait (you'll see a little turning spinner).<br /> # Results are displayed in below in a simple table format.<br /> # Download the results by clicking the &quot;Download&quot; button to the right. The downloaded file is a tab delimited file that can be opened directly in a spreadsheet program or other text editor.<br /> # For additional details click on &quot;Detailed breakdown&quot;. This will show exactly what text is parsed, where in the text matches were found, a list of synonyms, and a list of homonyms.<br /> <br /> == Interpreting results ==<br /> <br /> * The result table has 4 columns<br /> *# The word in the text that matched.<br /> *# The concept(s) within the ontology that word is tied to. &lt;span style=&quot;color:#cb1502&quot;&gt;It is important to note these are &lt;em&gt;NOT&lt;/em&gt; identical concepts, in fact each concept is distinctly different is some way, or there is a problem with the ontology.&lt;span style=&quot;color:#cb1502&quot;&gt;<br /> *# The URI. This is the unique link to the concept immediately to its left.<br /> *# The reference(s) which use the label in column 1 in the manner of the definition of column 3. Click on a reference to see its full citation.<br /> * The Detailed breakdown will additional aid in interpreting the results of the analysis, it is broken down by:<br /> *# Analyzed Text - Use this to confirm that your text was submitted correctly. The analyzer may truncate your text if it is too long, or if it finds other problems.<br /> *# Match Map - The words that were matched and returned are highlighted in the context of the text here. Green highlights indicate a 1:1 mapping (i.e. there is only one concept present for the given label. Red highlights indicate that there are multiple concepts for a given term.<br /> *# Matched Labels - A simple comma separated list of the labels that were found.<br /> *# Matched Classes - A list of the concepts that were matched.<br /> *# Homonymous Labels - Of those labels that matched those that are homonyms.<br /> *# Synonymous Labels - Of those labels that matched those that are synonyms.<br /> <br /> == Steps to publishing a &quot;URI Table&quot; ==<br /> <br /> The result table could be formatted for publication, and in the hymglossary example it is particularly useful for Materials and Methods or appendix sections of taxonomic treatise. Here is an outline of the steps you should take (additional functionality is available to those producing descriptions or phylogenetic matrices within mx).<br /> <br /> # Generate a result as above.<br /> # Download the table and open it in excel.<br /> # &lt;em&gt;Carefully review each conceptual match.&lt;/em&gt; This is the most important step- do not assume that the result is using the label you have provided in the manner you mean to provide.<br /> # If multiple concepts (definitions) are available for a given label choose the one that you feel matches your concept. &lt;em&gt; Delete the other lines &lt;/em&gt;. Repeat for all the labels in the table.<br /> <br /> Include the table in the pertinent section of the paper. Include extra columns as needed for notes or comments. It is highly recommend that you pass along your table to the curators of the ontology for them to review, particularly if you have comments or questions.<br /> <br /> == Future work ==<br /> <br /> Providing a printed URI within the text of a publication, for example a taxonomic description, is a first step to modelling the statements we make in publications in a formal manner. There are many other potentially more useful applications of a URI. Including URIs in any form, however, within a publication, will ultimately make the document more interesting to computer-driven indexing of the document. For example all the papers of with the URI referencing the &quot;head of a hymenopteran&quot; could be discovered if each publications about hymenopteran heads included the URI &quot;http://purl.obolibrary.org/obo/HAO_0000397&quot;. They could still use the label &quot;head&quot; alone, but a search could differentiate between &quot;head&quot; in the context of hymenopterans, and &quot;head&quot; of, for example, community organizations. <br /> <br /> == Similar functionality ==<br /> <br /> Other sites provide similar services, most notably Bioportal. The functionality within mx allows for a result integrated with other functionality to be returned, and for context specific to mx to be provided.</div> Matt