Difference between revisions of "Co-op Documentation"

From WormBaseWiki
Jump to navigationJump to search
Line 82: Line 82:
 
****Modify/Update method for determining type (currently seems to be guessing)
 
****Modify/Update method for determining type (currently seems to be guessing)
 
***Add display for navigating to parent gene & corresponding protein
 
***Add display for navigating to parent gene & corresponding protein
****Similar to Region widget?
+
****<del>Similar to Region widget?</del> Table
 
****Not needed for Sequence page
 
****Not needed for Sequence page
 
**Reagents Widget
 
**Reagents Widget
Line 98: Line 98:
 
****Remove "Relative to Superlink"
 
****Remove "Relative to Superlink"
 
****Start & End "Relative to Itself" are useful in some cases (keep)
 
****Start & End "Relative to Itself" are useful in some cases (keep)
**Origin Widget
 
***Should be a curator-only field in Overview
 
 
*'''Progress:'''
 
*'''Progress:'''
 
**Separating Transcript(+CDS) and Sequence pages
 
**Separating Transcript(+CDS) and Sequence pages
Line 105: Line 103:
 
****Comparing with schema
 
****Comparing with schema
 
****Removing eval statements to speed up
 
****Removing eval statements to speed up
 +
**Origin Widget
 +
***Should be a curator-only field
 
**Region Widget
 
**Region Widget
 
***Redistribute data and remove widget
 
***Redistribute data and remove widget
****Need to move "Transcripts in this region"
+
****Need to move "Transcripts in this region" field
 
*'''Related/Example Links:'''
 
*'''Related/Example Links:'''
 
