Package: camoco-cob
COB - The Co-expression BrowserCOB is a complete client/server package built to browse gene co-expression networks created byCamoco. The client is written in javascript, and the server is written in python.Demo VersionFor your convenience, a demonstration version of COB is available to run as a Docker image with sample data. The data and scripts used to build this image are available as a repository as an example. The built image is also available onDocker Hubusing the tagmaize-data. Running the Docker image does not require any special configuration since it already has all of the data built and included. It can be run as follows:dockerrun--namecob-p50000:50000This image can be seen running athttp://lovelace.cs.umn.edu/cob. This demonstration server is provided as-is, and is not guaranteed to be maintained indefinitely. The Docker image is the preferred method to use this demo version.Getting StartedInstallationThis package is entirely dependent onCamoco. It is is designed such that once the Camoco has been installed, COB can be added by, inside the camoco virtual environment, running:pipinstallcamoco-cobDockerIncluded in this repo there is a Dockerfile which contains camoco and cob in a container. It does not provide any data prebuilt, thus in order to use this, three different mounts are available which are explained below. To run the image you would want to use a command like this:dockerrun-it--rm--namecob\--volume$HOME/.camoco:/home/camoco/.camoco--volume$HOME/cob.conf:/home/camoco/cob.conf--publish50000:50000linkageio/camoco-cobThis will start cob based on the configuration and data provided on localhost port 50000. To enter the container, just addbashto the end of the command, or enter a running container using exec withbash.Mounts/home/camoco/.camocoThis is the storage directory for all camoco related data. This can be kept in the container, but it will not be persistent then. It is highly recommended to mount a directory for this./home/camoco/cob.confThis is the location of the cob configuration file that is used by cob by default. This will not work by default given no data is included in this docker image. Make sure to build your configuration based off your data and mount it here./home/camoco/.camoco.confThis is the location of the camoco configuration file. By default the emable camoco config file in this repo is used. This should work fine for most use cases.UsageOnce installed, COB has a convinient command line interface to manage the server. To run it with all of the default options, no options are required, just execute in the camoco virtual environment:cobThis will start the server in the current terminal window. To see the site, navigate tohttp://localhost:50000in your web browser once the server has finished loading. To terminate the server, pressCtrl+Cin the same terminal window. To run the server in the background, add the-dflag to the start command. To terminate all instances of the COB server, runcob -k. To define a specific server to kill, add the-nflag followed by the name of the server as such:cob-k-nmy_serverTo use a specific configuration file for server settings, the file may be defined with the-cflag:cob-cmy_server.confIf no configuration file is defined, COB then checks for a sectionwebin the main camoco configuration file~/.camoco.conf. If there are no settings in that file, it will load with default values. The full configuration options are discussed in the next section.This is the full documentation for allcobCLI options, which can also be accessed by executingcob -h:usage: cob [-h] [-c USERCONF] [-d] [-k] [-l] [-n NAME]

Manage instances of the COB server.

optional arguments:
  -h, --help            show this help message and exit
  -c USERCONF, --config USERCONF
                        Provide a YAML formatted configuration file, if not
                        provided, general Camoco config file is used.
  -d, --daemon          Run gunicorn as a daemon (allows closing of this
                        terminal).
  -k, --kill            Kill running server. Use '-n' to define specific
                        server to kill otherwise all will be.
  -l, --list            Kill running server. Use '-n' to define specific
                        server to kill otherwise all will be.
  -n NAME, --name NAME  Name of server to start or kill.ConfigurationA powerful configuration engine is provided to both set options for the server and also options for the content for the website, such as default option values. As mentioned above, these can either be provided through a standalone YAML configuration file (example.confis included in the repo) or in a section with the same format titledwebin the main camoco configuration file (found at~/.camoco.conf). One need not include one at all, this will just be started with the default values (seen below). This will also trigger all available Camoco networks and GWAS datasets to be loaded in. To prevent this, one may specify the desired datasets. The following is an annotated version of the default settings, showing all the potential configuration options:Server Optionsname:cob# The name of this server instance, must be unique for#      each instance, can be overridden by '-n' flagport:50000# Port to which the server will be attachedthreads:8# How many individual threads the sever process may usetimeout:500# How long a thread maybe unresponsive before terminationdev:False# Forces JS and CSS to be recompiled on every request# Normally done only on server restartDatasetsnetworks:# Camoco networks that are to be loaded in the server.-My_Network_1#      If this is not included, all available Camoco-My_Network_2#      networks will be loaded.gwas:# GWAS datasets that will be loaded in the server. If-My_GWAS_1#      this is not included, all GWAS datasets that#      correspond to loaded networks will be loaded.Default Valuesdefaults:# This is the dictionary containing all of the defaults#      for the options on the web sitelogSpacing:True# Spacing of genes in Polywas layout, log or true distancevisEnrich:True# Only enrich genes visible on graph or all in tablefdrFilter:True# Whether to use FDR to filter query resultsnodeCutoff:1# How many edges a node must have to be visibleedgeCutoff:3.0# The cutoff for significance of edge scoresfdrCutoff:0.35# If the FDR Filter is used, the cutoff for being visiblewindowSize:50000# Window size used in the queryflankLimit:2# Flank limit used in the queryvisNeighbors:25# Default number of neighbors visible in custom networknodeSize:10# Size of the nodes on the graphpCutoff:0.05# P value cutoff for enrichment queriesminTerm:5# Minimum number of genes a GO term must have to be includedmaxTerm:300# Maximum number of genes a GO term must have to be includedReference LinksThis section allows for linking directly from genes to an external website for more information. This can be configured for each different reference genome (RefGen) used to build the included networks. If not included, the option won't appear. To configure this,start by writing the name of the RefGen under therefLinksoption, followed by a colon and a space as seen below. Then you must go to the database you wish to use for that RefGen, and search any gene. After finding this, copy the URL onto the line after the name of the RefGen. Finally replace the name of the gene in the URL with the string{id}. This allows the website to find where in the URL the gene name goes, and replace it with any gene for that organism. The following example works for maize, soybean, and medicago. Add or subtract species at will.refLinks:Zm5bFGS:http://www.maizegdb.org/gene_center/gene/{id}Gmax_a2_V1:https://www.soybase.org/sbt/search/search_results.php?category=FeatureName&version=Glyma2.0&search_term={id}Mt_4.0:http://medicago.jcvi.org/cgi-bin/medicago/manatee/shared/ORF_infopage.cgi?db=mta4&user=access&password=access&identifier=locus&orf={id}NotesIf you care to make this site accessible to the web, you can add a reverse proxy to Apache, allowing for access by using a normal URL. An example of how to do this is provided here, but for more detailed documentation, see theApache docs.<VirtualHost*:80>ProxyPass/cobhttp://127.0.0.1:50000ProxyPassReverse/cob/http://127.0.0.1:50000</VirtualHost*:80>The equivalent can be done in NGINX using theproxy_passdirective.DevelopmentThis package works with the standardpython3 setup.py developcommand for purposes of development in a given environment, no special configuration is necessary.To build and push a new version the package, update the version in thecob/__init__.pyfile, install twine, and then do the following:pythonsetup.pysdist
twineuploaddist/*It will ask for authentication, but should handle everything else.PaperThere is a publication for this updated version of cob in process. More information will be added to this doc when it's available.AcknowledgementsI would like to thank all members of the Myers Lab for their extensive and patient mentorship. I would also like to thank Max Franz, for all of his work onCytoscape.js, and assistance in getting it integrated optimally. Finally I would like to thank the open source web development community in general. This project was only possible because of the robust ecosystem of packages available for use by everyone.FundingJ.J., R.S., and J.M. were partially supported by a Biomedical Informatics and Computational Biology (BICB) Fellowship. This work was supported by a grant from the National Science Foundation to N.M.S. (DBI-1237931) and by US Department of Agriculture Hatch funds to N.M.S. and C.L.M. R.S., R.B. and C.L.M. were partially supported by grants from the National Science Foundation (IOS 1126950 and DBI 0953881). C.L.M. is supported by the CIFAR Genetic Networks Program. The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.