**[http://dev.wormbase.org:8023/species/c_elegans/transcript/JC8.10a#06--10 JC8.10a](CDS)
 
**[http://dev.wormbase.org:8023/species/c_elegans/transcript/JC8.10a#06--10 JC8.10a](CDS)
Line 115: Line 115:
 
**Region Widget
 
**Region Widget
 
***Matching cDNAs should be moved to Reagents widget
 
***Matching cDNAs should be moved to Reagents widget
 +
**Origin Widget
 +
***Moved to Overview
  
 
====Non-compliant Data Checks====
 
====Non-compliant Data Checks====

Revision as of 15:56, 1 February 2012

Current Tasks

Tasks In Progress

Refining Interactions widget

  • Details:
    • Scale distance based from current gene based on connectedness(number of interactions)
      • Shouldn't cluster by gene class (problems arise from classes like "let" where genes aren't necessarily related, so grouping/clustering can be misleading)
        • Interesting example where this seems to happen automatically: pptr-1
  • Progress:
    • Checking cytoscapeweb documentation for how to incorporate this
  • Related/Example Links:
  • Completed:
    • If the number of interactions is too high, only show the minimal table (hide Cytoscape?) and add "Show More"/"Show Neighbouring Interactions"? option
      • Otherwise, show all interactions(nearby interactions included) and Cytoscape plugin
      • NOTE: This may need to be revisited and optimized/cleaned up
      • Looking into BLASTP field in Homology Widget on Protein page that uses similar mechanism
        • remove duplication
        • instead of toggle href load, load diagram with no nearby in toggle
        • create threshold-determining algorithm based on nodes?
    • Split interactions into 2 methods, one for those involving current gene and one for nearby interactions
    • If local interactions exceeds 400 100(after merging duplicates), doesn't load nearby
    • Combined duplicate edges (duplicate implies matching source node, target node, direction, type, & phenotype)
    • Changed table: "Details" column with single link to interaction object -> "Citations" column with list of links to duplicate interactions
      • More than 10 results in a cell is now collapsible into "# Results"
    • Modified tooltip
      • Removed interaction number and link to page (misleading for multiple)
      • Added phenotype and number of citations to tooltip
    • Added "edge width based on number of citations" feature
      • Set 15 as max number of citations; anything higher will be scaled down
    • Change colour scheme to follow WormBase's
      • Start by looking in main.css

Gene page alterations

  • Details:
    • Making corrections to Gene page interface based on curator consultation
  • Progress:
    • Completed
  • Related/Example Links:
  • Completed:
    • Phenotype:
      • Added evidence information
        • May need to be modified/re-organized (pending consultation)
        • Gene Ontology widget uses similar mechanism
        • _get_evidence method in Object.pm
    • Consultation from curators. Teleconference: 11:30 am EST Wednesday, January 18th, 2012
    • Interactions:
      • Added edge-colour legend
      • Hide no_interaction edges unless that option is selected/filtered for by user
    • Phenotype:
      • Standardize look and feel of tables (convert to data tables)
        • Done changing Phenotypes, Phenotypes_not_observed, and RNAi tables to use build_data_table
        • Modified corresponding API methods to return compatible data for build_data_table
      • Combined/merged Phenotype and RNAi tables for observed and not_observed (with >10 results collapsible)
    • Reagents:
      • Drop the word "found" for search results
      • Switch search results to actual list of results(collapsible if too many)
        • See/learn how this was done for the Expression widget
        • implemented using tags2link macro
    • Homology:
      • restore best blast hits (on the protein object)
      • protein domains: alphabetize & restrict to just interpro hits

Sequence page alterations

  • Details:
    • Making corrections to Sequence page interface based on curator consultation
    • General
    • Overview Widget
      • Method field
        • Not particularly useful in many cases (should be hidden if only curated)
        • Note: Classic WB sometimes additional info for Method (i.e. ?Method)
      • Curation Status
        • Should be separated from Method field into its own field
        • e.g. partially confirmed
      • Move "type" from box to next to identifier (e.g. JC8.10a (CDS))
        • Modify/Update method for determining type (currently seems to be guessing)
      • Add display for navigating to parent gene & corresponding protein
        • Similar to Region widget? Table
        • Not needed for Sequence page
    • Reagents Widget
      • Add PCR products
        • Tags/info should already be in the model
    • Location Widget (GBrowse)
      • Same changes as gene page
        • Possibly different tracks
          • Don't need Coding Segments or Frame Usage
          • Only show Gene Models with upstream/downstream genes
      • Highlight current sequence
    • Sequences Widget
      • Predicted Exon Structure table only belongs in Sequences context
        • Calculate and show exon & intron sizes using "Relative to Itself"
        • Remove "Relative to Superlink"
        • Start & End "Relative to Itself" are useful in some cases (keep)
  • Progress:
    • Separating Transcript(+CDS) and Sequence pages
      • Checking Sequence page methods to ensure that only valid fields are accessed
        • Comparing with schema
        • Removing eval statements to speed up
    • Origin Widget
      • Should be a curator-only field
    • Region Widget
      • Redistribute data and remove widget
        • Need to move "Transcripts in this region" field
  • Related/Example Links:
  • Completed:
    • Consultation from curators. Teleconference: 11:30 am EST Wednesday, January 25th, 2012
    • Region Widget
      • Matching cDNAs should be moved to Reagents widget
    • Origin Widget
      • Moved to Overview

Non-compliant Data Checks

  • Details:
    • Using fatal_non_compliance check and debug option (enable in wormbase_local.conf) to determine if API methods return invalid data
      • E.g. returning ACe objects(usually this should be a string) or empty arrays/hashes(should return undef)
    • Usually these can be found when fields do not have data to return but give empty structures instead of just undef
  • Progress:
    • Correcting these as they're encountered
  • Completed:
    • Methods showing errors on the following pages were corrected:
      • Variation, Person, Laboratory, Gene Class, Life Stages, Phenotype, Protein, Strain

Interface Corrections

  • Details:
    • Look into rearranging the elements in widgets so that they do not appear strange/distorted when switched from one- to two-column views or using smaller displays
    • Will require modifying the templates

Homology Widget

  • Needs to be modified; Contains too much information that shouldn't necessarily be grouped this way
  • May need to move orthologs to separate widget

Cytoscape plugin

  • Incorporate button/option to open pop-up for larger view (e.g. in case user has small screen or is using 2-column layout)
  • Also, add plugin to interaction page (may need to wait until interactions are merged)

Other Tasks

Additional tasks that require further investigation

Getting Started

See WormBase Staff Resources.

Members/Contacts

Meetings

  • WormBase OICR Developers Teleconference
    • Mondays, 3:00PM
    • Phone-in 1-800-747-5150 id: 6738514
  • WormBase OICR Developers Teleconference with Lincoln
  • WormBase International Groups Teleconference
    • Every other Thursday, 11:30AM
    • Lincoln's Office
  • Group Meeting
    • Fridays, 3:00PM
    • HL31 Conference Room/TBA

Tools

The following are some of the tools with which many major aspects of WormBase are developed. You should familiarize yourself with them through documentation and examples.

Perl

There is significant documentation on getting started with Perl. One starting point is PerlMonks.

Catalyst

Catalyst is the web development framework used to develop WormBase. To get started, read and try examples from

Git

Git is a version control system used for collaboration and backup in the development process. One starting point is the progit tutorial

Given that we have modified two files a.txt and b.txt but do not wish to keep the changes made to b.txt

git status
git checkout b.txt
git add a.txt
git commit -m “Added change1 and change2 to a.txt”
git push

If we have did not have the most recent version, then we will run into an issue when trying to push. In this case we can:

git fetch
git merge
git push

Note: pull is similar to using fetch + merge

Browser (Debugging)

Many browsers provide useful tools to developers that can be used for debugging
Chrome

  • Tools->Developer Tools/JavaScript Console

Firefox

  • Firefox->Web Developer->Web Console/Error Console

Other

Some other tools that you should be aware of but may not be required to know/interact with include:

  • JavaScript
  • ACeDB
  • MySQL
  • Xapian
  • GFF
  • Cytoscape Web
    • Cytoscape Tutorial
    • Plugin generally used for pathway analysis
    • This plugin is used in the Interactions widget on the Gene page ([WormBase dir]/root/templates/classes/gene/interactions.tt2)
    • Installation directory (for updating): [WormBase dir]/root/js/jquery/plugins/

General Concepts

Widget Data Loading

Widget Loading

REST Controller:

  1. Catches internal url (/rest/widget/...)
  2. Determines the class and widget from the url
  3. From class and widget, determines which fields are required from the configuration file (wormbase.conf)
  4. API methods request data from appropriate databases, process/format/package the data, and then return it(/lib/WormBase/API/Object/[Class].pm)
  5. Sends data to the template to be used in rendering the widget (/root/templates/classes/[Class]/[Widget].tt2)

Other Info

Useful Macros when editing templates can be found in:

  • /root/templates/config/main
    • e.g. tags2link
  • /root/templates/shared/page_elements.tt2
    • e.g. build_data_table

Useful files for debugging include:

  • /logs/wb-dev-catalyst.log

Other:

  • If the port you have been using appears to be busy but the server is not running,
ps -aux|grep -XXXX
kill -9 ID

where XXXX is the port number(e.g. 8023) and ID is the process id that is using the port(e.g. 10361) NOTE: Do not kill other users' processes if you are using a shared dev machine (e.g. wb-dev)

  • To dump data in API methods include Data::Dumper
use Data::Dumper
...
warn(Dumper(\@data));
  • Sometimes firewall blocks certain ports, so you may be unable to connect to your dev server on the wb-dev machine through the browser
ssh -L 8080:localhost:XXXX wb-dev.oicr.on.ca
./wormbase_server.pl -p XXXX -d -r

Then go to localhost:8080 in browser